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