Make the IP failover work including threaded background os commands

This commit is contained in:
2018-09-24 04:07:46 -04:00
parent eda92a7cbb
commit 0f9637cb69
5 changed files with 37 additions and 13 deletions

View File

@ -89,6 +89,7 @@ class VXNetworkInstance():
if self.this_router.getnetworkstate() == 'primary':
ansiiprint.echo('Creating gateway {} on interface {}'.format(self.ip_gateway, self.vni_dev), '', 'o')
common.run_os_command('ip address add {}/{} dev {}'.format(self.ip_gateway, self.ip_cidrnetmask, self.bridge_nic))
common.run_os_command('arping -A -c1 -I {} {}'.format(self.bridge_nic, self.ip_gateway), background=True)
def removeNetwork(self):
ansiiprint.echo('Removing VNI {} device on interface {}'.format(self.vni, self.vni_dev), '', 'o')