Commit Graph

15 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
Liam Young 677f1a666a Reuse existing metadata secret if present
If there is an existing metadata secret stored on the filesystem
then reuse it to ensure a smooth transition from the old provider
to the new.

Closes-Bug: #1916609
Change-Id: I74f889f0fc13f0bde2677054f7acaed63a46aea6
2021-04-29 14:32:49 +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
Frode Nordahl adbfcb4ddd
Add ``host`` attribute on requires side
Commit 6dca7338b2 added the attribute
on the wrong side of the interface.

Change-Id: I6d561617805280caebfe6e408d74ceaccefa1f08
Closes-Bug: #1845303
2019-10-02 06:25:23 +02:00
Frode Nordahl 6dca7338b2
Add auto accessor for ``host`` attribute
Depends-On: I75cbc5eb97cf3603ffa5a9a49670411288d90520
Change-Id: I3b11eec3f1c4b8a673ccb6f9e6320d79dbde8f7a
Closes-Bug: #1845303
2019-10-01 08:02:17 +02:00
Camille Rodriguez fa811c9e9a Avoid pollution and false positives with tox.ini
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.

Change-Id: Ie250e8d9cb5063955140cfc8275ff91865334053
2019-08-27 09:06:32 -04:00
OpenDev Sysadmins aea93f5fba OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:48:40 +00:00
Zuul 7d721ef02b Merge "fix tox python3 overrides" 2018-10-12 10:50:57 +00:00
Doug Hellmann 7786e92cbb import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ie2f1f1bd3e6cb8198e82b6da819d223ee5a0c827
Story: #2002586
Task: #24317
2018-10-04 12:46:14 +00:00
Doug Hellmann 63508f8ee4 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I119d05aa0a9bc07fdd47e636802ca01f7d11e9fc
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-04 12:46:09 +00:00
Andreas Jaeger 4942011978 Update tox to remove deprecated pip option
The job --allow-unverified is obsolete, also python-apt cannot be
installed and is unneeded for current jobs.

Remove so that python installation works.

Change-Id: Id40017a62ee27ff0178dafddf9171738f8e95069
2018-10-04 12:08:25 +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
James Page c6469fc1dc Fixup for new reactive package naming 2015-11-04 13:39:55 +00:00
James Page be82dfb140 Initial commit of interface 2015-07-15 17:06:36 +01:00