Fix up router creation bug
This commit is contained in:
parent
e6949ff126
commit
30399608bc
|
@ -213,12 +213,9 @@ def updaterouters(new_router_list):
|
||||||
@zk_conn.ChildrenWatch('/networks')
|
@zk_conn.ChildrenWatch('/networks')
|
||||||
def updatenetworks(new_network_list):
|
def updatenetworks(new_network_list):
|
||||||
global network_list
|
global network_list
|
||||||
for network in network_list:
|
for network in new_network_list:
|
||||||
if not network in s_network:
|
if not network in s_network:
|
||||||
s_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, t_router[myhostname]);
|
s_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, t_router[myhostname]);
|
||||||
for router in router_list:
|
|
||||||
if router in t_router:
|
|
||||||
t_router[router].updatenetworklist(s_network)
|
|
||||||
if not network in new_network_list:
|
if not network in new_network_list:
|
||||||
s_network[network].removeAddress()
|
s_network[network].removeAddress()
|
||||||
s_network[network].removeNetwork()
|
s_network[network].removeNetwork()
|
||||||
|
|
|
@ -98,7 +98,7 @@ class RouterInstance():
|
||||||
def updatenetworklist(self, s_network):
|
def updatenetworklist(self, s_network):
|
||||||
self.s_network = s_network
|
self.s_network = s_network
|
||||||
for network in s_network:
|
for network in s_network:
|
||||||
self.network_list.append(network.getvni())
|
self.network_list.append(s_network[network].getvni())
|
||||||
|
|
||||||
# Flush all VMs on the host
|
# Flush all VMs on the host
|
||||||
def set_secondary(self):
|
def set_secondary(self):
|
||||||
|
|
Loading…
Reference in New Issue