Add ability to update nodelists

This commit is contained in:
2018-05-31 23:01:22 -04:00
parent 16613d900e
commit 77c5c2ccf7
2 changed files with 14 additions and 6 deletions

View File

@ -23,6 +23,10 @@ class NodeInstance(threading.Thread):
def getname():
return self.name
# Update value functions
def updatenodelist(node_list):
self.node_list = node_list
# Shutdown the thread
def stop(self):
self.stop_thread.set()
@ -71,6 +75,7 @@ class NodeInstance(threading.Thread):
self.zk.set(self.zkey + '/memfree', str(self.memfree).encode('ascii'))
self.zk.set(self.zkey + '/cpuload', str(self.cpuload).encode('ascii'))
print("Free memory: %s | Load: %s" % ( self.memfree, self.cpuload ))
print("Node list: %s" % self.node_list)
print("Active domains: %s" % self.domainlist)
for x in range(0,50):
time.sleep(0.1)