neutron/neutron/services/portforwarding
Flavio Fernandes 9273af2c50 port_forwarding: validate args before invoking db update
Add validator to update_floatingip_port_forwarding so codepath does not
attempt performing invalid database operation. With that, operation fails
right away, with a hint on the offending argument(s).

This is a backport that combines changes from 2 changes that go together:
https://review.opendev.org/#/c/738145/
https://review.opendev.org/#/c/744993/

Note: pep8 failed with following error in stable/train:
  ./neutron/tests/unit/services/portforwarding/test_pf_plugin.py:237:9:
  ./neutron/tests/unit/services/portforwarding/test_pf_plugin.py:261:9:
    N322  Possible use of no-op mock method. please use assert_called_once_with.
        mock_pf_get_objects.assert_called_once()
        ^
So additional changes were needed for backport.

Change-Id: I8284b22c5d691bfd9eadeb8590c3d4b27d261b04
Closes-Bug: #1878299
(cherry picked from commit f379740348)
(cherry picked from commit 838399f0a4)
2020-08-06 14:31:31 -04:00
..
common Prevent bind fip to port has port forwarding 2019-01-03 12:41:55 +08:00
__init__.py [server side] Floating IP port forwarding plugin 2018-07-26 11:43:34 +08:00
pf_plugin.py port_forwarding: validate args before invoking db update 2020-08-06 14:31:31 -04:00