mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Implement ability to change settings for an existing node
This commit is contained in:
parent
4ba42558b1
commit
58482c6090
@ -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([
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user