Add state set
This commit is contained in:
parent
c177f977e4
commit
365ad6709a
|
@ -64,11 +64,11 @@ class NodeInstance(threading.Thread):
|
||||||
if conn == None:
|
if conn == None:
|
||||||
print('Failed to open connection to %s' % libvirt_name)
|
print('Failed to open connection to %s' % libvirt_name)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
# Gather data about hypervisor
|
# Gather data about hypervisor
|
||||||
self.name = conn.getHostname()
|
self.name = conn.getHostname()
|
||||||
self.cpucount = conn.getCPUMap()[0]
|
self.cpucount = conn.getCPUMap()[0]
|
||||||
|
self.state = 'start'
|
||||||
self.zk.set(self.zkey + '/state', 'start'.encode('ascii'))
|
self.zk.set(self.zkey + '/state', 'start'.encode('ascii'))
|
||||||
self.zk.set(self.zkey + '/cpucount', str(self.cpucount).encode('ascii'))
|
self.zk.set(self.zkey + '/cpucount', str(self.cpucount).encode('ascii'))
|
||||||
print("Node hostname: %s" % self.name)
|
print("Node hostname: %s" % self.name)
|
||||||
|
|
Loading…
Reference in New Issue