Return None in get_instance_id_by_floating_address
_show_port() can raise a PortNotFound exception, but the method
get_instance_id_by_floating_address() doesn't handle it. On the
other hand, the method returns None if fip doesn't contain
port_id as a normal case.
On the caller side, "Delete a floating ip" API can use the returned
value None to disassociate_and_release_floating_ip() and the method
handles the None as a normal value.
So this patch makes get_instance_id_by_floating_address return None
if PortNotFound happens.
Reviewed: https:/ /review. openstack. org/351960 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e72826123bf d7c1d962b615da3 f028b315ba3943
Committed: https:/
Submitter: Jenkins
Branch: master
commit e72826123bfd7c1 d962b615da3f028 b315ba3943
Author: Ken'ichi Ohmichi <email address hidden>
Date: Fri Aug 12 10:15:29 2016 -0700
Return None in get_instance_ id_by_floating_ address
_show_port() can raise a PortNotFound exception, but the method instance_ id_by_floating_ address( ) doesn't handle it. On the and_release_ floating_ ip() and the method
get_
other hand, the method returns None if fip doesn't contain
port_id as a normal case.
On the caller side, "Delete a floating ip" API can use the returned
value None to disassociate_
handles the None as a normal value.
So this patch makes get_instance_ id_by_floating_ address return None
if PortNotFound happens.
Closes-Bug: #1586931
Change-Id: I03be8100155d34 3eb6a4ea9eda3f1 498ad3fb4cf