Commit Graph

6 Commits

Author SHA1 Message Date
Liam Young 34b12aa480 Add OPS framework interface
Add OPS framework support and exclude ops framework file from
reactive builds.

Change-Id: I79ae194b97483072501e07e4f8c02bdad03bc19f
2021-09-21 09:44:55 +00:00
Alex Kavanagh 6c611a3c61 Migrate from testr to stestr
Change-Id: I735638f91617d2e951c3ec23498c8ac116cf8f08
2021-02-10 11:18:06 +00:00
Hervé Beraud 9ea447c296 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Ibbbcfe51e76537702a2f4612a8b9829b25b2d149
2020-06-09 17:11:21 +02:00
Liam Young ce2aa63653 Add unit tests and fix for _parse bug exposed
* Add unit tests for common.py and requires.py.
* Update tox env for above.
* Update gitignore to ignore common kruft.
* CRM._parse did not add a space when constructing 'results' after
  each argument of 'data'. This caused each element to run into the
  last.

Change-Id: I2c35820149618aae02171c89b26bf29ee5e22344
2018-12-17 16:28:35 +00:00
Alex Kavanagh e4743dd143 Enable the hascluster interface to do less juju work
This change stops the requires side of the interface (in a reactive
charm) from setting data on the relation that's already been set.
This has the effect of not asking hacluster to do something every time
a reactive charm (e.g. designate) does update status.

Change-Id: I750f3c41a2f0447a47cfd19bab1d4958de4577f2
Related-Bug: #1708396
2017-08-07 16:49:41 +01:00
Billy Olsen a73846f575 First commit of the proposed hacluster interface.
This commit includes a rough implementation of the hacluster
interface which allows a charm to interact with the hacluster
subordintate charm.
2016-01-05 21:22:27 -07:00