diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index 0118debd..f90fd34d 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -109,6 +109,11 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment): {'name': 'neutron-openvswitch'}, ] other_services += other_ocata_services + if self._get_openstack_release() >= self.bionic_train: + other_train_services = [ + {'name': 'placement'}, + ] + other_services += other_train_services super(NovaCCBasicDeployment, self)._add_services(this_service, other_services) @@ -143,12 +148,20 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment): 'rabbitmq-server:amqp': 'neutron-openvswitch:amqp', } relations.update(ocata_relations) + if self._get_openstack_release() >= self.bionic_train: + train_relations = { + 'placement:shared-db': 'percona-cluster:shared-db', + 'placement:identity-service': 'keystone:identity-service', + 'placement:placement': 'nova-cloud-controller:placement', + } + relations.update(train_relations) super(NovaCCBasicDeployment, self)._add_relations(relations) def _configure_services(self): """Configure all of the services.""" nova_cc_config = {} nova_config = {} + placement_config = {} # Add some rate-limiting options to the charm. These will noop before # icehouse. @@ -174,6 +187,8 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment): 'nova-compute': nova_config, 'percona-cluster': pxc_config, } + if self._get_openstack_release() >= self.bionic_train: + configs['placement'] = placement_config super(NovaCCBasicDeployment, self)._configure_services(configs) diff --git a/tests/gate-basic-bionic-train b/tests/gate-basic-bionic-train new file mode 100755 index 00000000..4c0af9d0 --- /dev/null +++ b/tests/gate-basic-bionic-train @@ -0,0 +1,26 @@ +#!/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 nova cloud controller deployment on + bionic-train.""" + +from basic_deployment import NovaCCBasicDeployment + +if __name__ == '__main__': + deployment = NovaCCBasicDeployment(series='bionic', + openstack='cloud:bionic-train', + source='cloud:bionic-train') + deployment.run_tests() diff --git a/tox.ini b/tox.ini index ce4546b4..b6254346 100644 --- a/tox.ini +++ b/tox.ini @@ -105,7 +105,7 @@ basepython = python2.7 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-stein --no-destroy + bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-train --no-destroy [testenv:func-dev] # Charm Functional Test