Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / PLC / Methods / AdmUpdateNodeGroup.py
1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.NodeGroups import NodeGroup, NodeGroups
5 from PLC.Auth import Auth
6 from PLC.Methods.UpdateNodeGroup import UpdateNodeGroup
7
8 class AdmUpdateNodeGroup(UpdateNodeGroup):
9     """
10     Deprecated. See UpdateNodeGroup.
11     """
12
13     status = "deprecated"
14
15     accepts = [
16         Auth(),
17         Mixed(NodeGroup.fields['nodegroup_id'],
18               NodeGroup.fields['name']),
19         NodeGroup.fields['name'],
20         NodeGroup.fields['description']
21         ]
22
23     returns = Parameter(int, '1 if successful')
24
25     def call(self, auth, nodegroup_id_or_name, name, description):
26         return UpdateNodeGroup.call(self, auth, nodegroup_id_or_name,
27                                     {'name': name, 'description': description})