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