Commit Graph

15 Commits

Author SHA1 Message Date
James Page 1a5142bac6 Add forwards compat with k8s operator
The new keystone-k8s operator uses the application data bag and
more up-to-date key names for endpoint and authentication information.

Check for this information and then fallback to the existing
keystone charm unit data bag data set if not found.

Update register_endpoints to also provide new application data
bag JSON encoded data when this method is called from a lead
unit.  This relies on the type and description of the endpoint
being provided which will require a charm change on adoption.

Change-Id: I921d173c64b12c35f5ffc17270a0fc2bb83891c4
2022-09-16 14:54:50 +01:00
James Page 9ad5cade97 Refactor to use Endpoint base class
The RelationBase class has been deprecated for some time and
provides no support for interaction with the application data
bag.

Migrate requires interface to Endpoint base class and refactor
as needed.

Change-Id: I82fe7df6c7c3658dd334a830442f1dcbd1e7d7e4
2022-09-08 09:44:35 +01:00
David Ames a48a1e826a Collapse available and available.auth
Most reactive charms react on identity-service.available but the
current interface distinguishes between available and available.auth. It
is somewhat assumed by most charms that identity-service.available is
equivalent to identity-service.available.auth, as what charms are
concerned with is the ability to authenticate against the cloud.

Collapse the difference between identity-service.available and
identity-service.available.auth.

Continue to set identity-service.available.auth for any charms that may
rely on it.

Change-Id: I494feea5f3ef8706140ce712b1e025e52b0dfbd1
Closes-Bug: #1818113
2020-07-16 14:21:58 -07:00
James Page 699ca9e095 Add support for endpoint change notification
Add support for recent changes to keystone to allow consuming
charms to request notification about endpoint changes.

Change-Id: Icacca3445980cdb866cb0dad90b288ce96e8c460
2020-03-03 08:35:33 +00:00
Camille Rodriguez 8391b873ba 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: Ib98bc85fb41b4504bf239783d36c5290df863abd
2019-08-27 08:55:57 -04:00
Corey Bryant b551205b3f Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Note that python35-charm-jobs is retained since this charm is supported
on Xenial.

Change-Id: I603dbbd3a7dd9061f0fe91928895f4ad20a6a113
Story: #2005924
Task: #34228
2019-07-30 10:20:44 -04:00
Jorge Niedbalski 9fbb2054ac Switch to stestr.
CI is broken due to a bug [0] reported
in testr.

Following approach used in keystone and switching
to stestr instead of testr.

[0] https://review.opendev.org/#/c/662582/
[1] d1e3a7845d

Change-Id: I108b4d7b4c4f20f4b077077528f07f9447747a48
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com>
2019-06-04 11:58:08 -04:00
Paul Goins 3c81e2a92e Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini.  This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable.  Doing this allows us to easily generate coverage for our
unit tests.

An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc.  It is purely focused on the unit tests.

Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.

Change-Id: I2e1964927b44aeef8135350390968f98bf77f8ac
2019-03-01 14:40:27 +01:00
Doug Hellmann 305eb10d2e 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: If1e380edabb8db57486a8d9c6ca7616247087505
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:38:43 -04:00
melissaml 954f1dc815 Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I5f46c652dbc988991b2d506d66a985de7e5af8c9
2018-07-24 19:46:56 +08:00
Alex Kavanagh f6831363b7 Put back the unit tests and enable the ignore
This adds back in the unit tests that were removed due to charm-tools
issue #192 [1] where the ignore option was 'ignored' by charm-tools.
This meant that the unit tests could not be ignored, and they ended
up in the built charm which then failed.

[1] https://github.com/juju/charm-tools/issues/192

Change-Id: Idbde830cac9ddc8ee3622fa6b7fd8a88e81e2811
2018-05-08 15:05:20 +01:00
James Page 1e91681243 Add support for verification process
Add required configuration files and generally update the interface
after move to OpenStack git/gerrit.

Change-Id: Id8717e9764187e2f16e9a2a3b6007779b7fb6468
2016-07-07 15:32:37 +01:00
Alex Kavanagh 881e13792e Revert "Add unit tests to the interface"
This reverts commit 133fedca1a.

Reverting this commit (temporarily) until charm-tools merge 193 is
released.
2016-04-29 16:48:26 +00:00
Alex Kavanagh 133fedca1a Add unit tests to the interface
This adds unit tests to the interface-keystone and provides ostestr
support, and a makefile to allow easy 'make lint' and 'make test'
commands.  All tests are performed in tox environments.  At present this
is py27.
2016-04-22 16:09:04 +00:00
Liam Young 3ff28b362e initial version 2015-12-07 10:37:06 +00:00