This commit is contained in:
Joshua Boniface 2018-06-01 01:32:19 -04:00
parent bf1afbd7eb
commit 00b0aa0031
1 changed files with 7 additions and 5 deletions

12
pvcd.py
View File

@ -79,11 +79,13 @@ def updatenodes(new_node_list):
t_node[node].start() t_node[node].start()
time.sleep(0.5) time.sleep(0.5)
domain_list = zk.get_children('/domains') @zk.ChildrenWatch('/domains')
print('Domain list: %s' % domain_list) def updatedomains(new_domain_list):
domain_list = new_domain_list
for domain in domain_list: print('Domain list: %s' % domain_list)
s_domain[domain] = VMInstance.VMInstance(domain, zk, t_node[myhostname]); for domain in domain_list:
if not domain in s_domain:
s_domain[domain] = VMInstance.VMInstance(domain, zk, t_node[myhostname]);
while True: while True:
# Tick loop # Tick loop