git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated doc and comments
[plcapi.git]
/
PLC
/
Methods
/
DeleteNodeGroup.py
diff --git
a/PLC/Methods/DeleteNodeGroup.py
b/PLC/Methods/DeleteNodeGroup.py
index
c038401
..
680e718
100644
(file)
--- a/
PLC/Methods/DeleteNodeGroup.py
+++ b/
PLC/Methods/DeleteNodeGroup.py
@@
-1,3
+1,5
@@
+# $Id$
+# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
@@
-18,13
+20,11
@@
class DeleteNodeGroup(Method):
accepts = [
Auth(),
Mixed(NodeGroup.fields['nodegroup_id'],
accepts = [
Auth(),
Mixed(NodeGroup.fields['nodegroup_id'],
-
NodeGroup.fields['
name'])
+
NodeGroup.fields['group
name'])
]
returns = Parameter(int, '1 if successful')
]
returns = Parameter(int, '1 if successful')
- event_type = 'Delete'
- object_type = 'NodeGroup'
def call(self, auth, node_group_id_or_name):
# Get account information
def call(self, auth, node_group_id_or_name):
# Get account information
@@
-35,6
+35,9
@@
class DeleteNodeGroup(Method):
nodegroup = nodegroups[0]
nodegroup.delete()
nodegroup = nodegroups[0]
nodegroup.delete()
- self.object_ids = [nodegroup['nodegroup_id']]
+
+ # Logging variables
+ self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']]}
+ self.message = 'Node group %d deleted' % nodegroup['nodegroup_id']
return 1
return 1