Ordering bug

This commit is contained in:
Joshua Boniface 2018-09-30 19:06:18 -04:00
parent 66d8c436fb
commit 1216f4a046
1 changed files with 1 additions and 1 deletions

View File

@ -79,10 +79,10 @@ class VXNetworkInstance():
@zk_conn.DataWatch('/networks/{}/ip_gateway'.format(self.vni)) @zk_conn.DataWatch('/networks/{}/ip_gateway'.format(self.vni))
def watch_network_gateway(data, stat, event=''): def watch_network_gateway(data, stat, event=''):
if data and self.ip_gateway != data.decode('ascii'): if data and self.ip_gateway != data.decode('ascii'):
self.ip_gateway = data.decode('ascii')
if self.this_router.network_state == 'primary': if self.this_router.network_state == 'primary':
if self.ip_gateway: if self.ip_gateway:
self.removeGatewayAddress() self.removeGatewayAddress()
self.ip_gateway = data.decode('ascii')
self.createGatewayAddress() self.createGatewayAddress()
@zk_conn.DataWatch('/networks/{}/dhcp_flag'.format(self.vni)) @zk_conn.DataWatch('/networks/{}/dhcp_flag'.format(self.vni))