Browse Source

Migrate functional tests from Amulet to Zaza

Change-Id: I936aedf51b2021bf5a09dc4dceb98235aebc0a86
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/17
Closes-Bug: #1828424
changes/13/663313/15
Chris MacNaughton 4 months ago
parent
commit
05f373a27b

+ 2
- 17
test-requirements.txt View File

@@ -7,23 +7,8 @@ mock>=1.2
7 7
 flake8>=2.2.4,<=2.4.1
8 8
 stestr>=2.2.0
9 9
 requests>=2.18.4
10
-# BEGIN: Amulet OpenStack Charm Helper Requirements
11
-# Liberty client lower constraints
12
-amulet>=1.14.3,<2.0;python_version=='2.7'
13
-bundletester>=0.6.1,<1.0;python_version=='2.7'
14
-python-ceilometerclient>=1.5.0
15
-python-cinderclient>=1.4.0
16
-python-glanceclient>=1.1.0
17
-python-heatclient>=0.8.0
18
-python-keystoneclient>=1.7.1
19
-python-neutronclient>=3.1.0
20
-python-novaclient>=2.30.1
21
-python-openstackclient>=1.7.0
22
-python-swiftclient>=2.6.0
23
-pika>=0.10.0,<1.0
24
-distro-info
25
-git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
26
-# END: Amulet OpenStack Charm Helper Requirements
10
+git+https://github.com/openstack-charmers/zaza.git#egg=zaza
11
+git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
27 12
 # NOTE: workaround for 14.04 pip/tox
28 13
 pytz
29 14
 pyudev  # for ceph-* charm unit tests (not mocked?)

+ 0
- 9
tests/README.md View File

@@ -1,9 +0,0 @@
1
-# Overview
2
-
3
-This directory provides Amulet tests to verify basic deployment functionality
4
-from the perspective of this charm, its requirements and its features, as
5
-exercised in a subset of the full OpenStack deployment test bundle topology.
6
-
7
-For full details on functional testing of OpenStack charms please refer to
8
-the [functional testing](http://docs.openstack.org/developer/charm-guide/testing.html#functional-testing)
9
-section of the OpenStack Charm Guide.

+ 0
- 614
tests/basic_deployment.py View File

@@ -1,614 +0,0 @@
1
-# Copyright 2016 Canonical Ltd
2
-#
3
-# Licensed under the Apache License, Version 2.0 (the "License");
4
-# you may not use this file except in compliance with the License.
5
-# You may obtain a copy of the License at
6
-#
7
-#  http://www.apache.org/licenses/LICENSE-2.0
8
-#
9
-# Unless required by applicable law or agreed to in writing, software
10
-# distributed under the License is distributed on an "AS IS" BASIS,
11
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-# See the License for the specific language governing permissions and
13
-# limitations under the License.
14
-
15
-import amulet
16
-
17
-from charmhelpers.contrib.openstack.amulet.deployment import (
18
-    OpenStackAmuletDeployment
19
-)
20
-
21
-from charmhelpers.contrib.openstack.amulet.utils import (
22
-    OpenStackAmuletUtils,
23
-    DEBUG,
24
-    # ERROR
25
-)
26
-
27
-# Use DEBUG to turn on debug logging
28
-u = OpenStackAmuletUtils(DEBUG)
29
-
30
-
31
-class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
32
-    """Amulet tests on a basic neutron-api deployment."""
33
-
34
-    def __init__(self, series, openstack=None, source=None,
35
-                 stable=False):
36
-        """Deploy the entire test environment."""
37
-        super(NeutronAPIBasicDeployment, self).__init__(series, openstack,
38
-                                                        source, stable)
39
-        self._add_services()
40
-        self._add_relations()
41
-        self._configure_services()
42
-        self._deploy()
43
-
44
-        u.log.info('Waiting on extended status checks...')
45
-        self.exclude_services = []
46
-        self._auto_wait_for_status(exclude_services=self.exclude_services)
47
-
48
-        self.d.sentry.wait()
49
-        self._initialize_tests()
50
-
51
-    def _assert_services(self, should_run):
52
-        services = ("neutron-server", "apache2", "haproxy")
53
-        u.get_unit_process_ids(
54
-            {self.neutron_api_sentry: services},
55
-            expect_success=should_run, pgrep_full=self.pgrep_full)
56
-
57
-    def _add_services(self):
58
-        """Add services
59
-
60
-           Add the services that we're testing, where neutron-api is local,
61
-           and the rest of the service are from lp branches that are
62
-           compatible with the local charm (e.g. stable or next).
63
-           """
64
-        this_service = {'name': 'neutron-api'}
65
-        other_services = [
66
-            {'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
67
-            {'name': 'rabbitmq-server'},
68
-            {'name': 'keystone'},
69
-            {'name': 'glance'},  # to satisfy workload status
70
-            {'name': 'neutron-openvswitch'},
71
-            {'name': 'nova-cloud-controller'},
72
-            {'name': 'neutron-gateway'},
73
-            {'name': 'nova-compute'}
74
-        ]
75
-        super(NeutronAPIBasicDeployment, self)._add_services(this_service,
76
-                                                             other_services)
77
-
78
-    def _add_relations(self):
79
-        """Add all of the relations for the services."""
80
-        relations = {
81
-            'neutron-api:shared-db': 'percona-cluster:shared-db',
82
-            'neutron-api:amqp': 'rabbitmq-server:amqp',
83
-            'neutron-api:neutron-api': 'nova-cloud-controller:neutron-api',
84
-            'neutron-api:neutron-plugin-api': 'neutron-gateway:'
85
-                                              'neutron-plugin-api',
86
-            'neutron-api:identity-service': 'keystone:identity-service',
87
-            'keystone:shared-db': 'percona-cluster:shared-db',
88
-            'nova-compute:neutron-plugin': 'neutron-openvswitch:'
89
-                                           'neutron-plugin',
90
-            'nova-cloud-controller:shared-db': 'percona-cluster:shared-db',
91
-            'neutron-gateway:amqp': 'rabbitmq-server:amqp',
92
-            'nova-cloud-controller:amqp': 'rabbitmq-server:amqp',
93
-            'nova-compute:amqp': 'rabbitmq-server:amqp',
94
-            'neutron-openvswitch:amqp': 'rabbitmq-server:amqp',
95
-            'nova-cloud-controller:identity-service': 'keystone:'
96
-                                                      'identity-service',
97
-            'nova-cloud-controller:cloud-compute': 'nova-compute:'
98
-                                                   'cloud-compute',
99
-            'glance:identity-service': 'keystone:identity-service',
100
-            'glance:shared-db': 'percona-cluster:shared-db',
101
-            'glance:amqp': 'rabbitmq-server:amqp',
102
-            'nova-compute:image-service': 'glance:image-service',
103
-            'nova-cloud-controller:image-service': 'glance:image-service',
104
-            'nova-cloud-controller:quantum-network-service':
105
-            'neutron-gateway:quantum-network-service',
106
-        }
107
-
108
-        # NOTE(beisner): relate this separately due to the resulting
109
-        # duplicate dictionary key if included in the relations dict.
110
-        relations_more = {
111
-            'neutron-api:neutron-plugin-api': 'neutron-openvswitch:'
112
-                                              'neutron-plugin-api',
113
-        }
114
-        super(NeutronAPIBasicDeployment, self)._add_relations(relations)
115
-        super(NeutronAPIBasicDeployment, self)._add_relations(relations_more)
116
-
117
-    def _configure_services(self):
118
-        """Configure all of the services."""
119
-        neutron_api_config = {}
120
-        neutron_api_config['enable-sriov'] = True
121
-        neutron_api_config['supported-pci-vendor-devs'] = '8086:1515'
122
-
123
-        if self._get_openstack_release() >= self.trusty_mitaka:
124
-            neutron_api_config['enable-ml2-dns'] = True
125
-            # openstack.example. is the default but be explicit for the test
126
-            neutron_api_config['dns-domain'] = 'openstack.example.'
127
-
128
-        keystone_config = {'admin-password': 'openstack',
129
-                           'admin-token': 'ubuntutesting'}
130
-        nova_cc_config = {'network-manager': 'Neutron'}
131
-        pxc_config = {
132
-            'dataset-size': '25%',
133
-            'max-connections': 1000,
134
-            'root-password': 'ChangeMe123',
135
-            'sst-password': 'ChangeMe123',
136
-        }
137
-
138
-        configs = {
139
-            'neutron-api': neutron_api_config,
140
-            'keystone': keystone_config,
141
-            'percona-cluster': pxc_config,
142
-            'nova-cloud-controller': nova_cc_config,
143
-        }
144
-        super(NeutronAPIBasicDeployment, self)._configure_services(configs)
145
-
146
-    def _initialize_tests(self):
147
-        """Perform final initialization before tests get run."""
148
-        # Access the sentries for inspecting service units
149
-        self.pxc_sentry = self.d.sentry['percona-cluster'][0]
150
-        self.keystone_sentry = self.d.sentry['keystone'][0]
151
-        self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0]
152
-        self.nova_cc_sentry = self.d.sentry['nova-cloud-controller'][0]
153
-        self.neutron_gw_sentry = self.d.sentry['neutron-gateway'][0]
154
-        self.neutron_api_sentry = self.d.sentry['neutron-api'][0]
155
-        self.neutron_ovs_sentry = self.d.sentry['neutron-openvswitch'][0]
156
-        self.nova_compute_sentry = self.d.sentry['nova-compute'][0]
157
-
158
-        # pidof is failing to find neutron-server on stein
159
-        # use pgrep instead.
160
-        if self._get_openstack_release() >= self.bionic_stein:
161
-            self.pgrep_full = True
162
-        else:
163
-            self.pgrep_full = False
164
-
165
-        u.log.debug('openstack release val: {}'.format(
166
-            self._get_openstack_release()))
167
-        u.log.debug('openstack release str: {}'.format(
168
-            self._get_openstack_release_string()))
169
-
170
-    def test_100_services(self):
171
-        """Verify the expected services are running on the corresponding
172
-           service units."""
173
-        u.log.debug('Checking status of system services...')
174
-        neutron_api_services = ['neutron-server']
175
-        nova_cc_services = ['nova-api-os-compute',
176
-                            'nova-cert',
177
-                            'nova-scheduler',
178
-                            'nova-conductor']
179
-
180
-        if self._get_openstack_release() >= self.xenial_newton:
181
-            neutron_services = ['neutron-dhcp-agent',
182
-                                'neutron-lbaasv2-agent',
183
-                                'neutron-metadata-agent',
184
-                                'neutron-openvswitch-agent']
185
-            nova_cc_services.remove('nova-cert')
186
-        elif self._get_openstack_release() >= self.trusty_mitaka and \
187
-                self._get_openstack_release() < self.xenial_newton:
188
-            neutron_services = ['neutron-dhcp-agent',
189
-                                'neutron-lbaas-agent',
190
-                                'neutron-metadata-agent',
191
-                                'neutron-openvswitch-agent']
192
-        else:
193
-            neutron_services = ['neutron-dhcp-agent',
194
-                                'neutron-lbaas-agent',
195
-                                'neutron-metadata-agent',
196
-                                'neutron-plugin-openvswitch-agent']
197
-
198
-        if self._get_openstack_release() <= self.trusty_icehouse:
199
-            neutron_services.append('neutron-vpn-agent')
200
-
201
-        if self._get_openstack_release() < self.trusty_kilo:
202
-            neutron_services.append('neutron-metering-agent')
203
-
204
-        services = {
205
-            self.neutron_gw_sentry: neutron_services,
206
-            self.neutron_api_sentry: neutron_api_services,
207
-        }
208
-
209
-        ret = u.validate_services_by_name(services)
210
-        if ret:
211
-            amulet.raise_status(amulet.FAIL, msg=ret)
212
-
213
-    def test_110_memcache(self):
214
-        u.validate_memcache(self.neutron_api_sentry,
215
-                            '/etc/neutron/neutron.conf',
216
-                            self._get_openstack_release(),
217
-                            earliest_release=self.trusty_mitaka)
218
-
219
-    def test_200_neutron_api_shared_db_relation(self):
220
-        """Verify the neutron-api to mysql shared-db relation data"""
221
-        u.log.debug('Checking neutron-api:mysql db relation data...')
222
-        unit = self.neutron_api_sentry
223
-        relation = ['shared-db', 'percona-cluster:shared-db']
224
-        expected = {
225
-            'private-address': u.valid_ip,
226
-            'database': 'neutron',
227
-            'username': 'neutron',
228
-            'hostname': u.valid_ip
229
-        }
230
-
231
-        ret = u.validate_relation_data(unit, relation, expected)
232
-        if ret:
233
-            message = u.relation_error('neutron-api shared-db', ret)
234
-            amulet.raise_status(amulet.FAIL, msg=message)
235
-
236
-    def test_201_shared_db_neutron_api_relation(self):
237
-        """Verify the mysql to neutron-api shared-db relation data"""
238
-        u.log.debug('Checking mysql:neutron-api db relation data...')
239
-        unit = self.pxc_sentry
240
-        relation = ['shared-db', 'neutron-api:shared-db']
241
-        expected = {
242
-            'db_host': u.valid_ip,
243
-            'private-address': u.valid_ip,
244
-            'password': u.not_null
245
-        }
246
-
247
-        ret = u.validate_relation_data(unit, relation, expected)
248
-        if ret:
249
-            message = u.relation_error('mysql shared-db', ret)
250
-            amulet.raise_status(amulet.FAIL, msg=message)
251
-
252
-    def test_202_neutron_api_amqp_relation(self):
253
-        """Verify the neutron-api to rabbitmq-server amqp relation data"""
254
-        u.log.debug('Checking neutron-api:amqp relation data...')
255
-        unit = self.neutron_api_sentry
256
-        relation = ['amqp', 'rabbitmq-server:amqp']
257
-        expected = {
258
-            'username': 'neutron',
259
-            'private-address': u.valid_ip,
260
-            'vhost': 'openstack'
261
-        }
262
-
263
-        ret = u.validate_relation_data(unit, relation, expected)
264
-        if ret:
265
-            message = u.relation_error('neutron-api amqp', ret)
266
-            amulet.raise_status(amulet.FAIL, msg=message)
267
-
268
-    def test_203_amqp_neutron_api_relation(self):
269
-        """Verify the rabbitmq-server to neutron-api amqp relation data"""
270
-        u.log.debug('Checking amqp:neutron-api relation data...')
271
-        unit = self.rabbitmq_sentry
272
-        relation = ['amqp', 'neutron-api:amqp']
273
-        expected = {
274
-            'hostname': u.valid_ip,
275
-            'private-address': u.valid_ip,
276
-            'password': u.not_null
277
-        }
278
-
279
-        ret = u.validate_relation_data(unit, relation, expected)
280
-        if ret:
281
-            message = u.relation_error('rabbitmq amqp', ret)
282
-            amulet.raise_status(amulet.FAIL, msg=message)
283
-
284
-    def test_204_neutron_api_keystone_identity_relation(self):
285
-        """Verify the neutron-api to keystone identity-service relation data"""
286
-        u.log.debug('Checking neutron-api:keystone id relation data...')
287
-        unit = self.neutron_api_sentry
288
-        relation = ['identity-service', 'keystone:identity-service']
289
-        api_ip = unit.relation('identity-service',
290
-                               'keystone:identity-service')['private-address']
291
-        api_endpoint = 'http://{}:9696'.format(api_ip)
292
-        expected = {
293
-            'private-address': u.valid_ip,
294
-            'neutron_region': 'RegionOne',
295
-            'neutron_service': 'neutron',
296
-            'neutron_admin_url': api_endpoint,
297
-            'neutron_internal_url': api_endpoint,
298
-            'neutron_public_url': api_endpoint,
299
-        }
300
-
301
-        ret = u.validate_relation_data(unit, relation, expected)
302
-        if ret:
303
-            message = u.relation_error('neutron-api identity-service', ret)
304
-            amulet.raise_status(amulet.FAIL, msg=message)
305
-
306
-    def test_205_keystone_neutron_api_identity_relation(self):
307
-        """Verify the keystone to neutron-api identity-service relation data"""
308
-        u.log.debug('Checking keystone:neutron-api id relation data...')
309
-        unit = self.keystone_sentry
310
-        relation = ['identity-service', 'neutron-api:identity-service']
311
-        rel_ks_id = unit.relation('identity-service',
312
-                                  'neutron-api:identity-service')
313
-        id_ip = rel_ks_id['private-address']
314
-        expected = {
315
-            'admin_token': 'ubuntutesting',
316
-            'auth_host': id_ip,
317
-            'auth_port': "35357",
318
-            'auth_protocol': 'http',
319
-            'private-address': id_ip,
320
-            'service_host': id_ip,
321
-        }
322
-        ret = u.validate_relation_data(unit, relation, expected)
323
-        if ret:
324
-            message = u.relation_error('neutron-api identity-service', ret)
325
-            amulet.raise_status(amulet.FAIL, msg=message)
326
-
327
-    def test_206_neutron_api_neutron_ovs_plugin_api_relation(self):
328
-        """Verify neutron-api to neutron-openvswitch neutron-plugin-api"""
329
-        u.log.debug('Checking neutron-api:neutron-ovs plugin-api '
330
-                    'relation data...')
331
-        unit = self.neutron_api_sentry
332
-        relation = ['neutron-plugin-api',
333
-                    'neutron-openvswitch:neutron-plugin-api']
334
-
335
-        u.log.debug(unit.relation(relation[0], relation[1]))
336
-        expected = {
337
-            'auth_host': u.valid_ip,
338
-            'auth_port': '35357',
339
-            'auth_protocol': 'http',
340
-            'enable-dvr': 'False',
341
-            'enable-l3ha': 'False',
342
-            'l2-population': 'True',
343
-            'neutron-security-groups': 'False',
344
-            'overlay-network-type': 'gre',
345
-            'private-address': u.valid_ip,
346
-            'region': 'RegionOne',
347
-            'service_host': u.valid_ip,
348
-            'service_password': u.not_null,
349
-            'service_port': '5000',
350
-            'service_protocol': 'http',
351
-            'service_tenant': 'services',
352
-            'service_username': 'neutron',
353
-        }
354
-
355
-        if self._get_openstack_release() >= self.trusty_mitaka:
356
-            expected.update({
357
-                'dns-domain': 'openstack.example.',
358
-            })
359
-
360
-        ret = u.validate_relation_data(unit, relation, expected)
361
-        if ret:
362
-            message = u.relation_error(
363
-                'neutron-api neutron-ovs neutronplugin-api', ret)
364
-            amulet.raise_status(amulet.FAIL, msg=message)
365
-
366
-    def test_207_neutron_ovs_neutron_api_plugin_api_relation(self):
367
-        """Verify neutron-openvswitch to neutron-api neutron-plugin-api"""
368
-        u.log.debug('Checking neutron-ovs:neutron-api plugin-api '
369
-                    'relation data...')
370
-        unit = self.neutron_ovs_sentry
371
-        relation = ['neutron-plugin-api',
372
-                    'neutron-api:neutron-plugin-api']
373
-        expected = {
374
-            'private-address': u.valid_ip,
375
-        }
376
-
377
-        ret = u.validate_relation_data(unit, relation, expected)
378
-        if ret:
379
-            message = u.relation_error('neutron-api neutron-plugin-api', ret)
380
-            amulet.raise_status(amulet.FAIL, msg=message)
381
-
382
-    def test_208_neutron_api_novacc_relation(self):
383
-        """Verify the neutron-api to nova-cloud-controller relation data"""
384
-        u.log.debug('Checking neutron-api:novacc relation data...')
385
-        unit = self.neutron_api_sentry
386
-        relation = ['neutron-api', 'nova-cloud-controller:neutron-api']
387
-        api_ip = unit.relation('identity-service',
388
-                               'keystone:identity-service')['private-address']
389
-        api_endpoint = 'http://{}:9696'.format(api_ip)
390
-        expected = {
391
-            'private-address': api_ip,
392
-            'neutron-plugin': 'ovs',
393
-            'neutron-security-groups': "no",
394
-            'neutron-url': api_endpoint,
395
-        }
396
-        ret = u.validate_relation_data(unit, relation, expected)
397
-        if ret:
398
-            message = u.relation_error('neutron-api neutron-api', ret)
399
-            amulet.raise_status(amulet.FAIL, msg=message)
400
-
401
-    def test_209_novacc_neutron_api_relation(self):
402
-        """Verify the nova-cloud-controller to neutron-api relation data"""
403
-        u.log.debug('Checking novacc:neutron-api relation data...')
404
-        unit = self.nova_cc_sentry
405
-        relation = ['neutron-api', 'neutron-api:neutron-api']
406
-        cc_ip = unit.relation('neutron-api',
407
-                              'neutron-api:neutron-api')['private-address']
408
-        cc_endpoint = 'http://{}:8774/v2'.format(cc_ip)
409
-        expected = {
410
-            'private-address': cc_ip,
411
-            'nova_url': cc_endpoint,
412
-        }
413
-        ret = u.validate_relation_data(unit, relation, expected)
414
-        if ret:
415
-            message = u.relation_error('nova-cc neutron-api', ret)
416
-            amulet.raise_status(amulet.FAIL, msg=message)
417
-
418
-    def test_301_ml2_config(self):
419
-        """Verify the data in the ml2 config file. This is only available
420
-           since icehouse."""
421
-        u.log.debug('Checking ml2 config file data...')
422
-        unit = self.neutron_api_sentry
423
-        conf = '/etc/neutron/plugins/ml2/ml2_conf.ini'
424
-        neutron_api_relation = unit.relation(
425
-            'shared-db', 'percona-cluster:shared-db')
426
-
427
-        expected = {
428
-            'ml2': {
429
-                'type_drivers': 'gre,vlan,flat,local',
430
-                'tenant_network_types': 'gre,vlan,flat,local',
431
-            },
432
-            'ml2_type_gre': {
433
-                'tunnel_id_ranges': '1:1000'
434
-            },
435
-            'ml2_type_vxlan': {
436
-                'vni_ranges': '1001:2000'
437
-            },
438
-            'ovs': {
439
-                'enable_tunneling': 'True',
440
-                'local_ip': neutron_api_relation['private-address']
441
-            },
442
-            'agent': {
443
-                'tunnel_types': 'gre',
444
-            },
445
-            'securitygroup': {
446
-                'enable_security_group': 'False',
447
-            },
448
-        }
449
-
450
-        if self._get_openstack_release() < self.trusty_kilo:
451
-            # Pre-Kilo
452
-            expected['ml2'].update({
453
-                'mechanism_drivers': 'openvswitch,hyperv,l2population'
454
-            })
455
-        elif self._get_openstack_release() == self.trusty_liberty:
456
-            # Liberty
457
-            expected['ml2'].update({
458
-                'mechanism_drivers': 'openvswitch,l2population,sriovnicswitch'
459
-            })
460
-        else:
461
-            # Juno, Kilo, Mitaka and newer
462
-            expected['ml2'].update({
463
-                'mechanism_drivers': 'openvswitch,hyperv,l2population'
464
-                                     ',sriovnicswitch'
465
-            })
466
-
467
-        if ('kilo' <= self._get_openstack_release() <= 'mitaka'):
468
-            # Kilo through Mitaka require supported_pci_vendor_devs set
469
-            expected['ml2_sriov'].update({
470
-                'supported_pci_vendor_devs': '8086:1515',
471
-            })
472
-
473
-        if self._get_openstack_release() >= self.xenial_queens:
474
-            expected['ml2'].update({
475
-                'extension_drivers': 'dns_domain_ports',
476
-            })
477
-        elif self._get_openstack_release() >= self.trusty_mitaka:
478
-            expected['ml2'].update({
479
-                'extension_drivers': 'dns',
480
-            })
481
-
482
-        for section, pairs in expected.iteritems():
483
-            ret = u.validate_config_data(unit, conf, section, pairs)
484
-            if ret:
485
-                message = "ml2 config error: {}".format(ret)
486
-                amulet.raise_status(amulet.FAIL, msg=message)
487
-
488
-    def test_400_enable_qos(self):
489
-        """Check qos settings"""
490
-        if self._get_openstack_release() >= self.trusty_mitaka:
491
-            u.log.debug('Checking QoS setting in neutron-api '
492
-                        'neutron-openvswitch relation data...')
493
-            unit = self.neutron_api_sentry
494
-            relation = ['neutron-plugin-api',
495
-                        'neutron-openvswitch:neutron-plugin-api']
496
-
497
-            set_default = {'enable-qos': 'False'}
498
-            set_alternate = {'enable-qos': 'True'}
499
-            self.d.configure('neutron-api', set_alternate)
500
-
501
-            relation_data = unit.relation(relation[0], relation[1])
502
-            if relation_data['enable-qos'] != 'True':
503
-                message = ("enable-qos setting not set properly on "
504
-                           "neutron-plugin-api relation")
505
-                amulet.raise_status(amulet.FAIL, msg=message)
506
-
507
-            qos_plugin = 'qos'
508
-            config = u._get_config(unit, '/etc/neutron/neutron.conf')
509
-            service_plugins = config.get(
510
-                'DEFAULT',
511
-                'service_plugins').split(',')
512
-            if qos_plugin not in service_plugins:
513
-                message = "{} not in service_plugins".format(qos_plugin)
514
-                amulet.raise_status(amulet.FAIL, msg=message)
515
-
516
-            u.log.debug('Setting QoS back to {}'.format(
517
-                set_default['enable-qos']))
518
-            self.d.configure('neutron-api', set_default)
519
-            u.log.debug('OK')
520
-
521
-    def test_500_enable_vlan_trunking(self):
522
-        """Check VLAN trunking"""
523
-        if self._get_openstack_release() >= self.xenial_newton:
524
-            u.log.debug('Checking VLAN trunking setting in neutron-api '
525
-                        'neutron-openvswitch relation data...')
526
-            unit = self.neutron_api_sentry
527
-            relation = ['neutron-plugin-api',
528
-                        'neutron-openvswitch:neutron-plugin-api']
529
-
530
-            set_default = {'enable-vlan-trunking': 'False'}
531
-            set_alternate = {'enable-vlan-trunking': 'True'}
532
-            self.d.configure('neutron-api', set_alternate)
533
-
534
-            relation_data = unit.relation(relation[0], relation[1])
535
-            if relation_data['enable-vlan-trunking'] != 'True':
536
-                message = ("enable-vlan-trunking setting not set properly on "
537
-                           "neutron-plugin-api relation")
538
-                amulet.raise_status(amulet.FAIL, msg=message)
539
-
540
-            vlan_trunking_plugin = 'trunk'
541
-            config = u._get_config(unit, '/etc/neutron/neutron.conf')
542
-            service_plugins = config.get(
543
-                'DEFAULT',
544
-                'service_plugins').split(',')
545
-            if vlan_trunking_plugin not in service_plugins:
546
-                message = "{} not in service_plugins"\
547
-                    .format(vlan_trunking_plugin)
548
-                amulet.raise_status(amulet.FAIL, msg=message)
549
-
550
-            u.log.debug('Setting VLAN trunking back to {}'.format(
551
-                set_default['enable-vlan-trunking']))
552
-            self.d.configure('neutron-api', set_default)
553
-            u.log.debug('OK')
554
-
555
-    def test_501_security_checklist_action(self):
556
-        """Verify expected result on a default install"""
557
-        u.log.debug("Testing security-checklist")
558
-        sentry_unit = self.neutron_api_sentry
559
-
560
-        action_id = u.run_action(sentry_unit, "security-checklist")
561
-        u.wait_on_action(action_id)
562
-        data = amulet.actions.get_action_output(action_id, full_output=True)
563
-        assert data.get(u"status") == "failed", \
564
-            "Security check is expected to not pass by default"
565
-        assert data.get(u"results") is not None
566
-
567
-    def test_900_restart_on_config_change(self):
568
-        """Verify that the specified services are restarted when the
569
-        config is changed."""
570
-
571
-        sentry = self.neutron_api_sentry
572
-        juju_service = 'neutron-api'
573
-
574
-        # Expected default and alternate values
575
-        set_default = {'debug': 'False'}
576
-        set_alternate = {'debug': 'True'}
577
-
578
-        # Services which are expected to restart upon config change,
579
-        # and corresponding config files affected by the change
580
-        services = {'neutron-server': '/etc/neutron/neutron.conf'}
581
-
582
-        # Make config change, check for service restarts
583
-        u.log.debug('Making config change on {}...'.format(juju_service))
584
-        mtime = u.get_sentry_time(sentry)
585
-        self.d.configure(juju_service, set_alternate)
586
-        self._auto_wait_for_status(exclude_services=self.exclude_services)
587
-
588
-        for s, conf_file in services.iteritems():
589
-            u.log.debug("Checking that service restarted: {}".format(s))
590
-            if not u.validate_service_config_changed(
591
-                    sentry, mtime, s,
592
-                    conf_file,
593
-                    retry_count=4,
594
-                    retry_sleep_time=20,
595
-                    sleep_time=20,
596
-                    pgrep_full=self.pgrep_full):
597
-                self.d.configure(juju_service, set_default)
598
-                msg = "service {} didn't restart after config change".format(s)
599
-                amulet.raise_status(amulet.FAIL, msg=msg)
600
-
601
-        self.d.configure(juju_service, set_default)
602
-        u.log.debug('OK')
603
-
604
-    def test_901_pause_resume(self):
605
-        """Test pause and resume actions."""
606
-        self._assert_services(should_run=True)
607
-        action_id = u.run_action(self.neutron_api_sentry, "pause")
608
-        assert u.wait_on_action(action_id), "Pause action failed."
609
-
610
-        self._assert_services(should_run=False)
611
-
612
-        action_id = u.run_action(self.neutron_api_sentry, "resume")
613
-        assert u.wait_on_action(action_id), "Resume action failed"
614
-        self._assert_services(should_run=True)

+ 131
- 0
tests/bundles/bionic-queens.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin distro
3
+
4
+series: &series bionic
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/bionic-rocky.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:bionic-rocky
3
+
4
+series: &series bionic
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/bionic-stein.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:bionic-stein
3
+
4
+series: &series bionic
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/disco-stein.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin distro
3
+
4
+series: &series disco
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/trusty-mitaka.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:trusty-mitaka
3
+
4
+series: &series trusty
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/xenial-mitaka.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin distro
3
+
4
+series: &series xenial
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/xenial-ocata.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:xenial-ocata
3
+
4
+series: &series xenial
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/xenial-pike.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:xenial-pike
3
+
4
+series: &series xenial
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 131
- 0
tests/bundles/xenial-queens.yaml View File

@@ -0,0 +1,131 @@
1
+variables:
2
+  openstack-origin: &openstack-origin cloud:xenial-queens
3
+
4
+series: &series xenial
5
+
6
+machines:
7
+  0:
8
+    constraints: "mem=3072M"
9
+  1: {}
10
+  2: {}
11
+  3: {}
12
+  4: {}
13
+  5: {}
14
+  6: {}
15
+  7:
16
+    constraints: "root-disk=20G mem=4G"
17
+  8:
18
+    constraints: "root-disk=20G mem=4G"
19
+
20
+# We specify machine placements for these to improve iteration
21
+# time, given that machine "0" comes up way before machine "7"
22
+applications:
23
+  percona-cluster:
24
+    charm: cs:~openstack-charmers-next/percona-cluster
25
+    num_units: 1
26
+    options:
27
+      source: *openstack-origin
28
+    to:
29
+      - '0'
30
+  rabbitmq-server:
31
+    charm: cs:~openstack-charmers-next/rabbitmq-server
32
+    num_units: 1
33
+    options:
34
+      source: *openstack-origin
35
+    to:
36
+      - '1'
37
+  neutron-api:
38
+    charm: ../../../neutron-api
39
+    series: *series
40
+    num_units: 1
41
+    options:
42
+      flat-network-providers: physnet1
43
+      neutron-security-groups: true
44
+      openstack-origin: *openstack-origin
45
+    to:
46
+      - '2'
47
+  keystone:
48
+    charm: cs:~openstack-charmers-next/keystone
49
+    num_units: 1
50
+    options:
51
+      openstack-origin: *openstack-origin
52
+    to:
53
+      - '3'
54
+  glance:
55
+    charm: cs:~openstack-charmers-next/glance
56
+    num_units: 1
57
+    options:
58
+      openstack-origin: *openstack-origin
59
+    to:
60
+      - '4'
61
+  neutron-openvswitch:
62
+    charm: cs:~openstack-charmers-next/neutron-openvswitch
63
+  neutron-gateway:
64
+    charm: cs:~openstack-charmers-next/neutron-gateway
65
+    num_units: 1
66
+    options:
67
+      bridge-mappings: physnet1:br-ex
68
+      openstack-origin: *openstack-origin
69
+    to:
70
+      - '5'
71
+  nova-cloud-controller:
72
+    charm: cs:~openstack-charmers-next/nova-cloud-controller
73
+    num_units: 1
74
+    options:
75
+      network-manager: Neutron
76
+      openstack-origin: *openstack-origin
77
+    to:
78
+      - '6'
79
+  nova-compute:
80
+    charm: cs:~openstack-charmers-next/nova-compute
81
+    num_units: 2
82
+    options:
83
+      config-flags: default_ephemeral_format=ext4
84
+      enable-live-migration: true
85
+      enable-resize: true
86
+      migration-auth-type: ssh
87
+      openstack-origin: *openstack-origin
88
+    to:
89
+      - '7'
90
+      - '8'
91
+relations:
92
+  - - 'neutron-api:shared-db'
93
+    - 'percona-cluster:shared-db'
94
+  - - 'neutron-api:amqp'
95
+    - 'rabbitmq-server:amqp'
96
+  - - 'neutron-api:neutron-api'
97
+    - 'nova-cloud-controller:neutron-api'
98
+  - - 'neutron-api:neutron-plugin-api'
99
+    - 'neutron-gateway:neutron-plugin-api'
100
+  - - 'neutron-api:identity-service'
101
+    - 'keystone:identity-service'
102
+  - - 'keystone:shared-db'
103
+    - 'percona-cluster:shared-db'
104
+  - - 'nova-compute:neutron-plugin'
105
+    - 'neutron-openvswitch:neutron-plugin'
106
+  - - 'nova-cloud-controller:shared-db'
107
+    - 'percona-cluster:shared-db'
108
+  - - 'neutron-gateway:amqp'
109
+    - 'rabbitmq-server:amqp'
110
+  - - 'nova-cloud-controller:amqp'
111
+    - 'rabbitmq-server:amqp'
112
+  - - 'nova-compute:amqp'
113
+    - 'rabbitmq-server:amqp'
114
+  - - 'neutron-openvswitch:amqp'
115
+    - 'rabbitmq-server:amqp'
116
+  - - 'nova-cloud-controller:identity-service'
117
+    - 'keystone:identity-service'
118
+  - - 'nova-cloud-controller:cloud-compute'
119
+    - 'nova-compute:cloud-compute'
120
+  - - 'glance:identity-service'
121
+    - 'keystone:identity-service'
122
+  - - 'glance:shared-db'
123
+    - 'percona-cluster:shared-db'
124
+  - - 'glance:amqp'
125
+    - 'rabbitmq-server:amqp'
126
+  - - 'nova-compute:image-service'
127
+    - 'glance:image-service'
128
+  - - 'nova-cloud-controller:image-service'
129
+    - 'glance:image-service'
130
+  - - 'nova-cloud-controller:quantum-network-service'
131
+    - 'neutron-gateway:quantum-network-service'

+ 0
- 23
tests/dev-basic-cosmic-rocky View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on cosmic-rocky."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='cosmic')
23
-    deployment.run_tests()

+ 0
- 23
tests/dev-basic-disco-stein View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on disco-stein."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='disco')
23
-    deployment.run_tests()

+ 0
- 23
tests/gate-basic-bionic-queens View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on bionic-queens."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='bionic')
23
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-bionic-rocky View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on bionic-rocky."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='bionic',
23
-                                           openstack='cloud:bionic-rocky',
24
-                                           source='cloud:bionic-updates/rocky')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-bionic-stein View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on bionic-stein."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='bionic',
23
-                                           openstack='cloud:bionic-stein',
24
-                                           source='cloud:bionic-stein')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-trusty-mitaka View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on trusty-mitaka."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='trusty',
23
-                                           openstack='cloud:trusty-mitaka',
24
-                                           source='cloud:trusty-updates/mitaka')
25
-    deployment.run_tests()

+ 0
- 23
tests/gate-basic-xenial-mitaka View File

@@ -1,23 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on xenial-mitaka."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='xenial')
23
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-ocata View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on xenial-ocata."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='xenial',
23
-                                           openstack='cloud:xenial-ocata',
24
-                                           source='cloud:xenial-updates/ocata')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-pike View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on xenial-pike."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='xenial',
23
-                                           openstack='cloud:xenial-pike',
24
-                                           source='cloud:xenial-updates/pike')
25
-    deployment.run_tests()

+ 0
- 25
tests/gate-basic-xenial-queens View File

@@ -1,25 +0,0 @@
1
-#!/usr/bin/env python
2
-#
3
-# Copyright 2016 Canonical Ltd
4
-#
5
-# Licensed under the Apache License, Version 2.0 (the "License");
6
-# you may not use this file except in compliance with the License.
7
-# You may obtain a copy of the License at
8
-#
9
-#  http://www.apache.org/licenses/LICENSE-2.0
10
-#
11
-# Unless required by applicable law or agreed to in writing, software
12
-# distributed under the License is distributed on an "AS IS" BASIS,
13
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-"""Amulet tests on a basic neutron-api deployment on xenial-queens."""
18
-
19
-from basic_deployment import NeutronAPIBasicDeployment
20
-
21
-if __name__ == '__main__':
22
-    deployment = NeutronAPIBasicDeployment(series='xenial',
23
-                                           openstack='cloud:xenial-queens',
24
-                                           source='cloud:xenial-updates/queens')
25
-    deployment.run_tests()

+ 25
- 18
tests/tests.yaml View File

@@ -1,18 +1,25 @@
1
-# Bootstrap the model if necessary.
2
-bootstrap: True
3
-# Re-use bootstrap node.
4
-reset: True
5
-# Use tox/requirements to drive the venv instead of bundletester's venv feature.
6
-virtualenv: False
7
-# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet.
8
-makefile: []
9
-# Do not specify juju PPA sources.  Juju is presumed to be pre-installed
10
-# and configured in all test runner environments.
11
-#sources:
12
-# Do not specify or rely on system packages.
13
-#packages:
14
-# Do not specify python packages here.  Use test-requirements.txt
15
-# and tox instead.  ie. The venv is constructed before bundletester
16
-# is invoked.
17
-#python-packages:
18
-reset_timeout: 600
1
+charm_name: neutron-api
2
+
3
+gate_bundles:
4
+  - trusty-mitaka
5
+  - xenial-mitaka
6
+  - xenial-ocata
7
+  - xenial-pike
8
+  - xenial-queens
9
+  - bionic-queens
10
+  - bionic-rocky
11
+  - bionic-stein
12
+smoke_bundles:
13
+  - bionic-queens
14
+dev_bundles:
15
+  - cosmic-rocky
16
+  - disco-stein
17
+tests:
18
+  - zaza.openstack.charm_tests.neutron.tests.NeutronApiTest
19
+  - zaza.openstack.charm_tests.neutron.tests.SecurityTest
20
+  - zaza.openstack.charm_tests.neutron.tests.NeutronNetworkingTest
21
+configure:
22
+  - zaza.openstack.charm_tests.glance.setup.add_lts_image
23
+  - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network
24
+  - zaza.openstack.charm_tests.nova.setup.create_flavors
25
+  - zaza.openstack.charm_tests.nova.setup.manage_ssh_key

+ 16
- 47
tox.ini View File

@@ -14,28 +14,23 @@ install_command =
14 14
   pip install {opts} {packages}
15 15
 commands = stestr run {posargs}
16 16
 whitelist_externals = juju
17
-passenv = HOME TERM AMULET_* CS_API_*
17
+passenv = HOME TERM AMULET_* CS_API_* OS_*
18
+deps = -r{toxinidir}/requirements.txt
19
+       -r{toxinidir}/test-requirements.txt
18 20
 
19 21
 [testenv:py27]
20 22
 basepython = python2.7
21
-deps = -r{toxinidir}/requirements.txt
22
-       -r{toxinidir}/test-requirements.txt
23
+deps =
23 24
 commands = /bin/true
24 25
 
25 26
 [testenv:py35]
26 27
 basepython = python3.5
27
-deps = -r{toxinidir}/requirements.txt
28
-       -r{toxinidir}/test-requirements.txt
29 28
 
30 29
 [testenv:py36]
31 30
 basepython = python3.6
32
-deps = -r{toxinidir}/requirements.txt
33
-       -r{toxinidir}/test-requirements.txt
34 31
 
35 32
 [testenv:pep8]
36 33
 basepython = python3
37
-deps = -r{toxinidir}/requirements.txt
38
-       -r{toxinidir}/test-requirements.txt
39 34
 commands = flake8 {posargs} hooks unit_tests tests actions lib
40 35
            charm-proof
41 36
 
@@ -43,8 +38,6 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib
43 38
 # Technique based heavily upon
44 39
 # https://github.com/openstack/nova/blob/master/tox.ini
45 40
 basepython = python3
46
-deps = -r{toxinidir}/requirements.txt
47
-       -r{toxinidir}/test-requirements.txt
48 41
 setenv =
49 42
     {[testenv]setenv}
50 43
     PYTHON=coverage run
@@ -71,49 +64,25 @@ omit =
71 64
 basepython = python3
72 65
 commands = {posargs}
73 66
 
74
-[testenv:func27-noop]
75
-# DRY RUN - For Debug
76
-basepython = python2.7
77
-deps = -r{toxinidir}/requirements.txt
78
-       -r{toxinidir}/test-requirements.txt
79
-commands =
80
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
81
-
82
-[testenv:func27]
83
-# Charm Functional Test
84
-# Run all gate tests which are +x (expected to always pass)
85
-basepython = python2.7
86
-deps = -r{toxinidir}/requirements.txt
87
-       -r{toxinidir}/test-requirements.txt
67
+[testenv:func-noop]
68
+basepython = python3
88 69
 commands =
89
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
70
+    true
90 71
 
91
-[testenv:func27-smoke]
92
-# Charm Functional Test
93
-# Run a specific test as an Amulet smoke test (expected to always pass)
94
-basepython = python2.7
95
-deps = -r{toxinidir}/requirements.txt
96
-       -r{toxinidir}/test-requirements.txt
72
+[testenv:func]
73
+basepython = python3
97 74
 commands =
98
-    bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-rocky --no-destroy
75
+    functest-run-suite --keep-model
99 76
 
100
-[testenv:func27-dfs]
101
-# Charm Functional Test
102
-# Run all deploy-from-source tests which are +x (may not always pass!)
103
-basepython = python2.7
104
-deps = -r{toxinidir}/requirements.txt
105
-       -r{toxinidir}/test-requirements.txt
77
+[testenv:func-smoke]
78
+basepython = python3
106 79
 commands =
107
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
80
+    functest-run-suite --keep-model --smoke
108 81
 
109
-[testenv:func27-dev]
110
-# Charm Functional Test
111
-# Run all development test targets which are +x (may not always pass!)
112
-basepython = python2.7
113
-deps = -r{toxinidir}/requirements.txt
114
-       -r{toxinidir}/test-requirements.txt
82
+[testenv:func-dev]
83
+basepython = python3
115 84
 commands =
116
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
85
+    functest-run-suite --keep-model --dev
117 86
 
118 87
 [flake8]
119 88
 ignore = E402,E226

Loading…
Cancel
Save