From: Tony Mack Date: Wed, 13 Sep 2006 16:27:13 +0000 (+0000) Subject: -now accepts node_id or name (previously only accepted node_id) X-Git-Tag: pycurl-7_13_1~758 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e6d8fc55b3711b42670df6d39cfaf58104a530a0;p=plcapi.git -now accepts node_id or name (previously only accepted node_id) --- diff --git a/PLC/Methods/AdmGetNodeGroupNodes.py b/PLC/Methods/AdmGetNodeGroupNodes.py index 8e845a67..66bc17cc 100644 --- a/PLC/Methods/AdmGetNodeGroupNodes.py +++ b/PLC/Methods/AdmGetNodeGroupNodes.py @@ -17,7 +17,8 @@ class AdmGetNodeGroupNodes(Method): accepts = [ PasswordAuth(), - NodeGroup.fields['nodegroup_id'] + Mixed(NodeGroup.fields['nodegroup_id'], + NodeGroup.fields['name']) ] returns = [NodeGroup.join_fields['node_ids']] @@ -27,12 +28,12 @@ class AdmGetNodeGroupNodes(Method): # Update documentation with list of default fields returned self.__doc__ += os.linesep.join(Site.default_fields.keys()) - def call(self, auth, nodegroup_id): + def call(self, auth, nodegroup_id_or_name): # Authenticated function assert self.caller is not None # Get nodes in this nodegroup - nodegroup = NodeGroups(self.api, [nodegroup_id]) + nodegroup = NodeGroups(self.api, [nodegroup_id_or_name]) # make sure sites are found if not nodegroup: