Forgot some critical shit

This commit is contained in:
Joshua Boniface 2018-06-04 12:26:04 -04:00
parent 4c59fe03aa
commit 3648238cef
1 changed files with 2 additions and 0 deletions

View File

@ -24,11 +24,13 @@ class VMInstance:
# Watch for changes to the hypervisor field in Zookeeper
@zk.DataWatch(self.zkey + '/hypervisor')
def watch_hypervisor(data, stat, event=""):
self.hypervisor = data.decode('ascii')
self.manage_vm_state()
# Watch for changes to the state field in Zookeeper
@zk.DataWatch(self.zkey + '/state')
def watch_state(data, stat, event=""):
self.state = data.decode('ascii')
self.manage_vm_state()
# Get data functions