|
43 | 43 | portbindings.CAP_PORT_FILTER: True,
|
44 | 44 | portbindings.VIF_DETAILS_CONNECTIVITY: portbindings.CONNECTIVITY_L2,
|
45 | 45 | portbindings.VIF_DETAILS_BOUND_DRIVERS: {'0': 'ovn'},
|
| 46 | + portbindings.VIF_DETAILS_BRIDGE_NAME: 'br-int', |
| 47 | + portbindings.OVS_DATAPATH_TYPE: 'system', |
46 | 48 | }
|
47 | 49 | VHOSTUSER_VIF_DETAILS = {
|
48 | 50 | portbindings.CAP_PORT_FILTER: False,
|
49 | 51 | 'vhostuser_mode': VHU_MODE,
|
50 | 52 | 'vhostuser_ovs_plug': True,
|
51 | 53 | portbindings.VIF_DETAILS_CONNECTIVITY: portbindings.CONNECTIVITY_L2,
|
52 | 54 | portbindings.VIF_DETAILS_BOUND_DRIVERS: {'0': 'ovn'},
|
| 55 | + portbindings.VIF_DETAILS_BRIDGE_NAME: 'br-int', |
| 56 | + portbindings.OVS_DATAPATH_TYPE: 'netdev', |
53 | 57 | }
|
54 | 58 |
|
55 | 59 |
|
56 | 60 | class TestPortBinding(base.TestOVNFunctionalBase):
|
57 | 61 |
|
58 |
| - def setUp(self): |
59 |
| - super(TestPortBinding, self).setUp() |
| 62 | + def setUp(self, **kwargs): |
| 63 | + super().setUp(**kwargs) |
60 | 64 | self.ovs_host = 'ovs-host'
|
61 | 65 | self.dpdk_host = 'dpdk-host'
|
62 | 66 | self.invalid_dpdk_host = 'invalid-host'
|
63 | 67 | self.insecure_host = 'insecure-host'
|
64 | 68 | self.smartnic_dpu_host = 'smartnic-dpu-host'
|
65 | 69 | self.smartnic_dpu_serial = 'fake-smartnic-dpu-serial'
|
66 |
| - self.add_fake_chassis(self.ovs_host) |
| 70 | + self.add_fake_chassis( |
| 71 | + self.ovs_host, |
| 72 | + other_config={ovn_const.OVN_DATAPATH_TYPE: 'system'}) |
67 | 73 | self.add_fake_chassis(
|
68 | 74 | self.dpdk_host,
|
69 |
| - other_config={'datapath-type': 'netdev', |
| 75 | + other_config={ovn_const.OVN_DATAPATH_TYPE: 'netdev', |
70 | 76 | 'iface-types': 'dummy,dummy-internal,dpdkvhostuser'})
|
71 | 77 |
|
72 | 78 | self.add_fake_chassis(
|
73 | 79 | self.invalid_dpdk_host,
|
74 |
| - other_config={'datapath-type': 'netdev', |
| 80 | + other_config={ovn_const.OVN_DATAPATH_TYPE: 'netdev', |
75 | 81 | 'iface-types': 'dummy,dummy-internal,geneve,vxlan'})
|
76 | 82 | self.add_fake_chassis(
|
77 | 83 | self.smartnic_dpu_host,
|
78 | 84 | other_config={ovn_const.OVN_CMS_OPTIONS: '{}={}'.format(
|
79 | 85 | ovn_const.CMS_OPT_CARD_SERIAL_NUMBER,
|
80 |
| - self.smartnic_dpu_serial)}) |
| 86 | + self.smartnic_dpu_serial), |
| 87 | + ovn_const.OVN_DATAPATH_TYPE: 'system'}) |
81 | 88 | self.n1 = self._make_network(self.fmt, 'n1', True)
|
82 | 89 | res = self._create_subnet(self.fmt, self.n1['network']['id'],
|
83 | 90 | '10.0.0.0/24')
|
@@ -151,9 +158,13 @@ def test_port_binding_create_port(self):
|
151 | 158 | self._verify_vif_details(port_id, self.dpdk_host, 'vhostuser',
|
152 | 159 | expected_vif_details)
|
153 | 160 |
|
| 161 | + expected_vif_details = copy.deepcopy(VHOSTUSER_VIF_DETAILS) |
| 162 | + expected_vif_details.pop('vhostuser_mode') |
| 163 | + expected_vif_details.pop('vhostuser_ovs_plug') |
| 164 | + expected_vif_details[portbindings.CAP_PORT_FILTER] = True |
154 | 165 | port_id = self._create_or_update_port(hostname=self.invalid_dpdk_host)
|
155 | 166 | self._verify_vif_details(port_id, self.invalid_dpdk_host, 'ovs',
|
156 |
| - OVS_VIF_DETAILS) |
| 167 | + expected_vif_details) |
157 | 168 |
|
158 | 169 | def test_port_binding_create_remote_managed_port(self):
|
159 | 170 | pci_vendor_info = 'fake-pci-vendor-info'
|
@@ -205,8 +216,12 @@ def test_port_binding_update_port(self):
|
205 | 216 |
|
206 | 217 | port_id = self._create_or_update_port(port_id=port_id,
|
207 | 218 | hostname=self.invalid_dpdk_host)
|
| 219 | + expected_vif_details = copy.deepcopy(VHOSTUSER_VIF_DETAILS) |
| 220 | + expected_vif_details.pop('vhostuser_mode') |
| 221 | + expected_vif_details.pop('vhostuser_ovs_plug') |
| 222 | + expected_vif_details[portbindings.CAP_PORT_FILTER] = True |
208 | 223 | self._verify_vif_details(port_id, self.invalid_dpdk_host, 'ovs',
|
209 |
| - OVS_VIF_DETAILS) |
| 224 | + expected_vif_details) |
210 | 225 |
|
211 | 226 | def test_port_binding_update_remote_managed_port(self):
|
212 | 227 | port_id = self._create_or_update_port(
|
|
0 commit comments