diff --git a/router-daemon/pvcrd/Daemon.py b/router-daemon/pvcrd/Daemon.py index bc89113a..41c1b0cc 100644 --- a/router-daemon/pvcrd/Daemon.py +++ b/router-daemon/pvcrd/Daemon.py @@ -249,10 +249,10 @@ def updatenetworks(new_network_list): s_network[network].stopDHCPServer() s_network[network].removeGatewayAddress() s_network[network].removeNetwork() + network_list = new_network_list for router in router_list: if router in t_router: t_router[router].updatenetworklist(s_network) - network_list = new_network_list print(ansiiprint.blue() + 'Network list: ' + ansiiprint.end() + '{}'.format(' '.join(network_list))) # Create timer to update this router in Zookeeper diff --git a/router-daemon/pvcrd/RouterInstance.py b/router-daemon/pvcrd/RouterInstance.py index d57f2813..413689a9 100644 --- a/router-daemon/pvcrd/RouterInstance.py +++ b/router-daemon/pvcrd/RouterInstance.py @@ -126,8 +126,10 @@ class RouterInstance(): def updatenetworklist(self, s_network): self.s_network = s_network + network_list = [] for network in s_network: - self.network_list.append(s_network[network].getvni()) + network_list.append(s_network[network].getvni()) + self.network_list = network_list def become_secondary(self): ansiiprint.echo('Setting router {} to secondary state'.format(self.name), '', 'i')