neutron/neutron/tests/unit/ipam
Rodolfo Alonso Hernandez 2a6a4ab5da Remove exception ``IpAddressAllocationNotFound``
This patch removes the ``IpAddressAllocationNotFound`` exception. This
exception was raised when a IPAM register was called to be deleted
but not found.

As reported in the LP bug, this IPAM register deletion can be called
several times if a port fails during the creation. The IPAM register
deletion calls the DB deletion but doesn't raise any exception if the
register does not exist. The code ensures the IPAM register is
deleted and there is no need to fail if it is not present anymore.

This patch also removes the exception catch and try in "update_port",
that was added in [0] as a fix for [1]. That was added because the
subnet deletion code involved a port update call [2] during the
IP allocation deletion, if any port was still present in the subnet.
Since [3], this code is not needed because the subnet deletion does
not call a port update anymore.

[0]https://review.opendev.org/c/openstack/neutron/+/373536
[1]https://bugs.launchpad.net/neutron/+bug/1622616
[2]https://github.com/openstack/neutron/blob/pike-em/neutron/db/db_base_plugin_v2.py#L1017-L1018
[3]https://review.opendev.org/c/openstack/neutron/+/713045

Closes-Bug: #1965807
Related-Bug: #1954763
Related-Bug: #1622616

Conflicts:
    neutron/ipam/exceptions.py

Change-Id: I5b96b3a91aacffe118ddbb91a75c4892818ba97a
(cherry picked from commit 83b6ce9e9e)
2022-03-17 06:25:30 +00:00
..
drivers Remove exception ``IpAddressAllocationNotFound`` 2022-03-17 06:25:30 +00:00
__init__.py IPAM reference driver 2015-05-19 09:44:11 -07:00
fake_driver.py Enable IPAM drivers to allocate from more than one subnet 2016-05-10 22:00:46 +00:00
test_requests.py Allow to manually define the gateway IP when using subnet pools 2021-02-27 10:06:35 +00:00
test_subnet_alloc.py Deprecate 'allow_overlapping_ips' config option 2021-10-21 10:56:33 +00:00
test_utils.py Using 31-Bit and 32-Bit prefixes for IPv4 reasonably 2021-06-09 07:35:54 +00:00