Commit Graph

22 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Liam Young
05e02a94cd Add zaza to generated model name 2018-04-17 13:21:49 +00:00
Liam Young
ed98e8f02d Stop missing overlay templates from being fatal
Not all deployments will use overlays so a missing template should
not be fatal
2018-04-17 12:00:17 +00:00
Liam Young
51fb79c24f More env var refinement 2018-04-16 14:17:57 +00:00
Liam Young
7f09add0d0 Switch to OS_ as the prefix for environment variables that can be used in overlay template rendering 2018-04-16 14:13:23 +00:00
Liam Young
e22fa7bbf5 Add support for model specific bundle overlays
This change adds support for model specific overlays from
templates which are rendered at deploy time.

The overlay template directory will be searched for a corresponding
template (<bundle_name>.j2). If one is found then the overlay will
be rendered using environment variables matching AMULET* or
ZAZA_TEMPLATE* as a context. The rendered overlay will be used on
top of the specified bundle at deploy time.

A default overlay is always applied "local-charm-overlay.yaml". This
overlay is only used to move the location of the charm being deployed
to a relative path so the bundle can use "charm: <charm name>" rather
than "charm: ../../../<charm name>"
2018-04-16 13:26:33 +00:00
David Ames
621baa4ee0 Add create port and create floating ip
Add utilities
2018-04-13 16:46:31 -07:00
David Ames
6eae8a0fbb Use libjuju unit.run for juju_run
Use libjuju for juju run commands
Add unit test for model.run_on_unit
2018-04-12 10:43:35 -07:00
Liam Young
f99af2f14c Add support for running smoke tests
Add --smoke switch to functest-run-suite to allow just the smoke
tests for a charm to be run. This requires that the smoke test
bundles are listed in the charms tests/tests.yaml
2018-04-12 12:43:07 +00:00
Liam Young
3b90ed1a50 Add option to functest-run-suite to skip model deletion 2018-04-11 14:23:41 +00:00
Liam Young
117ae4127d Add function to scp file to all units 2018-03-29 05:35:49 +00:00
Liam Young
59a9b7f0cb Add helper utils for interacting with juju environment 2018-03-29 05:35:49 +00:00
Liam Young
f22b05f827 Fix unit tests 2018-03-28 11:56:29 +00:00
Liam Young
353559528b s/charm_testing/charm_lifecycle/ and unit tests 2018-03-27 12:35:38 +00:00
Chris MacNaughton
c3e5adcb4d initial commit framing out stuff 2017-12-04 17:01:33 +01:00