Commit Graph

6 Commits

Author SHA1 Message Date
Hervé Beraud 388f8c2f47 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: I661477f9d0bdbebc90041a3eaff4ea92ef8c2b12
2021-12-15 14:31:17 +00:00
Hervé Beraud 528eef6824 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Ie9d7753f4b3792e70b9ece7e170e7acaec70f683
2020-06-02 20:02:48 +02:00
Alex Kavanagh 8110298bb4 Fix packaging issue by devolving it to principal
This patchset fixes the referenced bug by making use a new feature
in the openstack-dashboard charm to allow this plugin to indicate
which packages need installing and which conflict.

The two depends-on are the openstack-dashboard patch to add the
packaging feature and the charm-interface-dashboard-plugin patch
that adds the package details to the reactive interface code.

Also remove disco test and add eoan-train test due to disco EOL.

Depends-On: I962ec558b8dd1f765c6104d5ae61edd41c03affe
Depends-On: Ib3fc0b0525dabf70f45fd050af2ed05ba31129b9
Change-Id: I8582a4cf62749240919d0fe4dd5d72577d288397
Closes-Bug: #1853851
2020-02-02 14:22:24 +00:00
Frode Nordahl c8ab9efa2d
Enable bionic/stein functional tests
Add missing default ``upgrade-charm`` reactive handler.

Change-Id: I14ed4c93af4d6ab794bf2d6f651c42e3efabec86
2019-04-10 17:44:12 +02:00
Frode Nordahl 4d66c30ef4 Purge neutron-lbaas dashboard on install
Remove unnecessary config publish.

Remove unused build time policy generation.

Change-Id: I7616c7aaec8bdd60160e6bc7481ea41b5a71cd3c
2018-11-21 16:35:08 +00:00
Frode Nordahl e7707cd2cd
Initial commit of Octavia Dashboard plugin subordinate 2018-11-06 11:33:41 +01:00