Browse Source

Merge "[OVN] Add baremetal support with Neutron DHCP agent" into stable/train

changes/86/843486/1
Zuul 2 months ago committed by Gerrit Code Review
parent
commit
2704f99a2c
  1. 4
      networking_ovn/common/constants.py
  2. 7
      networking_ovn/common/utils.py
  3. 4
      networking_ovn/ml2/mech_driver.py
  4. 4
      networking_ovn/tests/unit/ml2/test_mech_driver.py

4
networking_ovn/common/constants.py

@ -297,7 +297,9 @@ HA_CHASSIS_GROUP_HIGHEST_PRIORITY = 32767
EXTERNAL_PORT_TYPES = (portbindings.VNIC_DIRECT,
portbindings.VNIC_DIRECT_PHYSICAL,
portbindings.VNIC_MACVTAP)
portbindings.VNIC_MACVTAP,
portbindings.VNIC_BAREMETAL,
)
# LB selection fields to represent LB algorithm
LB_SELECTION_FIELDS_MAP = {

7
networking_ovn/common/utils.py

@ -175,7 +175,12 @@ def get_lsp_dhcp_opts(port, ip_version):
# in OVN.
lsp_dhcp_disabled = False
lsp_dhcp_opts = {}
if is_network_device_port(port):
vnic_type = port.get(portbindings.VNIC_TYPE, portbindings.VNIC_NORMAL)
# NOTE(lucasagomes): Baremetal does not yet work with OVN's built-in
# DHCP server, disable it for now
if (is_network_device_port(port) or
vnic_type == portbindings.VNIC_BAREMETAL):
lsp_dhcp_disabled = True
else:
mapping = constants.SUPPORTED_DHCP_OPTS_MAPPING[ip_version]

4
networking_ovn/ml2/mech_driver.py

@ -162,7 +162,9 @@ class OVNMechanismDriver(api.MechanismDriver):
self.supported_vnic_types = [portbindings.VNIC_NORMAL,
portbindings.VNIC_DIRECT,
portbindings.VNIC_DIRECT_PHYSICAL,
portbindings.VNIC_MACVTAP]
portbindings.VNIC_MACVTAP,
portbindings.VNIC_BAREMETAL,
]
self.vif_details = {
portbindings.VIF_TYPE_OVS: {
portbindings.CAP_PORT_FILTER: self.sg_enabled

4
networking_ovn/tests/unit/ml2/test_mech_driver.py

@ -3309,6 +3309,10 @@ class TestOVNMechanismDriverSecurityGroup(
self._test_create_port_with_vnic_type(
portbindings.VNIC_MACVTAP)
def test_create_port_with_vnic_baremetal(self):
self._test_create_port_with_vnic_type(
portbindings.VNIC_BAREMETAL)
def test_update_port_with_sgs(self):
with self.network() as n, self.subnet(n):
sg1 = self._create_empty_sg('sg1')

Loading…
Cancel
Save