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.
Closes-Bug: #1586931
Change-Id: I03be8100155d343eb6a4ea9eda3f1498ad3fb4cf
(cherry picked from commit e72826123bfd7c1d962b615da3f028b315ba3943)
Reviewed: https:/ /review. openstack. org/358153 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=daf281f95fa 96aef72933280d8 73112b5e72807c
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit daf281f95fa96ae f72933280d87311 2b5e72807c
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 d962b615da3f028 b315ba3943)
(cherry picked from commit e72826123bfd7c1