Commit Graph

126 Commits

Author SHA1 Message Date
David Ames
77c7f896f7 Bug fixes for mojo's use of zaza
Now with more unit tests!
A couple of minor bug fixes exposed while testing mojo's use of zaza.
2018-05-04 23:09:34 +00:00
Frode Nordahl
85fb7e7f77 Merge pull request #45 from gnuoy/feature/sign-csrs
Add method for signing csrs
2018-05-03 19:21:54 +02:00
Liam Young
34c6431658 Add method for signing csrs 2018-05-03 16:30:06 +00:00
Liam Young
afdee65966 Merge pull request #44 from openstack-charmers/add-utilities-generate-cert
Add utility helper function for generating X.509 certs
2018-05-03 12:03:03 +01:00
Alex Kavanagh
e53b4087e6 Merge pull request #43 from thedac/enable-mojo
Functionality to enable mojo's use of zaza
2018-05-01 17:42:50 +01:00
Frode Nordahl
092c3c1f6b Add utility helper function for generating X.509 certs 2018-05-01 14:17:10 +02:00
David Ames
ae257a0955 Functionality to enable mojo's use of zaza
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.
2018-04-30 16:13:50 +00:00
Liam Young
a314a82d27 Always use startswith for checking WL status msgs (#42)
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.
2018-04-26 11:30:19 +01:00
Ryan Beisner
dad189ca04 Merge pull request #41 from thedac/rename-get-network-config
Rename get_net_info to get_network_config
2018-04-25 20:10:59 -05:00
David Ames
1461761fb8 Rename get_net_info to get_network_config
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.
2018-04-25 15:51:33 -07:00
David Ames
eb78f54508 Merge pull request #40 from gnuoy/increase-deploy-timeout
Bump deploy timeout
2018-04-25 12:07:21 -07:00
Liam Young
34b6f5638a Bump deploy timeout 2018-04-25 18:32:35 +00:00
Frode Nordahl
2698e60ecf Merge pull request #39 from gnuoy/bug/status-race
Fix race in checking deployment complete
2018-04-25 12:49:41 +02:00
Liam Young
d00af5028e Fix race in checking deployment complete
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
2018-04-25 10:32:46 +00:00
Liam Young
68114544bd Add the ability to wait for bespoke statuses (#38)
* 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
2018-04-25 09:48:31 +01:00
Liam Young
9ad502c58c Merge pull request #35 from thedac/issue/34
Use short model names
2018-04-21 07:32:01 +01:00
David Ames
bc89acd838 Merge pull request #24 from gnuoy/feature/optionally-pass-bundle-to-runner
Add option to allow bundle name to be passed to runner
2018-04-20 14:54:38 -07:00
David Ames
b4d55caf19 Use uuid.uuid4 to generate model name
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.
2018-04-20 11:25:24 -07:00
David Ames
8464efab7e Use short model names
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
2018-04-20 10:44:31 -07:00
Frode Nordahl
a87da7afd1 Merge pull request #30 from thedac/feature/dragent
Neutron dynamic routing testing
2018-04-20 19:40:34 +02:00
David Ames
aa6d170a6c Use tenacity for binary back off
Use the tenacity module to handle retry and binary back off of test
BGP test assertions.
2018-04-20 10:22:22 -07:00
Frode Nordahl
42561c71bc Merge pull request #37 from gnuoy/bug/fix-leader-action
Vault charm action needs to be run on leader
2018-04-20 15:57:53 +02:00
Liam Young
a58029fe46 Update doc string 2018-04-20 13:45:41 +00:00
Liam Young
9861ca6f4d Vault charm action needs to be run on leader
The vault charm action to authorise the charm within vault needs to
be run on the leader. This mp adds run_action_on_leader to support
that and updates the tests.
2018-04-20 13:40:52 +00:00
Liam Young
607797c13a Merge pull request #36 from ChrisMacNaughton/test-mode-model
Ensure we use default model constraints
2018-04-20 10:45:26 +01:00
Chris MacNaughton
5e8dd1654d Ensure we use default model constraints
Models which are created by Zaza should enable test mode,
to prevent artificially ticking metrics in the charm store for charm usage.

In addition, models must not retry failed hooks as we
consider a hook failure to be an error.

Closes #33
2018-04-20 08:25:04 +02:00
David Ames
6ad3745206 Separate overcloud and undercloud settings
Changed the name of configure_dragent
Removed the network.yaml file requirement for tests
Made a bright line distinction between declared overcloud network
settings and environment specific undercloud settings
The tests will declare the overcloud settings and acquire the
undercloud settings from environment variables.
2018-04-19 14:42:29 -07:00
Frode Nordahl
fb5befcd3b Merge pull request #32 from gnuoy/feature/add-vault-action-tests
Add tests for vault authorize-charm action
2018-04-19 13:54:30 +02:00
Liam Young
bcfd6aaf30 Add tests for vault authorize-charm action
Add tests for the authorize-charm action on the vault app. To
support this add get_action method to return an applications
actions. However, this is not implemented in libjuju yet so
fallback to subprocess
2018-04-19 11:41:09 +00:00
Chris MacNaughton
128652b43c Merge pull request #31 from gnuoy/bug/add-async_generator-setup
Add missing req async_generator
2018-04-19 10:31:03 +02:00
Liam Young
fc0dc48201 Add missing req async_generator 2018-04-19 08:26:39 +00:00
David Ames
4278e5822d Neutron dynamic routing testing
Add the testing required for neutron dynamic routing A.K.A dragent.
Create the zaza.charm_tests.dragent module for testing neutron dynamic
routing.
Create the zaza.configure module for reusable configuration tools.
Update utilities to simplify authenticating clients.
2018-04-18 16:14:23 -07:00
Frode Nordahl
be24513e1c Merge pull request #29 from gnuoy/feature/add-run-action
Add juju run_action support
2018-04-18 21:54:40 +02:00
Liam Young
769a6b9cc4 Fix doc string 2018-04-18 19:51:43 +00:00
Frode Nordahl
2750f14925 Merge pull request #28 from gnuoy/feature/use-sync-wrapper
Use async_generator pkg to simplify async calls
2018-04-18 18:36:58 +02:00
Liam Young
7e07abb4c4 Fix doc string lint as per tinwoods comments 2018-04-18 16:24:04 +00:00
Liam Young
4cec473ede Remove old run_in_model_old method and fix param ordering in doc strings 2018-04-18 15:39:04 +00:00
Liam Young
b40ddae08c Update vault tests for paramater reordering 2018-04-18 15:36:32 +00:00
Liam Young
acbcf98d68 Add juju run_action support 2018-04-18 15:34:27 +00:00
Liam Young
d65dd96f26 Use async_generator pkg to simplify async calls
Use the async_generator, yield_, asynccontextmanager methods from
async_generator to simplify the creation of sync wrappers around
async libjuju calls
2018-04-18 13:36:13 +00:00
James Page
371ded8da1 Merge pull request #13 from gnuoy/remove-py3-point-release
Tidyup tox and remove point release python version stuff
2018-04-18 12:33:20 +01:00
James Page
be4e9732fe Merge pull request #25 from gnuoy/feature/generate-local-charm-overlay
Render local charm overlay from string
2018-04-18 10:31:43 +01:00
Liam Young
56b0f556a6 Add the missing t 2018-04-18 08:57:38 +00:00
Liam Young
b8120df42c Update travis to remove point release from tox target 2018-04-18 07:47:20 +00:00
Liam Young
36945ff6ea Tidyup tox and remove point release python version stuff 2018-04-18 07:46:50 +00:00
Liam Young
924c76ca84 Fix lint 2018-04-18 07:40:25 +00:00
Liam Young
2e522f2ab4 Render local charm overlay from string
Stop requiring the charm to ship with a boiler plate overlay for
setting a relative path for local charm location. Instead render the
overlay from a string var. As part of this some of the template
rendering code was refactored.
2018-04-18 07:35:55 +00:00
Ryan Beisner
2940b23558 Merge pull request #23 from gnuoy/feature/zaza-in-model-name
Add zaza to generated model name
2018-04-17 15:23:52 -05:00
Liam Young
1bbb092aa6 Add option to allow bundle name to be passed to runner 2018-04-17 16:00:14 +00:00
Liam Young
05e02a94cd Add zaza to generated model name 2018-04-17 13:21:49 +00:00