Commit Graph

21 Commits

Author SHA1 Message Date
Corey Bryant 9aaf2d6f88 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* patch charmhelpers.core.hookenv.is_subordinate due to new
  release handlings in charms.openstack:
  fd042afdf1

Change-Id: I9269ad8b11b2ad5ee8a9868bf23ab1710758c883
2023-07-25 16:39:02 -04:00
Hervé Beraud ed42763698 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: I0417bae3d6311c9dcee53ef974ed49270adb4fc1
2021-12-15 14:37:55 +00:00
Xav Paice fbb7777638 Add NRPE checks for services
Adds the nrpe-external-master layer and checks for services managed by
this charm.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/445

Change-Id: I9109078bb0d07159de2024cb836d659a533e50c7
Closes-Bug: #1750486
2021-03-08 10:13:40 +13:00
Alex Kavanagh 0e6c47a625 Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: I464fa7903727af1e8f6d6d888c6d30f2b9d4ad79
2020-09-28 13:13:35 +01:00
Hervé Beraud b0a92783d7 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: Ia0765474af60d35e1feb6999459b4e624fa02b9f
2020-06-02 19:36:29 +02:00
Liam Young af1bc5648c Fix unit tests after charms.openstack update
A recent commit to charms.openstack (78ce162e) added support for
using endpoints rather than relations. This caused an aodh unit
test to fail as it was looking for an endpoint. This change is a
simple fix for that.

Change-Id: I6b41352ccf0e422cd5e80a7a47f640164df3e14b
2018-10-23 10:06:06 +01:00
David Ames a091a5abd7 Ensure SSL gets setup
As a part of the dualstack work it was discovered SSL was not getting
setup for aodh. Ensure that it does.

Change-Id: Ia4051b11dbf9cc09c730cc0c3b9dcc4867df8a7a
2017-08-21 14:13:58 -07:00
Alex Kavanagh d9c11f6525 Use charms.openstack charmhelpers test_mocks
Every reactive charm that uses charms.openstack and implements unit
testing needs to mock charmhelpers, as otherwise the tests blow up.
This patch uses the mocking of charmhelpers in charms.openstack so that
a charm layer can just import test_mocks and charmhelpers will be mocked
out along with setting up a default
charmhelpers.c.o.u.OPENSTACK_RELEASES so that when an OpenStackCharm()
derived charm class won't fail on definition.

Change-Id: I703f7cc775a78cf3b56583316c3dcb8482751bfd
Related-Bug: #1693017
Depends-On: I5ac40617ee30e5f421ec16fc7592177a5e6aa166
2017-05-24 20:23:38 +01:00
James Page 0ff10f440a Fix network space support for database relation
Drop provision of hostname for database configuration;
the latest interface versions correctly use Juju 2.0
network space bindings for the relation, or fallback
to using the units private-address on older Juju
version.

Change-Id: I378eef2a7c4acf4225ba73e4c7261bc057f42a24
2017-01-26 10:20:42 +00:00
Corey Bryant ac1a668492 Run aodh-api under mod_wsgi with apache2
This change aligns with the Ocata aodh package, which has
moved the aodh-api to run under mod_wsgi with apache2.

Change-Id: I4aa6a978eb719c955ad216326514d1175c86b4a7
2017-01-11 18:19:11 +00:00
Ryan Beisner 91d8d10382 Update tox.ini for py27 requirement
Reactive source charms are Python3-only, but have py27 unit tests
declared in project-config.

The Tox tool recently changed behavior.  It used to pass when a tox
target was missing commands.  Now it fails in that case.

This commit places a py27 no-op shim to allow gate tests to pass,
effectively restoring the original behavior for these py3x-only repos.

Fix unit tests after underlying changes in charms.openstack which
set_config_defined_certs_and_keys and added oncigure_source to
the default install method.

Change-Id: I82445240c49a2d58c6eb39da4f49d21350d8d8b4
Partial-Bug: 1642981
2016-12-01 15:38:07 +00:00
Liam Young 7d4d259117 Upgrade Openstack release if available
If there is a new release of the aodh packages available due
to the user changing the 'openstack-origin' option then upgrade
the packages.

Change-Id: Ib3add07c19768a88ec074e0e485e7b77f7a2f87d
Closes-Bug: 1632760
2016-10-12 16:36:44 +00:00
Liam Young 9e9ea827ec Fix test_aodh_adapters unit tests
A recent change to charms.openstack causes a cluster adapter to be
created if it is missing which invokes a call to
reactive.RelationBase.from_state('cluster.connected') which fails
outside of a juju env. This unit test change passes a cluster
relation to the adapter class to stop one being automatically
created.

Closes-Bug: 1630358
Change-Id: Ifb23e39b9ee94620705688841fd11db641884f74
2016-10-05 07:05:37 +00:00
James Page eab384a251 Add yakkety to supported series
Also add some misc fixes for unit test failures due to changes
in charms.openstack.

Change-Id: I1625f7237fd7fc2b98534ea1e0677ca629335ba4
2016-09-14 12:37:58 +01:00
Liam Young 6107f45e7f Configure SSL endpoint for charm
Configure SSL termination and advertise SSL endpoints if Keystone
sends the charm certs or the user specifies certs via config.

Change-Id: Ibc73724cb849d3eb05724b06ff3d3ea1124edafe
2016-08-03 10:03:31 +00:00
James Page 381dfdce73 Update reference to charm-guide
The charm-guide documentation is now published on
docs.openstack.org; update links for new location.

(also add .gitreview for first gerrit based change).

(also add __init__.py files to ensure py27 tests pass).

(also drop series in metadata as CI is not ready yet).

(add workaround for tox pep8 virtualenv build failure on 14.04).

(add patching for new features in charms_openstack).

Change-Id: I5088d5a27ebf18cbfe1f12af5e727ab83db66fd2
2016-07-15 16:03:27 +01:00
James Page 3120b33ef6 Update for changes to charms.openstack, ensure aodh is installed before configuration and rendering 2016-06-28 11:30:50 +01:00
James Page 1576b2027c Refresh requirements, drop lint 2016-06-22 09:47:47 +01:00
James Page 254af0df7b Add copyright headers 2016-06-22 09:30:51 +01:00
James Page 251d50e8e0 Tidy unit test a bit 2016-06-22 09:27:51 +01:00
James Page e988874252 Add unit tests for charm layer 2016-06-22 09:21:08 +01:00