From: Tony Mack Date: Wed, 13 Sep 2006 16:32:23 +0000 (+0000) Subject: now accepts nodegroup_id or name (previously only accepted nodegroup_id) X-Git-Tag: pycurl-7_13_1~757 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9776b1bcc3138351fc5123a419ddb8f91eabf4bf;p=plcapi.git now accepts nodegroup_id or name (previously only accepted nodegroup_id) --- diff --git a/PLC/Methods/AdmDeleteNodeGroup.py b/PLC/Methods/AdmDeleteNodeGroup.py index d780e59a..cadc32ed 100644 --- a/PLC/Methods/AdmDeleteNodeGroup.py +++ b/PLC/Methods/AdmDeleteNodeGroup.py @@ -18,14 +18,15 @@ class AdmDeleteNodeGroup(Method): accepts = [ PasswordAuth(), - NodeGroup.fields['nodegroup_id'], + Mixed(NodeGroup.fields['nodegroup_id'], + NodeGroup.fields['name']) ] returns = Parameter(int, '1 if successful') - def call(self, auth, node_group_id): + def call(self, auth, node_group_id_or_name): # Get account information - nodegroups = NodeGroups(self.api, [node_group_id]) + nodegroups = NodeGroups(self.api, [node_group_id_or_name]) if not nodegroups: raise PLCInvalidArgument, "No such node group"