summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Beisner <ryan.beisner@canonical.com>2016-11-23 15:25:01 -0600
committerLiam Young <liam.young@canonical.com>2016-12-01 19:03:58 +0000
commitef5a16818b4921139f5a65f762ccb12ddfef6c37 (patch)
treea66b79b38391dbd7ad93d6931afed6f0ebe9d340
parentaa8f65275626bd18685bfc2eaae235d9af7a283c (diff)
downloadcharm-nova-lxd-ef5a16818b4921139f5a65f762ccb12ddfef6c37.zip
charm-nova-lxd-ef5a16818b4921139f5a65f762ccb12ddfef6c37.tar.gz
charm-nova-lxd-ef5a16818b4921139f5a65f762ccb12ddfef6c37.tar.bz2
Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable. - Fix test executable hashbags for virtualenv prep. - Add Yakkety-Newton Amulet test definitions. - Prep Xenial-Ocata Amulet test definitions (not yet enabled). - Prep Zesty-Ocata Amulet test definitions (not yet enabled). - Add Zesty charm series metadata. - Remove Precise charm series metadata if present. - Remove Precise Amulet test definitions if present. - Add CS_API_TIMEOUT & CS_API_URL to tox.ini to control charmstore interaction in Amulet tests - Create flavors to fix Newton+ Amulet tests. Change-Id: I151692df2149fa0c1b882230508e9db760a277a0
-rw-r--r--hooks/charmhelpers/contrib/openstack/amulet/deployment.py35
-rw-r--r--hooks/charmhelpers/contrib/openstack/context.py4
-rw-r--r--hooks/charmhelpers/contrib/openstack/neutron.py2
-rw-r--r--hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka5
-rw-r--r--hooks/charmhelpers/contrib/openstack/utils.py8
-rw-r--r--hooks/charmhelpers/core/kernel_factory/ubuntu.py2
-rw-r--r--hooks/charmhelpers/fetch/ubuntu.py8
-rw-r--r--metadata.yaml1
-rw-r--r--tests/basic_deployment.py8
-rw-r--r--tests/charmhelpers/contrib/openstack/amulet/deployment.py35
-rw-r--r--tests/gate-basic-xenial-ocata25
-rw-r--r--tests/gate-basic-zesty-ocata25
-rw-r--r--tox.ini3
13 files changed, 107 insertions, 54 deletions
diff --git a/hooks/charmhelpers/contrib/openstack/amulet/deployment.py b/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
index 9e0b07f..5c1ce45 100644
--- a/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
+++ b/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
@@ -69,9 +69,9 @@ class OpenStackAmuletDeployment(AmuletDeployment):
# Charms outside the ~openstack-charmers
base_charms = {
- 'mysql': ['precise', 'trusty'],
- 'mongodb': ['precise', 'trusty'],
- 'nrpe': ['precise', 'trusty', 'wily', 'xenial'],
+ 'mysql': ['trusty'],
+ 'mongodb': ['trusty'],
+ 'nrpe': ['trusty', 'xenial'],
}
for svc in other_services:
@@ -260,31 +260,20 @@ class OpenStackAmuletDeployment(AmuletDeployment):
release.
"""
# Must be ordered by OpenStack release (not by Ubuntu release):
- (self.precise_essex, self.precise_folsom, self.precise_grizzly,
- self.precise_havana, self.precise_icehouse,
- self.trusty_icehouse, self.trusty_juno, self.utopic_juno,
- self.trusty_kilo, self.vivid_kilo, self.trusty_liberty,
- self.wily_liberty, self.trusty_mitaka,
- self.xenial_mitaka, self.xenial_newton,
- self.yakkety_newton) = range(16)
+ (self.trusty_icehouse, self.trusty_kilo, self.trusty_liberty,
+ self.trusty_mitaka, self.xenial_mitaka, self.xenial_newton,
+ self.yakkety_newton, self.xenial_ocata, self.zesty_ocata) = range(9)
releases = {
- ('precise', None): self.precise_essex,
- ('precise', 'cloud:precise-folsom'): self.precise_folsom,
- ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
- ('precise', 'cloud:precise-havana'): self.precise_havana,
- ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
('trusty', None): self.trusty_icehouse,
- ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
('trusty', 'cloud:trusty-kilo'): self.trusty_kilo,
('trusty', 'cloud:trusty-liberty'): self.trusty_liberty,
('trusty', 'cloud:trusty-mitaka'): self.trusty_mitaka,
- ('utopic', None): self.utopic_juno,
- ('vivid', None): self.vivid_kilo,
- ('wily', None): self.wily_liberty,
('xenial', None): self.xenial_mitaka,
('xenial', 'cloud:xenial-newton'): self.xenial_newton,
+ ('xenial', 'cloud:xenial-ocata'): self.xenial_ocata,
('yakkety', None): self.yakkety_newton,
+ ('zesty', None): self.zesty_ocata,
}
return releases[(self.series, self.openstack)]
@@ -294,16 +283,10 @@ class OpenStackAmuletDeployment(AmuletDeployment):
Return a string representing the openstack release.
"""
releases = OrderedDict([
- ('precise', 'essex'),
- ('quantal', 'folsom'),
- ('raring', 'grizzly'),
- ('saucy', 'havana'),
('trusty', 'icehouse'),
- ('utopic', 'juno'),
- ('vivid', 'kilo'),
- ('wily', 'liberty'),
('xenial', 'mitaka'),
('yakkety', 'newton'),
+ ('zesty', 'ocata'),
])
if self.openstack:
os_origin = self.openstack.split(':')[1]
diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py
index cbbe466..d5b3a33 100644
--- a/hooks/charmhelpers/contrib/openstack/context.py
+++ b/hooks/charmhelpers/contrib/openstack/context.py
@@ -344,6 +344,10 @@ class IdentityServiceContext(OSContextGenerator):
'auth_protocol': auth_protocol,
'api_version': api_version})
+ if float(api_version) > 2:
+ ctxt.update({'admin_domain_name':
+ rdata.get('service_domain')})
+
if self.context_complete(ctxt):
# NOTE(jamespage) this is required for >= icehouse
# so a missing value just indicates keystone needs
diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py
index 08c86fa..a8f1ed7 100644
--- a/hooks/charmhelpers/contrib/openstack/neutron.py
+++ b/hooks/charmhelpers/contrib/openstack/neutron.py
@@ -32,6 +32,7 @@ def headers_package():
kver = check_output(['uname', '-r']).decode('UTF-8').strip()
return 'linux-headers-%s' % kver
+
QUANTUM_CONF_DIR = '/etc/quantum'
@@ -91,6 +92,7 @@ def quantum_plugins():
}
}
+
NEUTRON_CONF_DIR = '/etc/neutron'
diff --git a/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka b/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka
index dd6f364..7c6f0c3 100644
--- a/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka
+++ b/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka
@@ -3,8 +3,13 @@
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
auth_type = password
+{% if api_version == "3" -%}
+project_domain_name = {{ admin_domain_name }}
+user_domain_name = {{ admin_domain_name }}
+{% else -%}
project_domain_name = default
user_domain_name = default
+{% endif -%}
project_name = {{ admin_tenant_name }}
username = {{ admin_user }}
password = {{ admin_password }}
diff --git a/hooks/charmhelpers/contrib/openstack/utils.py b/hooks/charmhelpers/contrib/openstack/utils.py
index 49767f4..6d544e7 100644
--- a/hooks/charmhelpers/contrib/openstack/utils.py
+++ b/hooks/charmhelpers/contrib/openstack/utils.py
@@ -109,7 +109,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([
('wily', 'liberty'),
('xenial', 'mitaka'),
('yakkety', 'newton'),
- ('zebra', 'ocata'), # TODO: upload with real Z name
+ ('zesty', 'ocata'),
])
@@ -152,6 +152,8 @@ SWIFT_CODENAMES = OrderedDict([
['2.5.0', '2.6.0', '2.7.0']),
('newton',
['2.8.0', '2.9.0', '2.10.0']),
+ ('ocata',
+ ['2.11.0']),
])
# >= Liberty version->codename mapping
@@ -547,6 +549,9 @@ def configure_installation_source(rel):
'newton': 'xenial-updates/newton',
'newton/updates': 'xenial-updates/newton',
'newton/proposed': 'xenial-proposed/newton',
+ 'zesty': 'zesty-updates/ocata',
+ 'zesty/updates': 'xenial-updates/ocata',
+ 'zesty/proposed': 'xenial-proposed/ocata',
}
try:
@@ -680,6 +685,7 @@ def clean_storage(block_device):
else:
zap_disk(block_device)
+
is_ip = ip.is_ip
ns_query = ip.ns_query
get_host_ip = ip.get_host_ip
diff --git a/hooks/charmhelpers/core/kernel_factory/ubuntu.py b/hooks/charmhelpers/core/kernel_factory/ubuntu.py
index 2155964..3de372f 100644
--- a/hooks/charmhelpers/core/kernel_factory/ubuntu.py
+++ b/hooks/charmhelpers/core/kernel_factory/ubuntu.py
@@ -5,7 +5,7 @@ def persistent_modprobe(module):
"""Load a kernel module and configure for auto-load on reboot."""
with open('/etc/modules', 'r+') as modules:
if module not in modules.read():
- modules.write(module)
+ modules.write(module + "\n")
def update_initramfs(version='all'):
diff --git a/hooks/charmhelpers/fetch/ubuntu.py b/hooks/charmhelpers/fetch/ubuntu.py
index fce496b..39b9b80 100644
--- a/hooks/charmhelpers/fetch/ubuntu.py
+++ b/hooks/charmhelpers/fetch/ubuntu.py
@@ -105,6 +105,14 @@ CLOUD_ARCHIVE_POCKETS = {
'newton/proposed': 'xenial-proposed/newton',
'xenial-newton/proposed': 'xenial-proposed/newton',
'xenial-proposed/newton': 'xenial-proposed/newton',
+ # Ocata
+ 'ocata': 'xenial-updates/ocata',
+ 'xenial-ocata': 'xenial-updates/ocata',
+ 'xenial-ocata/updates': 'xenial-updates/ocata',
+ 'xenial-updates/ocata': 'xenial-updates/ocata',
+ 'ocata/proposed': 'xenial-proposed/ocata',
+ 'xenial-ocata/proposed': 'xenial-proposed/ocata',
+ 'xenial-ocata/newton': 'xenial-proposed/ocata',
}
APT_NO_LOCK = 100 # The return code for "couldn't acquire lock" in APT.
diff --git a/metadata.yaml b/metadata.yaml
index 7d3bf2a..4b7306b 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -8,6 +8,7 @@ tags:
- openstack
series:
- xenial
+ - zesty
- yakkety
subordinate: true
peers:
diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py
index 003882b..fe4d403 100644
--- a/tests/basic_deployment.py
+++ b/tests/basic_deployment.py
@@ -203,6 +203,14 @@ class LXDBasicDeployment(OpenStackAmuletDeployment):
password='password',
tenant=self.demo_tenant)
+ self.nova_admin = u.authenticate_nova_user(self.keystone,
+ user='admin',
+ password='openstack',
+ tenant='admin')
+
+ u.create_flavor(nova=self.nova_admin,
+ name='m1.tiny', ram=512, vcpus=1, disk=1)
+
# Authenticate demo user with nova-api
self.nova_demo = u.authenticate_nova_user(self.keystone,
user=self.demo_user,
diff --git a/tests/charmhelpers/contrib/openstack/amulet/deployment.py b/tests/charmhelpers/contrib/openstack/amulet/deployment.py
index 9e0b07f..5c1ce45 100644
--- a/tests/charmhelpers/contrib/openstack/amulet/deployment.py
+++ b/tests/charmhelpers/contrib/openstack/amulet/deployment.py
@@ -69,9 +69,9 @@ class OpenStackAmuletDeployment(AmuletDeployment):
# Charms outside the ~openstack-charmers
base_charms = {
- 'mysql': ['precise', 'trusty'],
- 'mongodb': ['precise', 'trusty'],
- 'nrpe': ['precise', 'trusty', 'wily', 'xenial'],
+ 'mysql': ['trusty'],
+ 'mongodb': ['trusty'],
+ 'nrpe': ['trusty', 'xenial'],
}
for svc in other_services:
@@ -260,31 +260,20 @@ class OpenStackAmuletDeployment(AmuletDeployment):
release.
"""
# Must be ordered by OpenStack release (not by Ubuntu release):
- (self.precise_essex, self.precise_folsom, self.precise_grizzly,
- self.precise_havana, self.precise_icehouse,
- self.trusty_icehouse, self.trusty_juno, self.utopic_juno,
- self.trusty_kilo, self.vivid_kilo, self.trusty_liberty,
- self.wily_liberty, self.trusty_mitaka,
- self.xenial_mitaka, self.xenial_newton,
- self.yakkety_newton) = range(16)
+ (self.trusty_icehouse, self.trusty_kilo, self.trusty_liberty,
+ self.trusty_mitaka, self.xenial_mitaka, self.xenial_newton,
+ self.yakkety_newton, self.xenial_ocata, self.zesty_ocata) = range(9)
releases = {
- ('precise', None): self.precise_essex,
- ('precise', 'cloud:precise-folsom'): self.precise_folsom,
- ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
- ('precise', 'cloud:precise-havana'): self.precise_havana,
- ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
('trusty', None): self.trusty_icehouse,
- ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
('trusty', 'cloud:trusty-kilo'): self.trusty_kilo,
('trusty', 'cloud:trusty-liberty'): self.trusty_liberty,
('trusty', 'cloud:trusty-mitaka'): self.trusty_mitaka,
- ('utopic', None): self.utopic_juno,
- ('vivid', None): self.vivid_kilo,
- ('wily', None): self.wily_liberty,
('xenial', None): self.xenial_mitaka,
('xenial', 'cloud:xenial-newton'): self.xenial_newton,
+ ('xenial', 'cloud:xenial-ocata'): self.xenial_ocata,
('yakkety', None): self.yakkety_newton,
+ ('zesty', None): self.zesty_ocata,
}
return releases[(self.series, self.openstack)]
@@ -294,16 +283,10 @@ class OpenStackAmuletDeployment(AmuletDeployment):
Return a string representing the openstack release.
"""
releases = OrderedDict([
- ('precise', 'essex'),
- ('quantal', 'folsom'),
- ('raring', 'grizzly'),
- ('saucy', 'havana'),
('trusty', 'icehouse'),
- ('utopic', 'juno'),
- ('vivid', 'kilo'),
- ('wily', 'liberty'),
('xenial', 'mitaka'),
('yakkety', 'newton'),
+ ('zesty', 'ocata'),
])
if self.openstack:
os_origin = self.openstack.split(':')[1]
diff --git a/tests/gate-basic-xenial-ocata b/tests/gate-basic-xenial-ocata
new file mode 100644
index 0000000..a5553f7
--- /dev/null
+++ b/tests/gate-basic-xenial-ocata
@@ -0,0 +1,25 @@
+#!/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 lxd deployment on xenial-ocata."""
+
+from basic_deployment import LXDBasicDeployment
+
+if __name__ == '__main__':
+ deployment = LXDBasicDeployment(series='xenial',
+ openstack='cloud:xenial-ocata',
+ source='cloud:xenial-updates/ocata')
+ deployment.run_tests()
diff --git a/tests/gate-basic-zesty-ocata b/tests/gate-basic-zesty-ocata
new file mode 100644
index 0000000..79c938f
--- /dev/null
+++ b/tests/gate-basic-zesty-ocata
@@ -0,0 +1,25 @@
+#!/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 lxd deployment on zesty-ocata."""
+
+from basic_deployment import LXDBasicDeployment
+
+if __name__ == '__main__':
+ deployment = LXDBasicDeployment(
+ series='zesty', openstack=None, source=None,
+ stable=False)
+ deployment.run_tests()
diff --git a/tox.ini b/tox.ini
index d8d8d03..590effc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,9 @@ setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
AMULET_SETUP_TIMEOUT=2700
+ CS_API_TIMEOUT=200
+ CS_API_URL=https://api.jujucharms.com/v4
+
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git