Skip to content

Commit

Permalink
Fix #1574 & #1575
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jun 10, 2024
1 parent 3a23a05 commit ffd2e09
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions IM/connectors/OpenStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def delete_networks(self, driver, inf):
driver.ex_delete_network(ost_net)

if router and router.name == "im-%s" % inf.id:
driver.ex_delete_router(router.name)
driver.ex_delete_router(router)

return res, msg

Expand Down Expand Up @@ -2106,13 +2106,13 @@ def delete_elastic_ips(self, node, vm):
except Exception as ex:
self.log_warn("Error detaching Floating IP: %s. %s" % (floating_ip.ip_address,
get_ex_error(ex)))
# if it is in the list do not release it
if floating_ip.ip_address in no_delete_ips:
self.log_debug("Do not remove Floating IP: %s" % floating_ip.ip_address)
else:
self.log_debug("Remove Floating IP: %s" % floating_ip.ip_address)
# delete the ip
floating_ip.delete()
# if it is in the list do not release it
if floating_ip.ip_address in no_delete_ips:
self.log_debug("Do not remove Floating IP: %s" % floating_ip.ip_address)
else:
self.log_debug("Remove Floating IP: %s" % floating_ip.ip_address)
# delete the ip
floating_ip.delete()
return True, ""
except Exception as ex:
self.log_exception("Error removing Floating IPs to VM ID: " + str(vm.id))
Expand Down

0 comments on commit ffd2e09

Please sign in to comment.