diff --git a/.zuul.yaml b/.zuul.yaml index d447e1e..325c943 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,9 @@ - project: templates: - openstack-python3-charm-jobs - - openstack-cover-jobs \ No newline at end of file + - openstack-cover-jobs + check: + jobs: + - charmbuild + vars: + charm_build_name: neutron-dynamic-routing diff --git a/charmcraft.yaml b/charmcraft.yaml index 781dd8e..e755604 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -15,42 +15,23 @@ parts: - rustc - cargo build-snaps: - - charm + - charm/latest/edge build-environment: - CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/ - CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/ - MAKEFLAGS: -j$(nproc) -bases: - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [amd64] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [amd64] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [s390x] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [s390x] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [ppc64el] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [ppc64el] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [arm64] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [arm64] +base: ubuntu@24.04 +platforms: + amd64: + build-on: amd64 + build-for: amd64 + arm64: + build-on: arm64 + build-for: arm64 + ppc64el: + build-on: ppc64el + build-for: ppc64el + s390x: + build-on: s390x + build-for: s390x diff --git a/osci.yaml b/osci.yaml index 27cfcdd..9392c66 100644 --- a/osci.yaml +++ b/osci.yaml @@ -13,7 +13,7 @@ needs_charm_build: true charm_build_name: neutron-dynamic-routing build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/stable - job: name: jammy-caracal-ovn diff --git a/src/metadata.yaml b/src/metadata.yaml index 38b0d25..73e0d8a 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -6,8 +6,6 @@ description: | networks to the BGP infrastructure. tags: - openstack -series: - - jammy subordinate: false extra-bindings: # Used to specify the OpenStack provider network interface diff --git a/src/tests/bundles/jammy-bobcat.yaml b/src/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index 0c4a21d..0000000 --- a/src/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,248 +0,0 @@ -local_overlay_enabled: False - -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -series: jammy - -comment: -- 'machines section to decide order of deployment. database sooner = faster' -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - '6': - '7': - # osci-frr has a limited set of supported series. - series: jammy - '8': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - neutron-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - nova-mysql-router: - charm: ch:mysql-router - channel: latest/edge - glance-mysql-router: - charm: ch:mysql-router - channel: latest/edge - placement-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - haproxy-server-timeout: 90000 - haproxy-client-timeout: 90000 - haproxy-queue-timeout: 9000 - haproxy-connect-timeout: 9000 - to: - - '3' - channel: 2024.1/edge - - neutron-api: - charm: ch:neutron-api - num_units: 1 - options: - manage-neutron-plugin-legacy-mode: true - neutron-plugin: ovs - flat-network-providers: physnet1 - enable-ml2-port-security: True - neutron-security-groups: True - openstack-origin: *openstack-origin - haproxy-server-timeout: 90000 - haproxy-client-timeout: 90000 - haproxy-queue-timeout: 9000 - haproxy-connect-timeout: 9000 - enable-dvr: True - to: - - '4' - channel: 2024.1/edge - - neutron-dynamic-routing: - charm: ../../../neutron-dynamic-routing_ubuntu-22.04-amd64.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '6' - channel: latest/edge - - osci-frr: - charm: ch:osci-frr - series: jammy - num_units: 1 - to: - - '7' - - vault: - charm: ch:vault - num_units: 1 - channel: latest/edge - to: - - '8' - - nova-compute: - constraints: mem=7168M - charm: ch:nova-compute - num_units: 2 - options: - openstack-origin: *openstack-origin - debug: True - channel: 2024.1/edge - - nova-cloud-controller: - charm: ch:nova-cloud-controller - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: True - network-manager: Neutron - channel: 2024.1/edge - - placement: - charm: ch:placement - num_units: 1 - constraints: mem=1G - options: - openstack-origin: *openstack-origin - debug: true - channel: 2024.1/edge - - glance: - charm: ch:glance - num_units: 1 - options: - openstack-origin: *openstack-origin - channel: 2024.1/edge - - neutron-openvswitch: - charm: ch:neutron-openvswitch - num_units: 0 - options: - debug: True - enable-local-dhcp-and-metadata: True - use-dvr-snat: True - bridge-mappings: physnet1:br-ex - prevent-arp-spoofing: False - firewall-driver: openvswitch - channel: 2024.1/edge - -relations: - - - - 'neutron-dynamic-routing:amqp' - - 'rabbitmq-server:amqp' - - - - 'neutron-dynamic-routing:bgp-speaker' - - 'osci-frr:bgpclient' - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'neutron-api:shared-db' - - 'neutron-api-mysql-router:shared-db' - - - 'neutron-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'neutron-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'neutron-api:identity-service' - - 'keystone:identity-service' - - - - 'nova-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'placement-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - keystone:identity-service - - glance:identity-service - - - - nova-mysql-router:shared-db - - nova-cloud-controller:shared-db - - - - glance:image-service - - nova-cloud-controller:image-service - - - glance:image-service - - nova-compute:image-service - - - glance-mysql-router:shared-db - - glance:shared-db - - - - keystone:identity-service - - nova-cloud-controller:identity-service - - - - nova-compute:cloud-compute - - nova-cloud-controller:cloud-compute - - - - neutron-api:neutron-api - - nova-cloud-controller:neutron-api - - - - rabbitmq-server:amqp - - nova-cloud-controller:amqp - - - - rabbitmq-server:amqp - - nova-compute:amqp - - - - placement - - placement-mysql-router - - - - placement - - keystone - - - - placement - - nova-cloud-controller - - - - vault:certificates - - keystone:certificates - - - - vault:certificates - - neutron-api:certificates - - - - vault:certificates - - glance:certificates - - - - vault:certificates - - nova-cloud-controller:certificates - - - - vault:certificates - - placement:certificates - - - - rabbitmq-server:amqp - - neutron-openvswitch:amqp - - - neutron-api:neutron-plugin-api - - neutron-openvswitch:neutron-plugin-api - - - neutron-openvswitch:neutron-plugin - - nova-compute:neutron-plugin diff --git a/src/tests/bundles/jammy-caracal.yaml b/src/tests/bundles/jammy-caracal.yaml deleted file mode 100644 index ff1e241..0000000 --- a/src/tests/bundles/jammy-caracal.yaml +++ /dev/null @@ -1,248 +0,0 @@ -local_overlay_enabled: False - -variables: - openstack-origin: &openstack-origin cloud:jammy-caracal - -series: jammy - -comment: -- 'machines section to decide order of deployment. database sooner = faster' -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - '6': - '7': - # osci-frr has a limited set of supported series. - series: jammy - '8': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - neutron-api-mysql-router: - charm: ch:mysql-router - channel: latest/edge - nova-mysql-router: - charm: ch:mysql-router - channel: latest/edge - glance-mysql-router: - charm: ch:mysql-router - channel: latest/edge - placement-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - haproxy-server-timeout: 90000 - haproxy-client-timeout: 90000 - haproxy-queue-timeout: 9000 - haproxy-connect-timeout: 9000 - to: - - '3' - channel: 2024.1/edge - - neutron-api: - charm: ch:neutron-api - num_units: 1 - options: - manage-neutron-plugin-legacy-mode: true - neutron-plugin: ovs - flat-network-providers: physnet1 - enable-ml2-port-security: True - neutron-security-groups: True - openstack-origin: *openstack-origin - haproxy-server-timeout: 90000 - haproxy-client-timeout: 90000 - haproxy-queue-timeout: 9000 - haproxy-connect-timeout: 9000 - enable-dvr: True - to: - - '4' - channel: 2024.1/edge - - neutron-dynamic-routing: - charm: ../../../neutron-dynamic-routing_ubuntu-22.04-amd64.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '5' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '6' - channel: latest/edge - - osci-frr: - charm: ch:osci-frr - series: jammy - num_units: 1 - to: - - '7' - - vault: - charm: ch:vault - num_units: 1 - channel: latest/edge - to: - - '8' - - nova-compute: - constraints: mem=7168M - charm: ch:nova-compute - num_units: 2 - options: - openstack-origin: *openstack-origin - debug: True - channel: 2024.1/edge - - nova-cloud-controller: - charm: ch:nova-cloud-controller - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: True - network-manager: Neutron - channel: 2024.1/edge - - placement: - charm: ch:placement - num_units: 1 - constraints: mem=1G - options: - openstack-origin: *openstack-origin - debug: true - channel: 2024.1/edge - - glance: - charm: ch:glance - num_units: 1 - options: - openstack-origin: *openstack-origin - channel: 2024.1/edge - - neutron-openvswitch: - charm: ch:neutron-openvswitch - num_units: 0 - options: - debug: True - enable-local-dhcp-and-metadata: True - use-dvr-snat: True - bridge-mappings: physnet1:br-ex - prevent-arp-spoofing: False - firewall-driver: openvswitch - channel: 2024.1/edge - -relations: - - - - 'neutron-dynamic-routing:amqp' - - 'rabbitmq-server:amqp' - - - - 'neutron-dynamic-routing:bgp-speaker' - - 'osci-frr:bgpclient' - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'neutron-api:shared-db' - - 'neutron-api-mysql-router:shared-db' - - - 'neutron-api-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'neutron-api:amqp' - - 'rabbitmq-server:amqp' - - - - 'neutron-api:identity-service' - - 'keystone:identity-service' - - - - 'nova-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'glance-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - 'placement-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - keystone:identity-service - - glance:identity-service - - - - nova-mysql-router:shared-db - - nova-cloud-controller:shared-db - - - - glance:image-service - - nova-cloud-controller:image-service - - - glance:image-service - - nova-compute:image-service - - - glance-mysql-router:shared-db - - glance:shared-db - - - - keystone:identity-service - - nova-cloud-controller:identity-service - - - - nova-compute:cloud-compute - - nova-cloud-controller:cloud-compute - - - - neutron-api:neutron-api - - nova-cloud-controller:neutron-api - - - - rabbitmq-server:amqp - - nova-cloud-controller:amqp - - - - rabbitmq-server:amqp - - nova-compute:amqp - - - - placement - - placement-mysql-router - - - - placement - - keystone - - - - placement - - nova-cloud-controller - - - - vault:certificates - - keystone:certificates - - - - vault:certificates - - neutron-api:certificates - - - - vault:certificates - - glance:certificates - - - - vault:certificates - - nova-cloud-controller:certificates - - - - vault:certificates - - placement:certificates - - - - rabbitmq-server:amqp - - neutron-openvswitch:amqp - - - neutron-api:neutron-plugin-api - - neutron-openvswitch:neutron-plugin-api - - - neutron-openvswitch:neutron-plugin - - nova-compute:neutron-plugin diff --git a/src/tests/bundles/noble-caracal.yaml b/src/tests/bundles/noble-caracal.yaml index 839a61e..bd39206 100644 --- a/src/tests/bundles/noble-caracal.yaml +++ b/src/tests/bundles/noble-caracal.yaml @@ -61,7 +61,7 @@ applications: haproxy-connect-timeout: 9000 to: - '3' - channel: 2024.1/edge + channel: latest/edge neutron-api: charm: ch:neutron-api @@ -80,7 +80,7 @@ applications: enable-dvr: True to: - '4' - channel: 2024.1/edge + channel: latest/edge neutron-dynamic-routing: charm: ../../../neutron-dynamic-routing_ubuntu-22.04-amd64.charm @@ -118,7 +118,7 @@ applications: options: openstack-origin: *openstack-origin debug: True - channel: 2024.1/edge + channel: latest/edge nova-cloud-controller: charm: ch:nova-cloud-controller @@ -127,7 +127,7 @@ applications: openstack-origin: *openstack-origin debug: True network-manager: Neutron - channel: 2024.1/edge + channel: latest/edge placement: charm: ch:placement @@ -136,14 +136,14 @@ applications: options: openstack-origin: *openstack-origin debug: true - channel: 2024.1/edge + channel: latest/edge glance: charm: ch:glance num_units: 1 options: openstack-origin: *openstack-origin - channel: 2024.1/edge + channel: latest/edge neutron-openvswitch: charm: ch:neutron-openvswitch @@ -155,7 +155,7 @@ applications: bridge-mappings: physnet1:br-ex prevent-arp-spoofing: False firewall-driver: openvswitch - channel: 2024.1/edge + channel: latest/edge relations: diff --git a/src/tox.ini b/src/tox.ini index 2ddcccd..3ce5e85 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -26,7 +26,7 @@ passenv = OS_* TEST_* deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt [testenv:pep8] diff --git a/test-requirements.txt b/test-requirements.txt index a7936e6..3fd5feb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 diff --git a/tox.ini b/tox.ini index 50ddef3..4385196 100644 --- a/tox.ini +++ b/tox.ini @@ -50,20 +50,27 @@ commands = [testenv:py3] basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:py310] basepython = python3.10 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} + -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + +[testenv:py312] +basepython = python3.12 +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 -deps = flake8==3.9.2 +deps = flake8==7.1.1 git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} src unit_tests @@ -72,7 +79,7 @@ commands = flake8 {posargs} src unit_tests # https://github.com/openstack/nova/blob/master/tox.ini basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt setenv = diff --git a/unit_tests/test_lib_charm_openstack_dragent.py b/unit_tests/test_lib_charm_openstack_dragent.py index 29b164f..87bd226 100644 --- a/unit_tests/test_lib_charm_openstack_dragent.py +++ b/unit_tests/test_lib_charm_openstack_dragent.py @@ -78,7 +78,7 @@ class TestDRAgentCharm(Helper): with mock.patch('charms_openstack.charm.OpenStackCharm.' 'get_os_codename_package', return_value=codename) as mock_get_os_codename: - self.assertEquals(dra.get_os_codename(), codename) + self.assertEqual(dra.get_os_codename(), codename) mock_get_os_codename.assert_called_with( dra.release_pkg, dra.package_codenames )