Commit Graph

5 Commits

Author SHA1 Message Date
Hervé Beraud 7cd8f7c31a 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: I33cd69aca44f48af2766c92ede46ff12367160c5
2021-12-15 10:02:04 +00:00
Ryan Beisner 63c0ebbcd7 Sync charm/ceph helpers, tox, and requirements
Also clean up pre-existing pep8 violations in the
files/* dir which was previously not covered by lint testing.

Also clean-up mocking issues around apt-pkg replacements in the
unit tests.

Also fix py35 issue with enabled_manager_modules() function in the
charmhelpers library (see
https://github.com/juju/charm-helpers/pull/387).

Also fix the functional tests bundles so they actually test the
version of OpenStack that the bundle indicates.

Change-Id: I2c8d84fadc11311c622dd308c4694496872dc157
2019-10-14 18:23:31 +01:00
tpsilva dfb29a4753 Add support for 'add-permissions-to-key' requests
Currently add-permissions-to-key requests are not being handled by this
charm, so if cinder-ceph or glance is deployed with
restrict-ceph-pools=True, it will not be configured properly. This
patch ports the implementation of the add-permissions-to-key
handling from the ceph-mon charm, and updates other methods required
to properly set up cinder-ceph and glance ceph pools.

Change-Id: If5950af155e10ee4d140300fd7ed5730798b65f0
Closes-bug: #1836408
2019-10-02 10:44:07 -03:00
Alex Kavanagh ddd26acc6d Convert the charm to Python3
* Move charmhelpers to the root of the charm
* sync charmhelpers to latest version

Change-Id: Id0b838f0206635cf912d205f2fb6fda7b31d0dfe
2019-03-10 14:16:41 +00:00
Dmitrii Shcherbakov 81383a160b support custom admin user and user auth
In order to support cases where pools and keys are pre-created and
ceph-proxy just proxies this data to client applications this change
introduces support for:

* having custom "admin" users which may not actually have admin
privileges on the target cluster (client.admin is probably occupied by
real admins in this case);
* using cephx keys provided via charm config.

Change-Id: I01014b6986f92bf0ad8147a08afa1d61fdd5c088
Closes-bug: #1793991
2018-09-26 10:09:14 +03:00