neutron/neutron/tests/unit
Flavio Fernandes b3647782e4 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:
  ./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-20 14:36:34 +00:00
..
agent [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 11:23:01 +00:00
api [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 11:23:01 +00:00
cmd Add check for external_network_bridge in neutron-status 2019-03-22 13:14:24 +00:00
common Packets getting lost during SNAT with too many connections 2019-05-20 17:39:47 -04:00
conf/agent Agent common config 2017-03-15 09:52:18 -06:00
core_extensions remove neutron.common.exceptions 2019-02-01 14:35:00 -07:00
db Make _ensure_default_security_group method atomic 2020-07-06 08:01:15 +00:00
debug Remove deprecated 'external_network_bridge' option 2019-03-09 22:07:38 +00:00
extensions Fix validation of IPv6 subnets with external RAs 2020-08-05 07:25:14 +00:00
hacking remove string use of neutron.common.rpc 2019-02-08 09:40:39 -07:00
ipam Allow first address in an IPv6 subnet as valid unicast 2019-05-22 14:13:31 +00:00
notifiers Add config option ``http_retries`` 2020-07-09 12:13:53 +02:00
objects Default (shared) network segment range is not mandatory 2020-05-04 14:02:23 +00:00
pecan_wsgi Removing deprecated module neutron.api.versions 2018-03-28 14:15:50 +07:00
plugins Ensure drop flows on br-int at agent startup for DVR too 2020-07-22 07:36:31 +00:00
privileged Ensure netlink.nla_slot tuple key is a string 2020-04-09 13:43:42 +00:00
quota use get reader/writer session from neutron-lib 2018-07-06 14:43:31 -06:00
scheduler Check "security_group_rule" quota during security group creation 2020-04-24 11:45:27 +02:00
services port_forwarding: validate args before invoking db update 2020-08-20 14:36:34 +00:00
tests Increase timeouts for OVSDB in functional tests 2019-09-13 10:57:02 +00:00
__init__.py Don't set use_stderr to False for tests 2017-04-15 01:41:29 +00:00
_test_extension_portbindings.py Remove the unit test 'test_ports_vnic_type_list' 2018-06-15 15:12:10 +00:00
dummy_plugin.py Add dependency for service plugin 2019-02-16 00:17:53 +08:00
extension_stubs.py Consume ServicePluginBase from neutron-lib 2017-03-17 12:06:57 -06:00
test_auth.py Fix context deprecation warnings 2018-02-13 15:02:49 -05:00
test_manager.py Avoid loading same service plugin more than once 2019-02-21 11:17:02 +01:00
test_neutron_plugin_base_v2.py Add unit test to validate non DB base core plugin can be loaded 2017-11-15 21:21:35 +00:00
test_opts.py Fix the sriov agent config group name 2016-05-05 16:16:08 +08:00
test_policy.py Fix handling of network:shared field in policy module 2019-05-17 14:14:15 +00:00
test_service.py Fix default RPC worker count 2019-08-02 09:44:32 +01:00
test_worker.py Move AgentStatusCheckWorker to PeriodicWorker 2016-11-17 15:31:19 -08:00
test_wsgi.py Change process name of neutron-server to match worker role 2019-03-01 14:18:09 -05:00
testlib_api.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00