neutron/neutron/tests/unit/db
Maciej Józefczyk 8f1912a1d1 [OVN] Allow IP allocation with different segments for OVN service ports
OVN creates localport [1] for each network that has metadata
and allocate IP address from subnet within this network that has
DHCP enabled. The traffic from this port will never go outside
the chassis.

While using multiple segments with subnet linked to each segment
OVN needs to create an allocation of IP address for each of those
subnets [2] in order to generate data for OVN NBDB IPv4 DHCP Options.

The change [3] started to validate that condition, while multiple
IP addresses from different segments are tried to be allocated on
one port. We can skip this for OVN Metadata port, because there
is no reason to prevent those kind of allocation for OVN.

For stable branches we decide if a port is distributed or not
by looking for DEVICE_OWNER_DHCP device owner  and `ovn` device_id,
instead DEVICE_OWNER_DISTRIBUTED device owner.

Conflicts:
   neutron/db/ipam_backend_mixin.py
   neutron/tests/unit/db/test_ipam_pluggable_backend.py
   neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py

[1] http://www.openvswitch.org/support/dist-docs/ovn-architecture.7.html
[2] 5f42488a9a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py (L2279)
[3] https://review.opendev.org/#/c/709444/

Change-Id: Ib51cde89ed873f48db4daebc27a0980da9cc0f19
Closes-Bug: 1871608
(cherry picked from commit 8d1512afb0)
2020-07-27 11:53:37 +00:00
..
metering use metering api def from neutron-lib 2017-11-03 14:03:20 -06:00
quota remove neutron.common.exceptions 2019-02-01 14:35:00 -07:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
test__utils.py remove common db alaises to db utils 2018-05-01 14:13:24 -06:00
test_agents_db.py Add agent timestamp to "_log_heartbeat" method 2019-06-18 06:29:08 +00:00
test_agentschedulers_db.py Unnecessary routers should not be created 2020-02-08 01:07:35 +00:00
test_allowedaddresspairs_db.py use api def ALIAS in supported_extension_aliases 2019-04-08 08:30:20 -06:00
test_db_base_plugin_common.py Replace to_dict() calls with a function decorator 2015-08-03 11:42:25 +03:00
test_db_base_plugin_v2.py Relax subnet pool network affinity constraints 2019-07-31 10:01:55 -05:00
test_dvr_mac_db.py use test tools from neutron-lib 2019-06-05 06:21:04 -06:00
test_extraroute_db.py Implement extension: extraroute-atomic 2019-09-11 13:58:47 +02:00
test_ipam_backend_mixin.py [OVN] Allow IP allocation with different segments for OVN service ports 2020-07-27 11:53:37 +00:00
test_ipam_pluggable_backend.py [OVN] Allow IP allocation with different segments for OVN service ports 2020-07-27 11:53:37 +00:00
test_l3_db.py Handle ports assigned to routers without routerports 2019-10-15 09:11:23 +00:00
test_l3_dvr_db.py DVR: Remove control plane arp updates for DVR 2020-06-25 10:15:46 +00:00
test_l3_hamode_db.py Check "security_group_rule" quota during security group creation 2020-01-31 17:59:07 +00:00
test_migration.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
test_portsecurity_db.py use api def ALIAS in supported_extension_aliases 2019-04-08 08:30:20 -06:00
test_portsecurity_db_common.py delete common_db_mixin 2019-04-17 11:25:41 -06:00
test_provisioning_blocks.py use callback payloads for PROVISIONING_COMPLETE 2019-07-31 09:18:14 -06:00
test_rbac_db_mixin.py Fix bulk port binding 2019-07-05 13:50:31 -04:00
test_securitygroups_db.py Make _ensure_default_security_group method atomic 2020-06-24 07:51:45 +00:00
test_segments_db.py Change passing session to context in segments db functions 2016-12-23 16:47:41 +04:00