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
get rid of svn keywords once and for good
[plcapi.git]
/
PLC
/
Methods
/
AddNodeGroup.py
diff --git
a/PLC/Methods/AddNodeGroup.py
b/PLC/Methods/AddNodeGroup.py
index
9e78edd
..
a24fa8e
100644
(file)
--- a/
PLC/Methods/AddNodeGroup.py
+++ b/
PLC/Methods/AddNodeGroup.py
@@
-1,4
+1,3
@@
-# $Id#
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
@@
-27,13
+26,13
@@
class AddNodeGroup(Method):
NodeGroup.fields['groupname'],
Mixed(TagType.fields['tag_type_id'],
TagType.fields['tagname']),
NodeGroup.fields['groupname'],
Mixed(TagType.fields['tag_type_id'],
TagType.fields['tagname']),
- NodeTag.fields['
tag
value'],
+ NodeTag.fields['value'],
]
returns = Parameter(int, 'New nodegroup_id (> 0) if successful')
]
returns = Parameter(int, 'New nodegroup_id (> 0) if successful')
- def call(self, auth, groupname, tag_type_id_or_tagname,
tag
value):
+ def call(self, auth, groupname, tag_type_id_or_tagname, value):
# locate tag type
tag_types = TagTypes (self.api,[tag_type_id_or_tagname])
if not(tag_types):
# locate tag type
tag_types = TagTypes (self.api,[tag_type_id_or_tagname])
if not(tag_types):
@@
-42,12
+41,12
@@
class AddNodeGroup(Method):
nodegroup_fields = { 'groupname' : groupname,
'tag_type_id' : tag_type['tag_type_id'],
nodegroup_fields = { 'groupname' : groupname,
'tag_type_id' : tag_type['tag_type_id'],
- '
tagvalue' : tag
value }
+ '
value' :
value }
nodegroup = NodeGroup(self.api, nodegroup_fields)
nodegroup.sync()
nodegroup = NodeGroup(self.api, nodegroup_fields)
nodegroup.sync()
- # Logging variables
- self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']]}
- self.message = 'Node group %d created' % nodegroup['nodegroup_id']
-
+
# Logging variables
+
self.event_objects = {'NodeGroup': [nodegroup['nodegroup_id']]}
+
self.message = 'Node group %d created' % nodegroup['nodegroup_id']
+
return nodegroup['nodegroup_id']
return nodegroup['nodegroup_id']