1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Auth import Auth
5 from PLC.NodeGroups import NodeGroup, NodeGroups
7 class DeleteNodeGroup(Method):
9 Delete an existing Node Group.
11 ins may delete any node group
13 Returns 1 if successful, faults otherwise.
20 Mixed(NodeGroup.fields['nodegroup_id'],
21 NodeGroup.fields['name'])
24 returns = Parameter(int, '1 if successful')
26 def call(self, auth, node_group_id_or_name):
27 # Get account information
28 nodegroups = NodeGroups(self.api, [node_group_id_or_name])
30 raise PLCInvalidArgument, "No such node group"
32 nodegroup = nodegroups[0]