From b3930738fb002c08b260b7ed95e61849f9432460 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Mon, 23 Dec 2019 17:30:08 +0000 Subject: [PATCH] Migrate neutron-openvswitch tests to Zaza func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/149 Change-Id: I718945e6eeee58e7e9f76c3e88a29e6420da7acd Closes-Bug: #1828424 --- Makefile | 8 +- test-requirements.txt | 21 +- tests/README.md | 2 +- tests/basic_deployment.py | 432 ------------------------------- tests/bundles/bionic_queens.yaml | 89 +++++++ tests/bundles/bionic_rocky.yaml | 98 +++++++ tests/bundles/bionic_stein.yaml | 98 +++++++ tests/bundles/bionic_train.yaml | 114 ++++++++ tests/bundles/disco_stein.yaml | 89 +++++++ tests/bundles/trusty_mitaka.yaml | 98 +++++++ tests/bundles/xenial_mitaka.yaml | 89 +++++++ tests/bundles/xenial_ocata.yaml | 98 +++++++ tests/bundles/xenial_pike.yaml | 98 +++++++ tests/bundles/xenial_queens.yaml | 98 +++++++ tests/dev-basic-cosmic-rocky | 23 -- tests/gate-basic-bionic-queens | 23 -- tests/gate-basic-bionic-rocky | 26 -- tests/gate-basic-bionic-stein | 26 -- tests/gate-basic-bionic-train | 26 -- tests/gate-basic-disco-stein | 23 -- tests/gate-basic-trusty-mitaka | 26 -- tests/gate-basic-xenial-mitaka | 23 -- tests/gate-basic-xenial-ocata | 26 -- tests/gate-basic-xenial-pike | 26 -- tests/gate-basic-xenial-queens | 26 -- tests/tests.yaml | 39 +-- tox.ini | 30 ++- 27 files changed, 1015 insertions(+), 760 deletions(-) delete mode 100644 tests/basic_deployment.py create mode 100644 tests/bundles/bionic_queens.yaml create mode 100644 tests/bundles/bionic_rocky.yaml create mode 100644 tests/bundles/bionic_stein.yaml create mode 100644 tests/bundles/bionic_train.yaml create mode 100644 tests/bundles/disco_stein.yaml create mode 100644 tests/bundles/trusty_mitaka.yaml create mode 100644 tests/bundles/xenial_mitaka.yaml create mode 100644 tests/bundles/xenial_ocata.yaml create mode 100644 tests/bundles/xenial_pike.yaml create mode 100644 tests/bundles/xenial_queens.yaml delete mode 100755 tests/dev-basic-cosmic-rocky delete mode 100755 tests/gate-basic-bionic-queens delete mode 100755 tests/gate-basic-bionic-rocky delete mode 100755 tests/gate-basic-bionic-stein delete mode 100755 tests/gate-basic-bionic-train delete mode 100755 tests/gate-basic-disco-stein delete mode 100755 tests/gate-basic-trusty-mitaka delete mode 100755 tests/gate-basic-xenial-mitaka delete mode 100755 tests/gate-basic-xenial-ocata delete mode 100755 tests/gate-basic-xenial-pike delete mode 100755 tests/gate-basic-xenial-queens diff --git a/Makefile b/Makefile index 1f7204a9..44835639 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ #!/usr/bin/make -PYTHON := /usr/bin/env python +PYTHON := /usr/bin/env python3 lint: @tox -e pep8 test: @echo Starting tests... - @tox -e py27 + @tox -e py3 functional_test: - @echo Starting Amulet tests... - @tox -e func27 + @echo Starting Zaza tests... + @tox -e func bin/charm_helpers_sync.py: @mkdir -p bin diff --git a/test-requirements.txt b/test-requirements.txt index bb2e3a72..04eff517 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,23 +7,6 @@ mock>=1.2 flake8>=2.2.4,<=2.4.1 stestr requests>=2.18.4 -# BEGIN: Amulet OpenStack Charm Helper Requirements -# Liberty client lower constraints -amulet>=1.14.3,<2.0;python_version=='2.7' -bundletester>=0.6.1,<1.0;python_version=='2.7' -python-ceilometerclient>=1.5.0 -python-cinderclient>=1.4.0,<5.0.0 -python-glanceclient>=1.1.0 -python-heatclient>=0.8.0 -python-keystoneclient>=1.7.1 -python-neutronclient>=3.1.0 -python-novaclient>=2.30.1 -python-openstackclient>=1.7.0 -python-swiftclient>=2.6.0 -pika>=0.10.0,<1.0 -distro-info -git+https://github.com/juju/charm-helpers.git#egg=charmhelpers -# END: Amulet OpenStack Charm Helper Requirements -# NOTE: workaround for 14.04 pip/tox -pytz pyudev # for ceph-* charm unit tests (not mocked?) +git+https://github.com/openstack-charmers/zaza.git#egg=zaza;python_version>='3.0' +git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack diff --git a/tests/README.md b/tests/README.md index 046be7fb..856c4f90 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,6 +1,6 @@ # Overview -This directory provides Amulet tests to verify basic deployment functionality +This directory provides Zaza tests to verify basic deployment functionality from the perspective of this charm, its requirements and its features, as exercised in a subset of the full OpenStack deployment test bundle topology. diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py deleted file mode 100644 index df495939..00000000 --- a/tests/basic_deployment.py +++ /dev/null @@ -1,432 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import amulet -import time - -from charmhelpers.contrib.openstack.amulet.deployment import ( - OpenStackAmuletDeployment -) - -# This file needs de-linted. The (mis)use of n-o q-a below causes all lint -# to go undetected. Remove that & fixme. -from charmhelpers.contrib.openstack.amulet.utils import ( - OpenStackAmuletUtils, - DEBUG, -) - -# Use DEBUG to turn on debug logging -u = OpenStackAmuletUtils(DEBUG) - -# XXX Tests inspecting relation data from the perspective of the -# neutron-openvswitch are missing because amulet sentries aren't created for -# subordinates Bug#1421388 - - -class NeutronOVSBasicDeployment(OpenStackAmuletDeployment): - """Amulet tests on a basic neutron-openvswitch deployment.""" - - def __init__(self, series, openstack=None, source=None, - stable=False): - """Deploy the entire test environment.""" - super(NeutronOVSBasicDeployment, self).__init__(series, openstack, - source, stable) - self._add_services() - self._add_relations() - self._configure_services() - self._deploy() - - u.log.info('Waiting on extended status checks...') - self.exclude_services = ['neutron-openvswitch'] - self._wait_and_check(exclude_services=self.exclude_services) - self._initialize_tests() - - def _add_services(self): - """Add services - - Add the services that we're testing, where neutron-openvswitch is - local, and the rest of the service are from lp branches that are - compatible with the local charm (e.g. stable or next). - """ - # Services and relations which are present merely to satisfy - # required_interfaces and workload status are not inspected. - # Fix me. Inspect those too. - this_service = {'name': 'neutron-openvswitch'} - other_services = [ - {'name': 'nova-compute'}, - {'name': 'nova-cloud-controller'}, - {'name': 'rabbitmq-server'}, - {'name': 'keystone'}, - {'name': 'glance'}, - {'name': 'neutron-api'}, - self.get_percona_service_entry(), - ] - if self._get_openstack_release() >= self.bionic_train: - other_services.append({'name': 'placement'}) - super(NeutronOVSBasicDeployment, self)._add_services(this_service, - other_services) - - def _add_relations(self): - """Add all of the relations for the services.""" - relations = { - 'neutron-openvswitch:amqp': 'rabbitmq-server:amqp', - 'neutron-openvswitch:neutron-plugin': - 'nova-compute:neutron-plugin', - 'neutron-openvswitch:neutron-plugin-api': - 'neutron-api:neutron-plugin-api', - # Satisfy workload stat: - 'neutron-api:identity-service': 'keystone:identity-service', - 'neutron-api:shared-db': 'percona-cluster:shared-db', - 'neutron-api:amqp': 'rabbitmq-server:amqp', - 'nova-compute:amqp': 'rabbitmq-server:amqp', - 'nova-compute:image-service': 'glance:image-service', - 'glance:identity-service': 'keystone:identity-service', - 'glance:shared-db': 'percona-cluster:shared-db', - 'glance:amqp': 'rabbitmq-server:amqp', - 'keystone:shared-db': 'percona-cluster:shared-db', - 'nova-cloud-controller:shared-db': 'percona-cluster:shared-db', - 'nova-cloud-controller:amqp': 'rabbitmq-server:amqp', - 'nova-cloud-controller:identity-service': 'keystone:' - 'identity-service', - 'nova-cloud-controller:cloud-compute': 'nova-compute:' - 'cloud-compute', - 'nova-cloud-controller:image-service': 'glance:image-service', - } - if self._get_openstack_release() >= self.bionic_train: - relations.update({ - 'placement:shared-db': 'percona-cluster:shared-db', - 'placement:amqp': 'rabbitmq-server:amqp', - 'placement:placement': 'nova-cloud-controller:placement', - 'placement:identity-service': 'keystone:identity-service', - }) - super(NeutronOVSBasicDeployment, self)._add_relations(relations) - - def _configure_services(self): - """Configure all of the services.""" - neutron_ovs_config = {} - neutron_ovs_config['enable-sriov'] = True - neutron_ovs_config['sriov-device-mappings'] = 'physnet42:eth42' - - pxc_config = { - 'dataset-size': '25%', - 'max-connections': 1000, - 'root-password': 'ChangeMe123', - 'sst-password': 'ChangeMe123', - } - nova_cc_config = {'network-manager': 'Neutron'} - configs = { - 'neutron-openvswitch': neutron_ovs_config, - 'percona-cluster': pxc_config, - 'nova-cloud-controller': nova_cc_config, - } - super(NeutronOVSBasicDeployment, self)._configure_services(configs) - - def _initialize_tests(self): - """Perform final initialization before tests get run.""" - # Access the sentries for inspecting service units - self.compute_sentry = self.d.sentry['nova-compute'][0] - self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0] - self.neutron_api_sentry = self.d.sentry['neutron-api'][0] - self.n_ovs_sentry = self.d.sentry['neutron-openvswitch'][0] - - # pidof is failing to find neutron-server on stein - # use pgrep instead. - if self._get_openstack_release() >= self.bionic_stein: - self.pgrep_full = True - else: - self.pgrep_full = False - - def _wait_and_check(self, sleep=5, exclude_services=[]): - """Extended wait and check helper - - The tests for neutron-openvswitch are particularly sensitive to - timing races. This is partially due to the configuration changes being - set against neutron-api and needing to wait for the relation to update - neutron-openvswitch. - - This helper will attempt to mitigate these race conditions. It is - purposefully redundant to attempt to handle the races. - - This should be called after every self.d.configure() call. - - :param sleep: Integer sleep value - :param excluded_services: List of excluded services not to be checked - """ - u.log.debug('Extended wait and check ...') - time.sleep(sleep) - self.d.sentry.wait(timeout=900) - time.sleep(sleep) - self._auto_wait_for_status(exclude_services=exclude_services) - time.sleep(sleep) - self.d.sentry.wait() - u.log.debug('Wait and check completed.') - - def test_100_services(self): - """Verify the expected services are running on the corresponding - service units.""" - u.log.debug('Checking system services on units...') - - services = { - self.compute_sentry: ['nova-compute', - 'neutron-plugin-openvswitch-agent'], - self.rabbitmq_sentry: ['rabbitmq-server'], - self.neutron_api_sentry: ['neutron-server'], - } - - if self._get_openstack_release() >= self.trusty_mitaka: - services[self.compute_sentry] = [ - 'nova-compute', - 'neutron-openvswitch-agent' - ] - - ret = u.validate_services_by_name(services) - if ret: - amulet.raise_status(amulet.FAIL, msg=ret) - - u.log.debug('OK') - - def test_301_neutron_sriov_config(self): - """Verify data in the sriov agent config file. This is supported since - Kilo""" - if self._get_openstack_release() < self.trusty_kilo: - u.log.debug('Skipping test, sriov agent not supported on < ' - 'trusty/kilo') - return - u.log.debug('Checking sriov agent config file data...') - unit = self.n_ovs_sentry - conf = '/etc/neutron/plugins/ml2/sriov_agent.ini' - expected = { - 'sriov_nic': { - 'physical_device_mappings': 'physnet42:eth42', - }, - } - for section, pairs in expected.iteritems(): - ret = u.validate_config_data(unit, conf, section, pairs) - if ret: - message = "sriov agent config error: {}".format(ret) - amulet.raise_status(amulet.FAIL, msg=message) - - # the CI environment does not expose an actual SR-IOV NIC to the - # functional tests. consequently the neutron-sriov agent will not - # run, and the charm will update its status as such. this will prevent - # the success of pause/resume test. - # - # disable sriov after validation of config file is complete. - u.log.info('Disabling SR-IOV after verifying config file data...') - configs = { - 'neutron-openvswitch': {'enable-sriov': False} - } - super(NeutronOVSBasicDeployment, self)._configure_services(configs) - - u.log.info('Waiting for config-change to complete...') - self._wait_and_check() - - u.log.debug('OK') - - def test_rabbitmq_amqp_relation(self): - """Verify data in rabbitmq-server/neutron-openvswitch amqp relation""" - unit = self.rabbitmq_sentry - relation = ['amqp', 'neutron-openvswitch:amqp'] - expected = { - 'private-address': u.valid_ip, - 'password': u.not_null, - 'hostname': u.valid_ip - } - - ret = u.validate_relation_data(unit, relation, expected) - if ret: - message = u.relation_error('rabbitmq amqp', ret) - amulet.raise_status(amulet.FAIL, msg=message) - - def test_nova_compute_relation(self): - """Verify the nova-compute to neutron-openvswitch relation data""" - unit = self.compute_sentry - relation = ['neutron-plugin', 'neutron-openvswitch:neutron-plugin'] - expected = { - 'private-address': u.valid_ip, - } - - ret = u.validate_relation_data(unit, relation, expected) - if ret: - message = u.relation_error('nova-compute neutron-plugin', ret) - amulet.raise_status(amulet.FAIL, msg=message) - - def test_neutron_api_relation(self): - """Verify the neutron-api to neutron-openvswitch relation data""" - unit = self.neutron_api_sentry - relation = ['neutron-plugin-api', - 'neutron-openvswitch:neutron-plugin-api'] - expected = { - 'private-address': u.valid_ip, - } - - ret = u.validate_relation_data(unit, relation, expected) - if ret: - message = u.relation_error('neutron-api neutron-plugin-api', ret) - amulet.raise_status(amulet.FAIL, msg=message) - - def process_ret(self, ret=None, message=None): - if ret: - amulet.raise_status(amulet.FAIL, msg=message) - - def check_ml2_setting_propagation(self, service, charm_key, - config_file_key, vpair, - section): - - # Needs love - test actions not clear in log - unit = self.compute_sentry - if self._get_openstack_release() >= self.trusty_mitaka: - conf = "/etc/neutron/plugins/ml2/openvswitch_agent.ini" - else: - conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" - for value in vpair: - self.d.configure(service, {charm_key: value}) - self._wait_and_check(sleep=60) - ret = u.validate_config_data(unit, conf, section, - {config_file_key: value}) - msg = "Propagation error, expected %s=%s" % (config_file_key, - value) - self.process_ret(ret=ret, message=msg) - - def test_l2pop_propagation(self): - """Verify that neutron-api l2pop setting propagates to neutron-ovs""" - - # Needs love - not idempotent - self.check_ml2_setting_propagation('neutron-api', - 'l2-population', - 'l2_population', - ['False', 'True'], - 'agent') - - def test_nettype_propagation(self): - """Verify that neutron-api nettype setting propagates to neutron-ovs""" - - # Needs love - not idempotent - self.check_ml2_setting_propagation('neutron-api', - 'overlay-network-type', - 'tunnel_types', - ['vxlan', 'gre'], - 'agent') - - def test_secgroup_propagation_local_override(self): - """Verify disable-security-groups overrides what neutron-api says""" - - # Needs love - not idempotent - unit = self.compute_sentry - if self._get_openstack_release() >= self.trusty_mitaka: - conf = "/etc/neutron/plugins/ml2/openvswitch_agent.ini" - else: - conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" - self.d.configure('neutron-api', {'neutron-security-groups': 'True'}) - self.d.configure('neutron-openvswitch', - {'disable-security-groups': 'True'}) - self._wait_and_check() - ret = u.validate_config_data(unit, conf, 'securitygroup', - {'enable_security_group': 'False'}) - msg = "Propagation error, expected %s=%s" % ('enable_security_group', - 'False') - self.process_ret(ret=ret, message=msg) - self.d.configure('neutron-openvswitch', - {'disable-security-groups': 'False'}) - self.d.configure('neutron-api', {'neutron-security-groups': 'True'}) - self._wait_and_check() - ret = u.validate_config_data(unit, conf, 'securitygroup', - {'enable_security_group': 'True'}) - - def test_z_restart_on_config_change(self): - """Verify that the specified services are restarted when the - config is changed.""" - - sentry = self.n_ovs_sentry - juju_service = 'neutron-openvswitch' - - # Expected default and alternate values - set_default = {'debug': 'False'} - set_alternate = {'debug': 'True'} - - # Services which are expected to restart upon config change, - # and corresponding config files affected by the change - conf_file = '/etc/neutron/neutron.conf' - services = { - 'neutron-openvswitch-agent': conf_file - } - - # Make config change, check for svc restart, conf file mod time change - u.log.debug('Making config change on {}...'.format(juju_service)) - mtime = u.get_sentry_time(sentry) - self.d.configure(juju_service, set_alternate) - self._wait_and_check() - - sleep_time = 30 - for s, conf_file in services.iteritems(): - u.log.debug("Checking that service restarted: {}".format(s)) - if not u.validate_service_config_changed( - sentry, mtime, s, conf_file, sleep_time=sleep_time, - pgrep_full=self.pgrep_full): - self.d.configure(juju_service, set_default) - self._wait_and_check() - msg = "service {} didn't restart after config change".format(s) - amulet.raise_status(amulet.FAIL, msg=msg) - - u.log.debug('OK') - - def test_400_enable_qos(self): - """Check qos settings set via neutron-api charm""" - if self._get_openstack_release() >= self.trusty_mitaka: - unit = self.n_ovs_sentry - set_default = {'enable-qos': 'False'} - set_alternate = {'enable-qos': 'True'} - self.d.configure('neutron-api', set_alternate) - self._wait_and_check(sleep=60) - qos_plugin = 'qos' - config = u._get_config( - self.neutron_api_sentry, '/etc/neutron/neutron.conf') - service_plugins = config.get( - 'DEFAULT', - 'service_plugins').split(',') - if qos_plugin not in service_plugins: - message = "{} not in service_plugins".format(qos_plugin) - amulet.raise_status(amulet.FAIL, msg=message) - - config = u._get_config( - unit, - '/etc/neutron/plugins/ml2/openvswitch_agent.ini') - extensions = config.get('agent', 'extensions').split(',') - if qos_plugin not in extensions: - message = "qos not in extensions" - amulet.raise_status(amulet.FAIL, msg=message) - - u.log.debug('Setting QoS back to {}'.format( - set_default['enable-qos'])) - self.d.configure('neutron-api', set_default) - self._wait_and_check() - u.log.debug('OK') - - def test_910_pause_and_resume(self): - """The services can be paused and resumed. """ - u.log.debug('Checking pause and resume actions...') - sentry_unit = self.n_ovs_sentry - - assert u.status_get(sentry_unit)[0] == "active" - - action_id = u.run_action(sentry_unit, "pause") - assert u.wait_on_action(action_id), "Pause action failed." - assert u.status_get(sentry_unit)[0] == "maintenance" - - action_id = u.run_action(sentry_unit, "resume") - assert u.wait_on_action(action_id), "Resume action failed." - assert u.status_get(sentry_unit)[0] == "active" - u.log.debug('OK') diff --git a/tests/bundles/bionic_queens.yaml b/tests/bundles/bionic_queens.yaml new file mode 100644 index 00000000..e095a043 --- /dev/null +++ b/tests/bundles/bionic_queens.yaml @@ -0,0 +1,89 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/bionic_rocky.yaml b/tests/bundles/bionic_rocky.yaml new file mode 100644 index 00000000..68dc7c93 --- /dev/null +++ b/tests/bundles/bionic_rocky.yaml @@ -0,0 +1,98 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:bionic-rocky + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/bionic_stein.yaml b/tests/bundles/bionic_stein.yaml new file mode 100644 index 00000000..1165a068 --- /dev/null +++ b/tests/bundles/bionic_stein.yaml @@ -0,0 +1,98 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:bionic-stein + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/bionic_train.yaml b/tests/bundles/bionic_train.yaml new file mode 100644 index 00000000..3233a0e1 --- /dev/null +++ b/tests/bundles/bionic_train.yaml @@ -0,0 +1,114 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + '7': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:bionic-train + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + placement: + charm: cs:~openstack-charmers/bionic/placement + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '7' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' +- - 'placement:shared-db' + - 'percona-cluster:shared-db' +- - 'placement:amqp' + - 'rabbitmq-server:amqp' +- - 'placement:placement' + - 'nova-cloud-controller:placement' +- - 'placement:identity-service' + - 'keystone:identity-service' diff --git a/tests/bundles/disco_stein.yaml b/tests/bundles/disco_stein.yaml new file mode 100644 index 00000000..580c667f --- /dev/null +++ b/tests/bundles/disco_stein.yaml @@ -0,0 +1,89 @@ +series: disco + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/trusty_mitaka.yaml b/tests/bundles/trusty_mitaka.yaml new file mode 100644 index 00000000..2a0612e4 --- /dev/null +++ b/tests/bundles/trusty_mitaka.yaml @@ -0,0 +1,98 @@ +series: trusty + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:trusty-mitaka + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + to: + - '6' + percona-cluster: + charm: cs:trusty/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/xenial_mitaka.yaml b/tests/bundles/xenial_mitaka.yaml new file mode 100644 index 00000000..275f977e --- /dev/null +++ b/tests/bundles/xenial_mitaka.yaml @@ -0,0 +1,89 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/xenial_ocata.yaml b/tests/bundles/xenial_ocata.yaml new file mode 100644 index 00000000..b8ed1fef --- /dev/null +++ b/tests/bundles/xenial_ocata.yaml @@ -0,0 +1,98 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:xenial-ocata + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/xenial_pike.yaml b/tests/bundles/xenial_pike.yaml new file mode 100644 index 00000000..e0e2d2a8 --- /dev/null +++ b/tests/bundles/xenial_pike.yaml @@ -0,0 +1,98 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:xenial-pike + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/bundles/xenial_queens.yaml b/tests/bundles/xenial_queens.yaml new file mode 100644 index 00000000..74ee3e5d --- /dev/null +++ b/tests/bundles/xenial_queens.yaml @@ -0,0 +1,98 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + '6': + +applications: + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + to: + - '1' + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + network-manager: Neutron + openstack-origin: cloud:xenial-queens + to: + - '2' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '3' + keystone: + num_units: 1 + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + to: + - '4' + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + to: + - '5' + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + to: + - '6' + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + neutron-openvswitch: + charm: ../../../neutron-openvswitch + +relations: +- - 'neutron-openvswitch:amqp' + - 'rabbitmq-server:amqp' +- - 'neutron-openvswitch:neutron-plugin' + - 'nova-compute:neutron-plugin' +- - 'neutron-openvswitch:neutron-plugin-api' + - 'neutron-api:neutron-plugin-api' +- - 'neutron-api:identity-service' + - 'keystone:identity-service' +- - 'neutron-api:shared-db' + - 'percona-cluster:shared-db' +- - 'neutron-api:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-compute:image-service' + - 'glance:image-service' +- - 'glance:identity-service' + - 'keystone:identity-service' +- - 'glance:shared-db' + - 'percona-cluster:shared-db' +- - 'glance:amqp' + - 'rabbitmq-server:amqp' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:shared-db' + - 'percona-cluster:shared-db' +- - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' +- - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' +- - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' +- - 'nova-cloud-controller:image-service' + - 'glance:image-service' diff --git a/tests/dev-basic-cosmic-rocky b/tests/dev-basic-cosmic-rocky deleted file mode 100755 index d3341ec6..00000000 --- a/tests/dev-basic-cosmic-rocky +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Amulet tests on a basic neutron-openvswitch deployment on cosmic-rocky.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='cosmic') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-queens b/tests/gate-basic-bionic-queens deleted file mode 100755 index d8cb92c8..00000000 --- a/tests/gate-basic-bionic-queens +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Amulet tests on a basic neutron-openvswitch deployment on bionic-queens.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='bionic') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-rocky b/tests/gate-basic-bionic-rocky deleted file mode 100755 index 4f19aa86..00000000 --- a/tests/gate-basic-bionic-rocky +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on bionic-rocky.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='bionic', - openstack='cloud:bionic-rocky', - source='cloud:bionic-updates/rocky') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-stein b/tests/gate-basic-bionic-stein deleted file mode 100755 index d8da3cbd..00000000 --- a/tests/gate-basic-bionic-stein +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on bionic-stein.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='bionic', - openstack='cloud:bionic-stein', - source='cloud:bionic-stein') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-train b/tests/gate-basic-bionic-train deleted file mode 100755 index b9423b20..00000000 --- a/tests/gate-basic-bionic-train +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2019 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on bionic-train.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='bionic', - openstack='cloud:bionic-train', - source='cloud:bionic-train') - deployment.run_tests() diff --git a/tests/gate-basic-disco-stein b/tests/gate-basic-disco-stein deleted file mode 100755 index 8da8f074..00000000 --- a/tests/gate-basic-disco-stein +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Amulet tests on a basic neutron-openvswitch deployment on disco-stein.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='disco') - deployment.run_tests() diff --git a/tests/gate-basic-trusty-mitaka b/tests/gate-basic-trusty-mitaka deleted file mode 100755 index d4299980..00000000 --- a/tests/gate-basic-trusty-mitaka +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on trusty-mitaka.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='trusty', - openstack='cloud:trusty-mitaka', - source='cloud:trusty-updates/mitaka') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-mitaka b/tests/gate-basic-xenial-mitaka deleted file mode 100755 index b7f11f2d..00000000 --- a/tests/gate-basic-xenial-mitaka +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Amulet tests on a basic neutron-openvswitch deployment on xenial-mitaka.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='xenial') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-ocata b/tests/gate-basic-xenial-ocata deleted file mode 100755 index c485d996..00000000 --- a/tests/gate-basic-xenial-ocata +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on xenial-ocata.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='xenial', - openstack='cloud:xenial-ocata', - source='cloud:xenial-updates/ocata') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-pike b/tests/gate-basic-xenial-pike deleted file mode 100755 index 24926669..00000000 --- a/tests/gate-basic-xenial-pike +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on xenial-pike.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='xenial', - openstack='cloud:xenial-pike', - source='cloud:xenial-updates/pike') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-queens b/tests/gate-basic-xenial-queens deleted file mode 100755 index 0f0b62f7..00000000 --- a/tests/gate-basic-xenial-queens +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 Canonical Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NeutronOVSBasicDeployment -"""Amulet tests on a basic neutron-openvswitch deployment on xenial-queens.""" - -from basic_deployment import NeutronOVSBasicDeployment - -if __name__ == '__main__': - deployment = NeutronOVSBasicDeployment(series='xenial', - openstack='cloud:xenial-queens', - source='cloud:xenial-updates/queens') - deployment.run_tests() diff --git a/tests/tests.yaml b/tests/tests.yaml index a03e7bad..cf415ce3 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,18 +1,21 @@ -# Bootstrap the model if necessary. -bootstrap: True -# Re-use bootstrap node. -reset: True -# Use tox/requirements to drive the venv instead of bundletester's venv feature. -virtualenv: False -# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet. -makefile: [] -# Do not specify juju PPA sources. Juju is presumed to be pre-installed -# and configured in all test runner environments. -#sources: -# Do not specify or rely on system packages. -#packages: -# Do not specify python packages here. Use test-requirements.txt -# and tox instead. ie. The venv is constructed before bundletester -# is invoked. -#python-packages: -reset_timeout: 600 +charm_name: neutron-openvswitch + +smoke_bundles: + - bionic_train + +gate_bundles: + - xenial_mitaka + - xenial_ocata + - xenial_pike + - xenial_queens + - bionic_queens + - bionic_rocky + - bionic_stein + - bionic_train + - disco_stein + +dev_bundles: + - bionic_train + +tests: + - zaza.openstack.charm_tests.neutron.tests.NeutronOpenvSwitchTest diff --git a/tox.ini b/tox.ini index b6254346..333e9a98 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ -# Classic charm (with amulet): ./tox.ini +# Classic charm (with zaza): ./tox.ini # This file is managed centrally by release-tools and should not be modified # within individual charm repos. See the 'global' dir contents for available # choices of tox.ini for OpenStack Charms: @@ -15,12 +15,11 @@ skip_missing_interpreters = False setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 CHARM_DIR={envdir} - AMULET_SETUP_TIMEOUT=5400 install_command = pip install {opts} {packages} commands = stestr run --slowest {posargs} whitelist_externals = juju -passenv = HOME TERM AMULET_* CS_* OS_* TEST_* +passenv = HOME TERM CS_* OS_* TEST_* [testenv:py3] basepython = python3 @@ -83,38 +82,45 @@ commands = {posargs} [testenv:func-noop] # DRY RUN - For Debug -basepython = python2.7 +basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy + functest-run-suite --help [testenv:func] # Charm Functional Test # Run all gate tests which are +x (expected to always pass) -basepython = python2.7 +basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy + functest-run-suite --keep-model [testenv:func-smoke] # Charm Functional Test -# Run a specific test as an Amulet smoke test (expected to always pass) -basepython = python2.7 +# Run a specific test as an zaza smoke test (expected to always pass) +basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-train --no-destroy + functest-run-suite --keep-model --smoke [testenv:func-dev] # Charm Functional Test # Run all development test targets which are +x (may not always pass!) -basepython = python2.7 +basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy + functest-run-suite --keep-model --dev + +[testenv:func-target] +basepython = python3 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = + functest-run-suite --keep-model --bundle {posargs} [flake8] ignore = E402,E226