From 79a05d49083b26744d7c67460113f012fb24a578 Mon Sep 17 00:00:00 2001 From: Nisar Khan Date: Wed, 6 Nov 2024 09:22:37 +0000 Subject: [PATCH] Add Caracal Support Change-Id: Ic6f9707cf7555c4cad729608359626b3cfa1c846 --- .zuul.yaml | 28 +++++++++---------- devstack/local.conf.nfp | 10 +++---- .../ml2plus/drivers/apic_aim/constants.py | 3 +- .../unit/plugins/ml2plus/test_apic_aim.py | 17 ++++++----- test-requirements.txt | 8 +++--- tox.ini | 2 +- 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 31d6dba14..7b7ed7113 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -15,40 +15,40 @@ nodeset: ubuntu-focal required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py38: nodeset: ubuntu-focal # Ignore py38 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py39: nodeset: ubuntu-focal required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py310: nodeset: ubuntu-jammy # Ignore py310 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py311: nodeset: ubuntu-jammy # Ignore py311 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py312: - nodeset: ubuntu-jammy + nodeset: ubuntu-noble # Ignore py311 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - legacy-group-based-policy-dsvm-functional: voting: false - legacy-group-based-policy-dsvm-aim: @@ -61,37 +61,37 @@ nodeset: ubuntu-focal required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py38: nodeset: ubuntu-focal # Ignore py38 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py39: nodeset: ubuntu-focal required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py310: nodeset: ubuntu-jammy # Ignore py310 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py311: nodeset: ubuntu-jammy # Ignore py311 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 - openstack-tox-py312: - nodeset: ubuntu-jammy + nodeset: ubuntu-noble # Ignore py311 results until the gate is fixed voting: false required-projects: - name: openstack/requirements - override-checkout: stable/2023.2 + override-checkout: stable/2024.1 diff --git a/devstack/local.conf.nfp b/devstack/local.conf.nfp index 76d6592d6..37f92c609 100644 --- a/devstack/local.conf.nfp +++ b/devstack/local.conf.nfp @@ -43,11 +43,11 @@ if [[ $ENABLE_NFP = True ]]; then # Make sure that your public interface is not attached to any bridge. PUBLIC_INTERFACE= - enable_plugin neutron-fwaas http://opendev.org/openstack/neutron-fwaas.git stable/2023.2 - enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/2023.2 - enable_plugin neutron https://opendev.org/openstack/neutron.git stable/2023.2 - enable_plugin neutron-vpnaas https://opendev.org/openstack/neutron-vpnaas.git stable/2023.2 - enable_plugin octavia https://opendev.org/openstack/octavia.git stable/2023.2 + enable_plugin neutron-fwaas http://opendev.org/openstack/neutron-fwaas.git stable/2024.1 + enable_plugin neutron-lbaas https://opendev.org/openstack/neutron-lbaas.git stable/2024.1 + enable_plugin neutron https://opendev.org/openstack/neutron.git stable/2024.1 + enable_plugin neutron-vpnaas https://opendev.org/openstack/neutron-vpnaas.git stable/2024.1 + enable_plugin octavia https://opendev.org/openstack/octavia.git stable/2024.1 fi fi diff --git a/gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/constants.py b/gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/constants.py index f2747e782..510663472 100644 --- a/gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/constants.py +++ b/gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/constants.py @@ -24,6 +24,5 @@ DEVICE_OWNER_SVI_PORT = 'apic:svi' IPV4_ANY_CIDR = '0.0.0.0/0' IPV4_METADATA_CIDR = '169.254.0.0/16' -PROMISCUOUS_TYPES = [n_constants.DEVICE_OWNER_DHCP, - n_constants.DEVICE_OWNER_LOADBALANCER] +PROMISCUOUS_TYPES = [n_constants.DEVICE_OWNER_DHCP] PROMISCUOUS_SUFFIX = 'promiscuous' diff --git a/gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py b/gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py index f69d0231a..42fbf326c 100644 --- a/gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py +++ b/gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py @@ -446,13 +446,14 @@ class ApicAimTestCase(test_address_scope.AddressScopeTestCase, req = self.new_create_request('ports', data, self.fmt, as_admin=True) return self.deserialize(self.fmt, req.get_response(self.api)) - def _bind_port_to_host(self, port_id, host, **kwargs): + def _bind_port_to_host(self, port_id, host, as_admin=False, + as_service=True, **kwargs): data = {'port': {'binding:host_id': host, 'device_owner': 'compute:', 'device_id': 'someid'}} data['port'].update(kwargs) req = self.new_update_request('ports', data, port_id, - self.fmt, as_admin=True) + self.fmt, as_admin=as_admin, as_service=as_service) return self.deserialize(self.fmt, req.get_response(self.api)) def _bind_dhcp_port_to_host(self, port_id, host): @@ -3983,7 +3984,8 @@ class TestAimMapping(ApicAimTestCase): self.fmt, net_id, fixed_ips=fixed_ips, tenant_id=project)['port'] port_id = port['id'] - port = self._bind_port_to_host(port_id, 'host1')['port'] + port = self._bind_port_to_host(port_id, 'host1', as_admin=True, + as_service=False)['port'] port['dns_name'] = '' return net_id, subnet_id, port @@ -5973,7 +5975,7 @@ class TestPortBinding(ApicAimTestCase): data['binding'].update(kwargs) binding_resource = 'ports/%s/bindings' % port_id binding_req = self.new_create_request(binding_resource, data, fmt, - as_admin=True) + as_service=True) return binding_req.get_response(self.api) def _update_port_binding(self, fmt, port_id, host, **kwargs): @@ -6002,7 +6004,7 @@ class TestPortBinding(ApicAimTestCase): return self._check_code_and_serialize(response, raw_response) def _delete_port_binding(self, port_id, host): - response = self._req( + response = self._service_req( 'DELETE', 'ports', fmt=self.fmt, id=port_id, subresource='bindings', sub_id=host).get_response(self.api) return response @@ -8772,7 +8774,8 @@ class TestExtensionAttributes(ApicAimTestCase): **erspan_config, as_admin=True)['port'] self.assertEqual(erspan_config.get('apic:erspan_config'), p2['apic:erspan_config']) - self._bind_port_to_host(p2['id'], 'host1') + self._bind_port_to_host(p2['id'], 'host1', as_admin=True, + as_service=False) source_name = p2['id'] + '-both' dest_name = '192.168.0.10' + '-' + '1023' source_resources[0].append(aim_resource.SpanVsourceGroup( @@ -8815,7 +8818,7 @@ class TestExtensionAttributes(ApicAimTestCase): span_vdest_group_names=[res.name for res in dest_resources[0]])]) check_erspan_config(aim_ctx, source_resources, dest_resources) # Unbuind the second port, and verify that no resources are left. - self._bind_port_to_host(p2['id'], '') + self._bind_port_to_host(p2['id'], '', as_admin=True, as_service=False) source_resources = [[], [], []] dest_resources = [ [], [], [], [aim_resource.InfraAccBundleGroup(name=host1_pg)]] diff --git a/test-requirements.txt b/test-requirements.txt index 3d5e1a3f3..3d8ca0823 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,19 +4,19 @@ hacking>=6.0.1 # Apache-2.0 # Since version numbers for these are specified in -# https://releases.openstack.org/constraints/upper/2023.2, they cannot be +# https://releases.openstack.org/constraints/upper/2024.1, they cannot be # referenced as GIT URLs. neutron python-heatclient python-keystoneclient --e git+https://opendev.org/openstack/networking-sfc.git@stable/2023.2#egg=networking-sfc +-e git+https://opendev.org/openstack/networking-sfc.git@stable/2024.1#egg=networking-sfc -e git+https://github.com/noironetworks/apicapi.git@master#egg=apicapi --e git+https://github.com/noironetworks/python-opflex-agent.git@stable/2023.2#egg=neutron-opflex-agent +-e git+https://github.com/noironetworks/python-opflex-agent.git@stable/2024.1#egg=neutron-opflex-agent --e git+https://opendev.org/x/python-group-based-policy-client.git@stable/2023.2#egg=python-group-based-policy-client +-e git+https://opendev.org/x/python-group-based-policy-client.git@stable/2024.1#egg=python-group-based-policy-client coverage!=4.4,>=4.0 # Apache-2.0 flake8-import-order==0.12 # LGPLv3 diff --git a/tox.ini b/tox.ini index f860f9f74..0c74661af 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ usedevelop = True install_command = pip install {opts} {packages} deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.2} + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2024.1} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh