Merge "Update amulet test definitions for Newton"
This commit is contained in:
commit
ff91d7197a
@ -48,6 +48,7 @@ options:
|
|||||||
the corresponding OpenStack github branch will be used:
|
the corresponding OpenStack github branch will be used:
|
||||||
* liberty
|
* liberty
|
||||||
* mitaka
|
* mitaka
|
||||||
|
* newton
|
||||||
* master
|
* master
|
||||||
|
|
||||||
The YAML must minimally include requirements and cinder repositories,
|
The YAML must minimally include requirements and cinder repositories,
|
||||||
|
@ -156,7 +156,7 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
|||||||
use_source = list(set(
|
use_source = list(set(
|
||||||
use_source + ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
|
use_source + ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
|
||||||
'ceph-osd', 'ceph-radosgw', 'ceph-mon',
|
'ceph-osd', 'ceph-radosgw', 'ceph-mon',
|
||||||
'ceph-proxy']))
|
'ceph-proxy', 'percona-cluster', 'lxd']))
|
||||||
|
|
||||||
# Charms which can not use openstack-origin, ie. many subordinates
|
# Charms which can not use openstack-origin, ie. many subordinates
|
||||||
no_origin = list(set(
|
no_origin = list(set(
|
||||||
|
@ -306,10 +306,8 @@ class OpenStackAmuletUtils(AmuletUtils):
|
|||||||
password, tenant):
|
password, tenant):
|
||||||
"""Authenticates admin user with cinder."""
|
"""Authenticates admin user with cinder."""
|
||||||
# NOTE(beisner): cinder python client doesn't accept tokens.
|
# NOTE(beisner): cinder python client doesn't accept tokens.
|
||||||
service_ip = \
|
keystone_ip = keystone_sentry.info['public-address']
|
||||||
keystone_sentry.relation('shared-db',
|
ept = "http://{}:5000/v2.0".format(keystone_ip.strip().decode('utf-8'))
|
||||||
'mysql:shared-db')['private-address']
|
|
||||||
ept = "http://{}:5000/v2.0".format(service_ip.strip().decode('utf-8'))
|
|
||||||
return cinder_client.Client(username, password, tenant, ept)
|
return cinder_client.Client(username, password, tenant, ept)
|
||||||
|
|
||||||
def authenticate_keystone_admin(self, keystone_sentry, user, password,
|
def authenticate_keystone_admin(self, keystone_sentry, user, password,
|
||||||
@ -317,10 +315,9 @@ class OpenStackAmuletUtils(AmuletUtils):
|
|||||||
keystone_ip=None):
|
keystone_ip=None):
|
||||||
"""Authenticates admin user with the keystone admin endpoint."""
|
"""Authenticates admin user with the keystone admin endpoint."""
|
||||||
self.log.debug('Authenticating keystone admin...')
|
self.log.debug('Authenticating keystone admin...')
|
||||||
unit = keystone_sentry
|
|
||||||
if not keystone_ip:
|
if not keystone_ip:
|
||||||
keystone_ip = unit.relation('shared-db',
|
keystone_ip = keystone_sentry.info['public-address']
|
||||||
'mysql:shared-db')['private-address']
|
|
||||||
base_ep = "http://{}:35357".format(keystone_ip.strip().decode('utf-8'))
|
base_ep = "http://{}:35357".format(keystone_ip.strip().decode('utf-8'))
|
||||||
if not api_version or api_version == 2:
|
if not api_version or api_version == 2:
|
||||||
ep = base_ep + "/v2.0"
|
ep = base_ep + "/v2.0"
|
||||||
|
@ -229,6 +229,7 @@ GIT_DEFAULT_REPOS = {
|
|||||||
GIT_DEFAULT_BRANCHES = {
|
GIT_DEFAULT_BRANCHES = {
|
||||||
'liberty': 'stable/liberty',
|
'liberty': 'stable/liberty',
|
||||||
'mitaka': 'stable/mitaka',
|
'mitaka': 'stable/mitaka',
|
||||||
|
'newton': 'stable/newton',
|
||||||
'master': 'master',
|
'master': 'master',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -735,12 +736,12 @@ def git_os_codename_install_source(projects_yaml):
|
|||||||
|
|
||||||
if projects in GIT_DEFAULT_BRANCHES.keys():
|
if projects in GIT_DEFAULT_BRANCHES.keys():
|
||||||
if projects == 'master':
|
if projects == 'master':
|
||||||
return 'newton'
|
return 'ocata'
|
||||||
return projects
|
return projects
|
||||||
|
|
||||||
if 'release' in projects:
|
if 'release' in projects:
|
||||||
if projects['release'] == 'master':
|
if projects['release'] == 'master':
|
||||||
return 'newton'
|
return 'ocata'
|
||||||
return projects['release']
|
return projects['release']
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
@ -53,9 +53,10 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
self._deploy()
|
self._deploy()
|
||||||
|
|
||||||
u.log.info('Waiting on extended status checks...')
|
u.log.info('Waiting on extended status checks...')
|
||||||
exclude_services = ['mysql']
|
exclude_services = []
|
||||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||||
|
|
||||||
|
self.d.sentry.wait()
|
||||||
self._initialize_tests()
|
self._initialize_tests()
|
||||||
|
|
||||||
def _add_services(self):
|
def _add_services(self):
|
||||||
@ -66,21 +67,25 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
compatible with the local charm (e.g. stable or next).
|
compatible with the local charm (e.g. stable or next).
|
||||||
"""
|
"""
|
||||||
this_service = {'name': 'cinder'}
|
this_service = {'name': 'cinder'}
|
||||||
other_services = [{'name': 'mysql'}, {'name': 'rabbitmq-server'},
|
other_services = [
|
||||||
{'name': 'keystone'}, {'name': 'glance'}]
|
{'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
|
||||||
|
{'name': 'rabbitmq-server'},
|
||||||
|
{'name': 'keystone'},
|
||||||
|
{'name': 'glance'}
|
||||||
|
]
|
||||||
super(CinderBasicDeployment, self)._add_services(this_service,
|
super(CinderBasicDeployment, self)._add_services(this_service,
|
||||||
other_services)
|
other_services)
|
||||||
|
|
||||||
def _add_relations(self):
|
def _add_relations(self):
|
||||||
"""Add relations for the services."""
|
"""Add relations for the services."""
|
||||||
relations = {
|
relations = {
|
||||||
'keystone:shared-db': 'mysql:shared-db',
|
'keystone:shared-db': 'percona-cluster:shared-db',
|
||||||
'cinder:shared-db': 'mysql:shared-db',
|
'cinder:shared-db': 'percona-cluster:shared-db',
|
||||||
'cinder:identity-service': 'keystone:identity-service',
|
'cinder:identity-service': 'keystone:identity-service',
|
||||||
'cinder:amqp': 'rabbitmq-server:amqp',
|
'cinder:amqp': 'rabbitmq-server:amqp',
|
||||||
'cinder:image-service': 'glance:image-service',
|
'cinder:image-service': 'glance:image-service',
|
||||||
'glance:identity-service': 'keystone:identity-service',
|
'glance:identity-service': 'keystone:identity-service',
|
||||||
'glance:shared-db': 'mysql:shared-db',
|
'glance:shared-db': 'percona-cluster:shared-db',
|
||||||
'glance:amqp': 'rabbitmq-server:amqp'
|
'glance:amqp': 'rabbitmq-server:amqp'
|
||||||
}
|
}
|
||||||
super(CinderBasicDeployment, self)._add_relations(relations)
|
super(CinderBasicDeployment, self)._add_relations(relations)
|
||||||
@ -120,12 +125,21 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
cinder_config['openstack-origin-git'] = \
|
cinder_config['openstack-origin-git'] = \
|
||||||
yaml.dump(openstack_origin_git)
|
yaml.dump(openstack_origin_git)
|
||||||
|
|
||||||
keystone_config = {'admin-password': 'openstack',
|
keystone_config = {
|
||||||
'admin-token': 'ubuntutesting'}
|
'admin-password': 'openstack',
|
||||||
mysql_config = {'dataset-size': '50%'}
|
'admin-token': 'ubuntutesting'
|
||||||
configs = {'cinder': cinder_config,
|
}
|
||||||
|
pxc_config = {
|
||||||
|
'dataset-size': '25%',
|
||||||
|
'max-connections': 1000,
|
||||||
|
'root-password': 'ChangeMe123',
|
||||||
|
'sst-password': 'ChangeMe123',
|
||||||
|
}
|
||||||
|
configs = {
|
||||||
|
'cinder': cinder_config,
|
||||||
'keystone': keystone_config,
|
'keystone': keystone_config,
|
||||||
'mysql': mysql_config}
|
'percona-cluster': pxc_config,
|
||||||
|
}
|
||||||
super(CinderBasicDeployment, self)._configure_services(configs)
|
super(CinderBasicDeployment, self)._configure_services(configs)
|
||||||
|
|
||||||
def _initialize_tests(self):
|
def _initialize_tests(self):
|
||||||
@ -133,7 +147,7 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
# Access the sentries for inspecting service units
|
# Access the sentries for inspecting service units
|
||||||
self.cinder_sentry = self.d.sentry['cinder'][0]
|
self.cinder_sentry = self.d.sentry['cinder'][0]
|
||||||
self.glance_sentry = self.d.sentry['glance'][0]
|
self.glance_sentry = self.d.sentry['glance'][0]
|
||||||
self.mysql_sentry = self.d.sentry['mysql'][0]
|
self.pxc_sentry = self.d.sentry['percona-cluster'][0]
|
||||||
self.keystone_sentry = self.d.sentry['keystone'][0]
|
self.keystone_sentry = self.d.sentry['keystone'][0]
|
||||||
self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0]
|
self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0]
|
||||||
u.log.debug('openstack release val: {}'.format(
|
u.log.debug('openstack release val: {}'.format(
|
||||||
@ -321,7 +335,7 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
# 'cinder-volume'],
|
# 'cinder-volume'],
|
||||||
# self.glance_sentry: ['glance-registry',
|
# self.glance_sentry: ['glance-registry',
|
||||||
# 'glance-api'],
|
# 'glance-api'],
|
||||||
# self.mysql_sentry: ['mysql'],
|
# self.pxc_sentry: ['mysql'],
|
||||||
# self.keystone_sentry: ['keystone'],
|
# self.keystone_sentry: ['keystone'],
|
||||||
# self.rabbitmq_sentry: ['rabbitmq-server']
|
# self.rabbitmq_sentry: ['rabbitmq-server']
|
||||||
# }
|
# }
|
||||||
@ -424,7 +438,7 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
# def test_204_mysql_cinder_db_relation(self):
|
# def test_204_mysql_cinder_db_relation(self):
|
||||||
# """Verify the mysql:glance shared-db relation data"""
|
# """Verify the mysql:glance shared-db relation data"""
|
||||||
# u.log.debug('Checking mysql:cinder db relation data...')
|
# u.log.debug('Checking mysql:cinder db relation data...')
|
||||||
# unit = self.mysql_sentry
|
# unit = self.pxc_sentry
|
||||||
# relation = ['shared-db', 'cinder:shared-db']
|
# relation = ['shared-db', 'cinder:shared-db']
|
||||||
# expected = {
|
# expected = {
|
||||||
# 'private-address': u.valid_ip,
|
# 'private-address': u.valid_ip,
|
||||||
@ -439,7 +453,7 @@ class CinderBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
# """Verify the cinder:mysql shared-db relation data"""
|
# """Verify the cinder:mysql shared-db relation data"""
|
||||||
# u.log.debug('Checking cinder:mysql db relation data...')
|
# u.log.debug('Checking cinder:mysql db relation data...')
|
||||||
# unit = self.cinder_sentry
|
# unit = self.cinder_sentry
|
||||||
# relation = ['shared-db', 'mysql:shared-db']
|
# relation = ['shared-db', 'percona-cluster:shared-db']
|
||||||
# expected = {
|
# expected = {
|
||||||
# 'private-address': u.valid_ip,
|
# 'private-address': u.valid_ip,
|
||||||
# 'hostname': u.valid_ip,
|
# 'hostname': u.valid_ip,
|
||||||
|
@ -156,7 +156,7 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
|||||||
use_source = list(set(
|
use_source = list(set(
|
||||||
use_source + ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
|
use_source + ['mysql', 'mongodb', 'rabbitmq-server', 'ceph',
|
||||||
'ceph-osd', 'ceph-radosgw', 'ceph-mon',
|
'ceph-osd', 'ceph-radosgw', 'ceph-mon',
|
||||||
'ceph-proxy']))
|
'ceph-proxy', 'percona-cluster', 'lxd']))
|
||||||
|
|
||||||
# Charms which can not use openstack-origin, ie. many subordinates
|
# Charms which can not use openstack-origin, ie. many subordinates
|
||||||
no_origin = list(set(
|
no_origin = list(set(
|
||||||
|
@ -306,10 +306,8 @@ class OpenStackAmuletUtils(AmuletUtils):
|
|||||||
password, tenant):
|
password, tenant):
|
||||||
"""Authenticates admin user with cinder."""
|
"""Authenticates admin user with cinder."""
|
||||||
# NOTE(beisner): cinder python client doesn't accept tokens.
|
# NOTE(beisner): cinder python client doesn't accept tokens.
|
||||||
service_ip = \
|
keystone_ip = keystone_sentry.info['public-address']
|
||||||
keystone_sentry.relation('shared-db',
|
ept = "http://{}:5000/v2.0".format(keystone_ip.strip().decode('utf-8'))
|
||||||
'mysql:shared-db')['private-address']
|
|
||||||
ept = "http://{}:5000/v2.0".format(service_ip.strip().decode('utf-8'))
|
|
||||||
return cinder_client.Client(username, password, tenant, ept)
|
return cinder_client.Client(username, password, tenant, ept)
|
||||||
|
|
||||||
def authenticate_keystone_admin(self, keystone_sentry, user, password,
|
def authenticate_keystone_admin(self, keystone_sentry, user, password,
|
||||||
@ -317,10 +315,9 @@ class OpenStackAmuletUtils(AmuletUtils):
|
|||||||
keystone_ip=None):
|
keystone_ip=None):
|
||||||
"""Authenticates admin user with the keystone admin endpoint."""
|
"""Authenticates admin user with the keystone admin endpoint."""
|
||||||
self.log.debug('Authenticating keystone admin...')
|
self.log.debug('Authenticating keystone admin...')
|
||||||
unit = keystone_sentry
|
|
||||||
if not keystone_ip:
|
if not keystone_ip:
|
||||||
keystone_ip = unit.relation('shared-db',
|
keystone_ip = keystone_sentry.info['public-address']
|
||||||
'mysql:shared-db')['private-address']
|
|
||||||
base_ep = "http://{}:35357".format(keystone_ip.strip().decode('utf-8'))
|
base_ep = "http://{}:35357".format(keystone_ip.strip().decode('utf-8'))
|
||||||
if not api_version or api_version == 2:
|
if not api_version or api_version == 2:
|
||||||
ep = base_ep + "/v2.0"
|
ep = base_ep + "/v2.0"
|
||||||
|
@ -1,25 +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 cinder deployment on precise-icehouse."""
|
|
||||||
|
|
||||||
from basic_deployment import CinderBasicDeployment
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
deployment = CinderBasicDeployment(series='precise',
|
|
||||||
openstack='cloud:precise-icehouse',
|
|
||||||
source='cloud:precise-updates/icehouse')
|
|
||||||
deployment.run_tests()
|
|
0
tests/dev-basic-yakkety-newton → tests/gate-basic-yakkety-newton
Executable file → Normal file
0
tests/dev-basic-yakkety-newton → tests/gate-basic-yakkety-newton
Executable file → Normal file
@ -1,6 +1,6 @@
|
|||||||
# Bootstrap the model if necessary.
|
# Bootstrap the model if necessary.
|
||||||
bootstrap: True
|
bootstrap: True
|
||||||
# Re-use bootstrap node instead of destroying/re-bootstrapping.
|
# Re-use bootstrap node.
|
||||||
reset: True
|
reset: True
|
||||||
# Use tox/requirements to drive the venv instead of bundletester's venv feature.
|
# Use tox/requirements to drive the venv instead of bundletester's venv feature.
|
||||||
virtualenv: False
|
virtualenv: False
|
||||||
|
Loading…
Reference in New Issue
Block a user