Merge next branch

This commit is contained in:
Corey Bryant 2015-04-22 21:48:17 +00:00
commit 25b67ab52c
11 changed files with 55 additions and 15 deletions

View File

@ -18,10 +18,7 @@ test:
# coreycb note: The -v should only be temporary until Amulet sends
# raise_status() messages to stderr:
# https://bugs.launchpad.net/amulet/+bug/1320357
@juju test -v -p AMULET_HTTP_PROXY --timeout 1200 \
00-setup 14-basic-precise-icehouse 15-basic-trusty-icehouse \
16-basic-trusty-icehouse-git 17-basic-trusty-juno \
18-basic-trusty-juno-git
@juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 2700
sync: bin/charm_helpers_sync.py
@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-hooks.yaml

View File

@ -306,17 +306,18 @@ def db_changed():
# acl entry has been added. So, if the db supports passing a list of
# permitted units then check if we're in the list.
allowed_units = relation_get('nova_allowed_units')
if allowed_units and local_unit() not in allowed_units.split():
log('Allowed_units list provided and this unit not present')
return
migrate_nova_database()
log('Triggering remote cloud-compute restarts.')
[compute_joined(rid=rid, remote_restart=True)
for rid in relation_ids('cloud-compute')]
log('Triggering remote cell restarts.')
[nova_cell_relation_joined(rid=rid, remote_restart=True)
for rid in relation_ids('cell')]
conditional_neutron_migration()
if allowed_units and local_unit() in allowed_units.split():
migrate_nova_database()
log('Triggering remote cloud-compute restarts.')
[compute_joined(rid=rid, remote_restart=True)
for rid in relation_ids('cloud-compute')]
log('Triggering remote cell restarts.')
[nova_cell_relation_joined(rid=rid, remote_restart=True)
for rid in relation_ids('cell')]
conditional_neutron_migration()
else:
log('allowed_units either not presented, or local unit '
'not in acl list: %s' % repr(allowed_units))
@hooks.hook('pgsql-nova-db-relation-changed')

10
tests/010-basic-precise-essex Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/python
"""Amulet tests on a basic nova cloud controller deployment on
precise-essex."""
from basic_deployment import NovaCCBasicDeployment
if __name__ == '__main__':
deployment = NovaCCBasicDeployment(series='precise')
deployment.run_tests()

View File

@ -0,0 +1,12 @@
#!/usr/bin/python
"""Amulet tests on a basic nova cloud controller deployment on
trusty-kilo."""
from basic_deployment import NovaCCBasicDeployment
if __name__ == '__main__':
deployment = NovaCCBasicDeployment(series='trusty',
openstack='cloud:trusty-kilo',
source='cloud:trusty-updates/kilo')
deployment.run_tests()

10
tests/018-basic-utopic-juno Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/python
"""Amulet tests on a basic nova cloud controller deployment on
utopic-juno."""
from basic_deployment import NovaCCBasicDeployment
if __name__ == '__main__':
deployment = NovaCCBasicDeployment(series='utopic')
deployment.run_tests()

View File

@ -0,0 +1,10 @@
#!/usr/bin/python
"""Amulet tests on a basic nova cloud controller deployment on
vivid-kilo."""
from basic_deployment import NovaCCBasicDeployment
if __name__ == '__main__':
deployment = NovaCCBasicDeployment(series='vivid')
deployment.run_tests()