X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAddNode.py;h=a1e8337a10efcdab59ee0e39b26fd8aedf92314a;hb=e2e924a46c15afa1a91b395c2daec68c62e0552e;hp=c7870113598a3768bf226c3bd100a2a42482be86;hpb=d25787ab5419aae9b6070b61eaead9f8dd421c40;p=plcapi.git diff --git a/PLC/Methods/AddNode.py b/PLC/Methods/AddNode.py index c787011..a1e8337 100644 --- a/PLC/Methods/AddNode.py +++ b/PLC/Methods/AddNode.py @@ -76,7 +76,7 @@ class AddNode(Method): # since hostname was specified lets add the 'hrn' node tag root_auth = self.api.config.PLC_HRN_ROOT login_base = site['login_base'] - tags['hrn'] = hostname_to_hrn(root_auth, login_base, node['hostname']) + tags['hrn'] = hostname_to_hrn(root_auth, login_base, node['hostname']) for (tagname,value) in tags.iteritems(): # the tagtype instance is assumed to exist, just check that @@ -89,7 +89,7 @@ class AddNode(Method): UpdateNodeTag(self.api).__call__(auth,node_tags[0]['node_tag_id'],value) self.event_objects = {'Site': [site['site_id']], - 'Node': [node['node_id']]} - self.message = "Node %s created" % node['node_id'] - + 'Node': [node['node_id']]} + self.message = "Node %d=%s created" % (node['node_id'],node['hostname']) + return node['node_id']