Merge "Change DVR to use ip_lib.add_ip_address() directly"

This commit is contained in:
Zuul 2019-01-24 22:33:41 +00:00 committed by Gerrit Code Review
commit f405b70649
1 changed files with 2 additions and 3 deletions

View File

@ -314,10 +314,9 @@ class DvrEdgeRouter(dvr_local_router.DvrLocalRouter):
return
interface_name = self.get_snat_external_device_interface_name(
self.get_ex_gw_port())
device = ip_lib.IPDevice(
interface_name, namespace=self.snat_namespace.name)
try:
device.addr.add(fip_cidr)
ip_lib.add_ip_address(fip_cidr, interface_name,
namespace=self.snat_namespace.name)
except RuntimeError:
LOG.warning("Unable to configure IP address for centralized "
"floating IP: %s", fip['id'])