From e6d8fc55b3711b42670df6d39cfaf58104a530a0 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 13 Sep 2006 16:27:13 +0000 Subject: [PATCH] -now accepts node_id or name (previously only accepted node_id) --- PLC/Methods/AdmGetNodeGroupNodes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: -- 2.47.0