Merge pull request #1907 from swill/fix_vr_ip

Fix public IPs not being removed from the VR when deprovisionedThis PR replaces #1706.  It does not remove the IP from the database, but it does deprovision the IP correctly from the VR when the public IP is removed.

* pr/1907:
  Fix public IPs not being removed from the VR when deprovisioned

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
This commit is contained in:
Rajani Karuturi 2017-02-28 05:56:03 +05:30
commit 017c42b625
1 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,10 @@ class CsAddress(CsDataBag):
ip.setAddress(address)
logging.info("Address found in DataBag ==> %s" % address)
if not address['add'] and not ip.configured():
logging.info("Skipping %s as the add flag is set to %s " % (address['public_ip'], address['add']))
continue
if ip.configured():
logging.info(
"Address %s on device %s already configured", ip.ip(), dev)