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