Commit Graph

38 Commits

Author SHA1 Message Date
Alex Kavanagh 9c12812735 Switch the charm to support py3
Some major changes:
* the charm has been rebased (from a Python perspective) to be rooted in
  the charm directory.  This is a single root.
* Imports have been changed so that the don't add lots of imports to the
  namespace of the module doing the import.
* The code that used to run at module import time has been made lazy
  such that it only has to run if the relevant functions are called.
  This includes restart_on_change parameters, the harden function and
  the parameters to the guard_map.  Appropriate changes will be
  submitted to charm-helpers.
* Several tests had to be re-written as (incorrect) mocking meant that
  text fixtures didn't actually match what the code was doing.  Thus,
  the tests were meaningless.
* This has had a net positive impact on the unit tests wrt to importing
  modules and mocking.

Change-Id: Id07d9d1caaa9b29453a63c2e49ba831071e9457f
2018-10-18 15:43:03 +01:00
Corey Bryant b99070edf6 Sync charm-helpers for Rocky series support
Change-Id: I8e625fb8871a9b6afcedf4633df780bd18233aeb
2018-06-21 18:59:34 +00:00
David Ames 794b8ed0bb Charm-helpers sync to fix CA cert comparison
The comparison of bytes vs string of the CA certificate produces a
false negative. This leads to rewriting certificates and affecting
connectivity to services.

Read in the certificate as bytes as well for a bytes vs bytes
comparison.

Closes-Bug: #1762431

Change-Id: Ie2348a83671b9636bd94227e903b1a50bff7aecc
2018-04-11 14:26:49 -07:00
Edward Hope-Morley 16ae06bf42 Use volumev3 for internal endpoint in >= Pike
volumev2 api is deprecated for >= Pike so switch
internal endpoint to v3 for Pike onwards.

Change-Id: Icb9861efbd650b079f507ca585818e95921dc42a
Partial-Bug: 1733566
2017-12-08 10:06:49 +00:00
Ryan Beisner 1da186ac2d Sync charm-helpers
Change-Id: I7ffa8b100144e14b736a7f204977f0aee24aada3
2017-11-22 18:25:39 +00:00
Andrew McLeod 93bd3d7279 Enable xenial-pike amulet test
Make default func27-smoke xenial-pike
Charm-helpers sync

Change-Id: If2de44a0661aaa4679c7ed4c8bfe99e56fb8c24d
2017-11-16 15:41:44 +13:00
Liam Young f427dc5a48 Resync charmhelpers for py3 fixes.
Change-Id: I28457389a65a835204729c5070b420715664aa26
2017-11-13 16:13:50 +00:00
James Page 7186587ac6 Updates for Pike b1
Resync charmhelpers to pickup new versions for Pike.

Add amulet tests for pike, but leave disabled for now.

Change-Id: I2d828fa88b73260b2abf02ff2c6037ffbee654f3
2017-05-24 11:04:13 +01:00
Ryan Beisner 24df5f451d Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbags for virtualenv prep.

- Add Yakkety-Newton Amulet test definitions.

- Prep Xenial-Ocata Amulet test definitions (not yet enabled).

- Prep Zesty-Ocata Amulet test definitions (not yet enabled).

- Add Zesty charm series metadata.

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

Change-Id: I42776be9284b0eee2fd58b62b0269a5a3c556453
2016-11-28 14:55:42 -06:00
Ryan Beisner 2bd1f60d7c Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Idab48a7831008c5353eeb56da5deb49ce1305a41
2016-10-12 13:34:02 -05:00
David Ames 94966e0e59 Pre-release charm-helpers sync 16.10
Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: Iab6950c48e91266f5471a4180e9e94479d955e34
2016-09-30 09:10:55 -07:00
James Page 58bf5b0628 Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the os_application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv and contrib.openstack support for this
feature.

Change-Id: I8c1d6b9b6d42bcc357d764ec1bd04a36e9982f57
2016-09-20 12:35:19 +01:00
Billy Olsen 8d35070586 Change worker-multiplier to float
Change the worker-multiplier to a floating point config option type
instead of integer. This allows users to specify workers to be less
than the number of CPUs, which is useful in deployments with multiple
services deployed into containers on top of bare metal.

The fix is to simply change the config option type and to sync in
the necessary update from lp:charm-helpers.

Partial-Bug: #1602444

Change-Id: I2c846832d24f709a3d019b766f5f23c28c4371f4
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2016-07-12 17:39:11 -07:00
James Page a05c9c6beb Resync charmhelpers for licensing change
The charm-helpers project have re-licensed to Apache 2.0
inline with the agreed licensing approach to intefaces,
layers and charms generally.

Resync helpers to bring charmhelpers inline with charm
codebase.

Change-Id: I8746721aea508fa01d2b616d580b38f84197759b
2016-07-06 16:39:15 +01:00
James Page 8e3d71ea82 Switch to using charm-store for amulet tests
All OpenStack charms are now directly published to the charm store
on landing; switch Amulet helper to resolve charms using the
charm store rather than bzr branches, removing the lag between
charm changes landing and being available for other charms to
use for testing.

This is also important for new layered charms where the charm must
be build and published prior to being consumable.

Change-Id: Ia4cbe14575851c0f54cbb5845ffd6b8669fb7fa2
2016-06-17 11:52:35 +01:00
James Page e844145fcb Add Juju Network Space support
Juju 2.0 provides support for network spaces, allowing
charm authors to support direct binding of relations and
extra-bindings onto underlying network spaces.

Resync charm-helpers to pickup support in API endpoint
resolution code and add API extra-bindings to the charm
metadata.

Change-Id: Ib9820251c6196c76c726a1854052a855ecb6ffbe
2016-03-31 12:57:57 +01:00
Edward Hope-Morley a6e121afba [hopem,r=]
Sync charmhelpers to get fix for bug 1518975
2016-02-11 14:46:45 +00:00
Corey Bryant c4020b6d0a [corey.bryant,r=trivial] Sync charm-helpers. 2016-01-04 16:29:34 -05:00
Edward Hope-Morley d7e169d631 [hopem,r=]
Sync charmhelpers to get fix for bug 1499643
2015-09-25 15:35:19 +01:00
Hui Xiang c2528803eb Fix conflicts. 2015-09-22 10:45:17 +08:00
Hui Xiang 9ac81c9fde Merge lp:charm-helpers. 2015-09-22 10:07:16 +08:00
Corey Bryant 334c66c2b7 [corey.bryant,r=trivial] Sync charm-helpers to pick up Liberty support. 2015-08-18 13:34:35 -04:00
Corey Bryant 2ebd710f02 Sync charm-helpers. 2015-07-16 20:18:38 +00:00
Corey Bryant a794fc0e38 Sync charm-helpers 2015-06-19 15:10:20 +00:00
Liam Young 507fa380f6 [gnuoy,trivial] Pre-release charmhelper sync 2015-04-23 15:51:08 +01:00
Ryan Beisner 86da61c478 auto sync charmhelpers 2015-04-16 21:34:39 +00:00
Liam Young d5054a2476 [gnuoy,trivial] Pre-release charmhelper sync 2015-04-16 11:25:41 +01:00
James Page eaa0fc5093 Rebase, resync 2015-03-30 18:00:34 +01:00
Edward Hope-Morley 8eb78b49aa [trivial] charmhelpers sync 2015-02-24 11:07:04 +00:00
Liam Young c63649ac21 [gnuoy,trivial] Pre-release charmhelper sync 2015-01-26 09:44:11 +00:00
Corey Bryant 430f26f7f6 Sync charm-helpers. 2014-12-10 20:28:55 +00:00
James Page eee9635e0d Rebase, resync 2014-10-02 10:22:36 +01:00
James Page 0fc9af6238 Resync helpers, deal with clustered HA + HTTPS 2014-09-30 09:24:17 +01:00
Edward Hope-Morley 1ab401f941 synced charm-helpers 2014-09-26 13:41:21 +01:00
James Page bbc7aa5cb2 resync helpers 2014-09-26 11:13:52 +01:00
Corey Bryant f36eb2a121 Sync with charm-helpers 2014-07-30 15:20:13 +00:00
James Page 71b6d561d9 [corey.bryant,r=james-page,gnuoy] Add amulet tests 2014-07-28 12:38:42 +01:00
Corey Bryant e2e7e4798d Sync with charm-helpers 2014-07-11 02:43:50 +00:00