Add node instances

This commit is contained in:
2018-05-31 21:49:23 -04:00
parent a81a6dd979
commit 92ddec311b
3 changed files with 95 additions and 39 deletions

View File

@@ -19,7 +19,7 @@ class VMInstance:
@zk.DataWatch(self.zkey + '/hypervisor')
def watch_hypervisor(data, stat):
self.hypervisor = data.decode('ascii')
print("Version: %s, data: %s" % (stat.version, data.decode('ascii')))
print("Version: %s, data: %s" % (stat.version, self.hypervisor))
self.manage_vm_state()
# Watch for changes to the state field in Zookeeper