Fix some missing stops

This commit is contained in:
Joshua Boniface 2018-09-30 16:09:23 -04:00
parent c360a91d9a
commit 1489486bbb
2 changed files with 3 additions and 2 deletions

View File

@ -239,7 +239,8 @@ def updatenetworks(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])
if not network in new_network_list: if not network in new_network_list:
s_network[network].removeAddress() s_network[network].stopDHCPServer()
s_network[network].removeGatewayAddress()
s_network[network].removeNetwork() s_network[network].removeNetwork()
for router in router_list: for router in router_list:
if router in t_router: if router in t_router:

View File

@ -104,8 +104,8 @@ class RouterInstance():
zkhandler.writedata(self.zk_conn, { '/routers/{}/networkstate'.format(self.t_router[router].getname()): 'primary' }) zkhandler.writedata(self.zk_conn, { '/routers/{}/networkstate'.format(self.t_router[router].getname()): 'primary' })
time.sleep(2) time.sleep(2)
for network in self.s_network: for network in self.s_network:
self.s_network[network].removeGatewayAddress()
self.s_network[network].stopDHCPServer() self.s_network[network].stopDHCPServer()
self.s_network[network].removeGatewayAddress()
def set_secondary(self): def set_secondary(self):
result = zkhandler.writedata(self.zk_conn, { result = zkhandler.writedata(self.zk_conn, {