ac3105553399b860a3b0450140c137cd9282dafb
[plcapi.git] / PLC / Methods / SliceNodesAdd.py
1 # $Id$
2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Nodes import Node, Nodes
6 from PLC.Slices import Slice, Slices
7 from PLC.Auth import Auth
8 from PLC.Methods.AddSliceToNodes import AddSliceToNodes
9
10 class SliceNodesAdd(AddSliceToNodes):
11     """
12     Deprecated. See AddSliceToNodes.
13
14     """
15
16     status = "deprecated"
17
18     roles = ['admin', 'pi', 'user']
19
20     accepts = [
21         Auth(),
22         Slice.fields['name'],
23         [Node.fields['hostname']]
24         ]
25
26     returns = Parameter(int, '1 if successful')
27
28     def call(self, auth, slice_name, nodes_list):
29
30         return AddSliceToNodes.call(self, auth, slice_name, nodes_list)