2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Implement ability to change settings for an existing node

This commit is contained in:
Jarrod Johnson 2013-11-03 10:21:54 -05:00
parent 4ba42558b1
commit 58482c6090
2 changed files with 14 additions and 2 deletions

View File

@ -66,6 +66,11 @@ class InputAttributes(ConfluentMessage):
for node in nodes:
self.nodeattribs[node] = inputdata
def get_attributes(self, node):
if node not in self.nodeattribs:
return {}
return self.nodeattribs[node]
class InputPowerMessage(ConfluentMessage):
valid_powerstates = set([

View File

@ -14,5 +14,12 @@ def retrieve(nodes, element, configmanager, inputdata):
else:
print repr(currattr)
raise Exception("BUGGY ATTRIBUTE FOR NODE")
def update(nodes, element, configmanager, inputdata):
updatedict = {}
for node in nodes:
updatenode = inputdata.get_attributes(node)
if updatenode:
updatedict[node] = updatenode
configmanager.set_node_attributes(updatedict)