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: I3dd4954daa24ff16a9da8f2a64290e5013b55301
Related-Bug: #1693017
Depends-On: I5ac40617ee30e5f421ec16fc7592177a5e6aa166
This change adds Keystone v3 support to the charm. Whether to run
using the keystone v2 or v3 api should be dictated by the
api_version sent down the identity-admin relation but the change
to enable that has not landed yet and it is useful to have this charm
work for v3 against stable charms. To allow this there is some hard
coding of expected v3 credentials that can be removed later. fwiw
this change represents a net reduction in hardcoded creds. changes
include:
1) Fix typo in default floating-network-name ext_net rather that
ext-net
2) Refactor init_keystone_client to initialise the right client
depending on api version.
3) Add a keystone_session object which can be shared by the
individual project clients
4) Use credential information passed down the identity-admin
relation in the tempest.conf template
5) Disable the ec2 cred checks for keystone v3 as these rely on
the client being able to resolve users and projects to their
uuids which does not seem to be possible with a project scoped
client. This shoud be fixed at a later date by the identity admin
relation passing the uuids to the charm
6) Remove try/catch-all excepts blocks. They were initially put in
as the charm tried to render its config as it came up meaning
that the services it tried to query may have been down. The
charm no longer does this and a client failure should be fatal.
Also try/catch-all excepts blocks are a fundamentally bad thing.
Where needed check that the service is present in the catalogue
before querying its api.
Change-Id: I3dd5ed610794eece515d9a03391f9844ac83efc0
This is in line with the agreed conventions on where to put
files in a layered source package.
Essentially, just the final moving of things around and ensuring
that the dummy tests pass, along with lint.
Change-Id: I392568d6279f0a5876bdb2a3ad5e49fee03734aa
This does not actually add unit tests, only an inert
and passing no-op test to unblock initialization of
this repo with regard to layer build and test
automation.
Change-Id: I7102d6f483d7680c4fc99074c5567cbf32cde690