* Add OpenStackAPITest class which can be used by OpenStack API
charms. It provides the framework for common tests like pause
and resume. It also provides lower level entites like an
authenticated keystone session.
* Add generic openstack resource managment functions to
zaza.utilities.openstack. These are based on existing functions
in charmhelpers. Main difference is that they use tenacity to
manage retry logic and throw AssertionError if then required state
is not reached rather than returning True/False
* Add image management functions to zaza.utilities.openstack.
* Add set of glance setup/configuration/tests. These are equivalent
to the existing glance amulet tests with all the introspection
tests removed (see below for more detail).
Tests replicated here:
test_410_glance_image_create_delete
test_411_set_disk_format
test_900_glance_restart_on_config_change
test_901_pause_resume
Tests removed
test_100_services
test_102_service_catalog
test_104_glance_endpoint
test_106_keystone_endpoint
test_110_users
test_115_memcache
test_200_mysql_glance_db_relation
test_201_glance_mysql_db_relation
test_202_keystone_glance_id_relation
test_203_glance_keystone_id_relation
test_204_rabbitmq_glance_amqp_relation
test_205_glance_rabbitmq_amqp_relation
test_300_glance_api_default_config
test_302_glance_registry_default_config
This pr adds a number of new fuctions to zaza.model. As discussed
zaza.model needs to be broken up as it has become too large. I would
like to continue the discussion around that and submit a subsequent
patch for that at a later date.
The _local_utils module was misnamed as the utilities it contained
may be used outside of zaza proper. For example in mojo.
This change separates the utilities into functional modules:
cli_utils: For utilities pertaining to running scripts from command line.
juju_utils: For utilities pertaining to juju commands.
generic_utils: For helper utilities that are generic in nature.
Without introducing mojoisms into zaza there are some changes that are
required to enable mojo's use of zaza.
The goal is to keep mojo specific utilities in openstack-mojo-specs and
to move any generalized tools here in zaza.
This change updates some generalized zaza tools to enable mojo to use
them.
Currently there is no way for the tests.yaml to specify if the
expected workload status message should be checked as a prefix
or as an exact match. I think the prefix approach actually covers
all our use cases so rather than complicate the tests.yaml
options lets just always use startswith for checks.
The configure.network script had already made this change. Using
run_from_cli ran into the fact that it was not changed in
utilities._local_utils.
Update for consistency.
If the deployment state is assessed before any units have been
provisioned then the checks passes as there are no active units
or units with bad states etc. So, wait for at least one unit to
be provisioned before running checks
* Add the ability to wait for bespoke statuses
This change adds the ability to wait for bespoke work load
statuses and messages. These are defined in the charms tests.yaml
* Add unit tests
* Remove debug print
* Fix typos and add checks for errored units
* Restore juju_wait as openstack_utils imports it
Take the last 12 characters from a uuid for generating the model name.
uuid.uuid4 takes into account the host and the current timestamp and
should be sufficient for our needs.
Issue #34 Long model names cause OpenStack DNS to break. We gain fairly
little by stacking information in the model name.
This change uses zaza-$TIMESTAMP as model names.
Closes Issue: #34