Commit Graph

4 Commits

Author SHA1 Message Date
Hervé Beraud 3fba729d3e 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: Id390874b58b796fe6b8b6c9f03d8aa61381e00d5
2021-12-15 09:50:21 +00:00
Alex Kavanagh 6b39be106b Migrate unit tests fully to stestr
Change-Id: Ifbeadf1df3aaa69197b77d422eda8fe36f79411f
2021-02-10 10:55:56 +00:00
Frode Nordahl bc908fb587
Implement generation of shared secret for metadata
The ``nova-compute`` charm gates enablement of the local Nova
metadata service on presence of the ``metadata-shared-secret``
key in the relation data in the subordinate relation with
``neutron-plugin`` interface.  This is implemented in the classic
``neutron-openvswitch`` charm today.

Add the bits necessary for a reactive charm to participate in this
part of the relation.

Also adds units tests to the interface.

Change-Id: I358e60c40a7f7c0cd33b31f2b7a8c58d6cb83326
2019-10-08 08:23:39 +02:00
Alex Kavanagh 848327256f Add minimal requires.py
This is so that it can be used on a principal charm to allow, for
example, the neutron-openvswitch subordinate to be plugged into
principal charms.

Change-Id: I8760f2f9bec85ccc8b149b9560a6eed3e9ab418b
2016-11-18 09:28:01 +00:00