X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAdmDeleteNodeGroup.py;h=b5b2cb6ce8605c6f34530497d4a9e0dc8e179a3f;hb=454ed505788aacb55658479b06fa05a9d73cc74e;hp=a255088d2bff1b6fb56b94386494d5e52535cb82;hpb=d45485d9d4e9c2e886b6ed2f52adf6c3a14d1981;p=plcapi.git diff --git a/PLC/Methods/AdmDeleteNodeGroup.py b/PLC/Methods/AdmDeleteNodeGroup.py index a255088..b5b2cb6 100644 --- a/PLC/Methods/AdmDeleteNodeGroup.py +++ b/PLC/Methods/AdmDeleteNodeGroup.py @@ -1,36 +1,8 @@ -from PLC.Faults import * -from PLC.Method import Method -from PLC.Parameter import Parameter, Mixed -from PLC.Auth import PasswordAuth -from PLC.NodeGroups import NodeGroup, NodeGroups +from PLC.Methods.DeleteNodeGroup import DeleteNodeGroup -class AdmDeleteNodeGroup(Method): +class AdmDeleteNodeGroup(DeleteNodeGroup): """ - Delete an existing Node Group. - - Admins my delete any node group - - Returns 1 if successful, faults otherwise. + Deprecated. See DeleteNodeGroup. """ - roles = ['admin'] - - accepts = [ - PasswordAuth(), - Mixed(NodeGroup.fields['nodegroup_id'], - NodeGroup.fields['name']) - ] - - returns = Parameter(int, '1 if successful') - - def call(self, auth, node_group_id_or_name): - # Get account information - nodegroups = NodeGroups(self.api, [node_group_id_or_name]) - if not nodegroups: - raise PLCInvalidArgument, "No such node group" - - nodegroup = nodegroups.values()[0] - - nodegroup.delete() - - return 1 + status = "deprecated"