Commit Graph

16 Commits

Author SHA1 Message Date
Edward Hope-Morley dd978b7bd0 Code cleanup
* import ordering
* doctrings
* unit tests cleanup
* move code out of __init__.py
* rename files

Change-Id: Id56d4ea1a0cca33df03f40222bbf51a6bef58b20
2017-08-11 12:42:29 +01:00
Edward Hope-Morley b483fa2668 Fix pylint errors
Change-Id: I3cbb839a75ec3be91c74d968f528901f82e10129
2017-03-29 11:47:58 +01:00
James Page c7a2595fab Use absolute import path for ceph_helpers
Ensures that things work OK when charms.ceph is used from within
a virtualenv.

Change-Id: I06ce657a6910835359dc03471dc14a5740725e98
2017-03-10 12:17:12 +00:00
James Page 187fb76bff Fix formatting of per-pool osd permissions
osd permissions need to be provided per pool, comma delimited.

Update to ensure that correct syntax is used when applying
permissions to keys.

Change-Id: I0aa9b0c79c0ff8ca9f61f7bf138c42c510fe3318
2017-02-14 09:44:13 -06:00
James Page b8307fd037 Ensure complete 'groups' dict for service objects
In order to apply osd pool permissions correctly, the 'groups'
dict of a service_group object must be fully populated with
information for all required permissions.

Refactor code a little to ensure that 'groups' is built
consistently across the codebase, and that keys can have
access to multiple pool types.

Change-Id: I4aeb3a66cb74fe0ab233c7624d863119f7f450c0
Closes-Bug: 1664543
2017-02-14 14:40:15 +00:00
James Page c6c09f8d54 Avoid adding pool to group more than once
If a pool is already in the pools list for a group, don't
add it again, avoiding duplicate pool entries on keys with
permissions to access the group.

Change-Id: I8c882a33ae118cbd9d575a1da398b9184b711df3
Partial-Bug: 1424771
2017-02-14 11:14:03 +00:00
Chris MacNaughton 267f7f3bfb Charms can request access to groups of pools
Additionally, a charm can request that a pool be added
to a group when creating a pool

Change-Id: Ide11d74f1472fcddcabf9475b935bd57dba88ce7
Partial-Bug: 1424771
2017-02-09 16:54:54 -05:00
Chris MacNaughton 1e60cf0fbe Fix call in ensure_bucket_is_present
Change-Id: Ie10d49dc6d8c0ade3b649ebec8c2889c0ab28d5c
2016-12-07 14:05:29 -05:00
Chris MacNaughton 2ecb4f641a Add broker request to move Disk
This allows a remote charm, ideally an OSD unit,
to request that the monitor move a disk to a given
bucket in the Crushmap

Change-Id: I77d8159d588f3b31d6eb1c25cd5ca16e53c6f01d
2016-12-06 14:34:42 -05:00
Chris Holcombe 4189681edb CephFS Helpers
Added a helper function to test if ceph fs new has already
been called.  If it has been than the ceph_broker will
skip calling it again.

Change-Id: Ib39542a55db5f03f08af72054c14bd6abb3d6a2a
2016-10-07 11:08:51 -07:00
Chris Holcombe e9802165f4 Cephfs creation fn
Add function to allow cephfs creation.

Change-Id: I52d5e2303b185a366b968ef97dd50c2780a3a404
2016-09-28 16:00:19 -07:00
James Page 7766bef0b9 Fixup py3 compatibility 2016-09-20 14:49:19 +01:00
Chris Holcombe 54cebafe60 Add radosgw admin commands 2016-09-08 15:40:29 -07:00
Chris Holcombe 13f8e8a1b0 Add pool support to get_named_key
This patch adds a list of pool support into the
get_named_key
function to allow callers to specify the pools the cephx key
should have access to.  This patch also adds in tox testing.
2016-08-04 15:12:00 -07:00
Chris MacNaughton 354d9f9a72 fix pg-num config 2016-08-01 16:59:07 -04:00
Chris Holcombe e0458a3c13 Initial commit 2016-07-26 16:12:01 +02:00