Commit Graph

13 Commits

Author SHA1 Message Date
Liam Young cd3626b047 Re-organise interface
Re-organise interface to allow multiple interfaces to share
common code. The idea being to add ceph-mds to this code base.

Change-Id: Ie53ef7e5fc7a461dca8e53d9f91b332399a70076
2020-08-17 08:14:43 +00:00
James Page a8d8821d9e Add support for erasure coded pools
Add helpers to request erasure coding profile and pool creation.

Change-Id: I4512b9957722332fe0a311d09fedffb4d4e47fbd
2020-08-06 06:16:10 +01:00
James Page 462582e4f3 requires: Provide get_current_request method
Minor refactor to ensure that the get_current_request method
actually exists for the requires part of this interface.

Misc drive by fixes for CI scaffolding as well.

Change-Id: I26e9585df2a84c336d9f01115c6208d7ef994b3c
2020-05-04 10:19:09 +01:00
Chris MacNaughton 49f4a1279a Fix reference to request
Change-Id: I33eb1eaadc240e5e73c7548d62afb1ae6c6829d1
Closes-Bug: #1845941
2019-09-30 13:29:52 +02:00
Mike Wilson d313ca64f4 Adding support for multiple ceph pool creation
Added create_replicated_pool to match the charm-helpers
deprecation of create_pool. I didn't make a
create_erasure_pool.

Piped create_pool through create_replicated_pool to
mirror charm-helpers.

create_replicated_pool can now be called multiple
times to create multiple pools

Related-Bug: #1824035
Change-Id: Iaa421ff152dc40bf446200cabc19d99f5b04bbe9
2019-09-17 17:20:20 +02:00
Zuul 7765bcf1b3 Merge "Revert "Refactor create_pool." and "Add request_access_to_group method"" 2019-02-28 15:41:48 +00:00
Chris MacNaughton (icey) a39dd3b9da Revert "Refactor create_pool." and "Add request_access_to_group method"
This reverts commit e4997e5ab8 and
288bab66dd.

This is necessary as this change does not verify that there is not an
existing request to do this in the queue, and will end up creating
infinite create_pool requests on the ceph-mon

Change-Id: I76305181ddba83eca414d9e08bbd58408d2b01ce
2019-02-28 16:18:40 +01:00
Liam Young 288bab66dd Add request_access_to_group method
Add request_access_to_group method to allow a client to request
ceph permissions.

Change-Id: I8a7f0bf47c39509eec71a286bd51ec53c58d7e0d
2019-01-08 14:00:13 +00:00
Liam Young e4997e5ab8 Refactor create_pool.
Refactor create_pool to allow future methods to easily access
the existing request. This change also includes two changes in
behaviour:

 * If an existing request is invalid due to invalid json or missing
   ops attribute then the exception is now propagated rather than
   logged and suppressed. If an existing request is corrupt then
   fail early otherwise bad things will follow.
 * The existing implementation only allows for a single create_pool
   request. Any additional requests would overwrite previous ones.
   This change allows for multiple pools to be requested in a
   single broker request.

Change-Id: I61998c2ce70325cb904add8c51cbc9c34b3c9564
2019-01-08 11:33:03 +00:00
Liam Young c90bca40da Expose all create pool options.
Expose all supported options in the create_pool interface method.

Change-Id: Ib497c7a797ca2d729ec2143209a8c273ea2d4704
2018-12-06 14:39:42 +00:00
Liam Young aec6677875 Support charm specifying weight on pool creation
When a charm requests a pool in cannot specify the weight atm as
the create_pool function forces it to None.

Change-Id: I40a85cf5c0e943aef0b4ec507d8c9b3a24ba09a8
2018-12-06 13:52:21 +00:00
James Page 60d8255921 Add support for ceph-proxy dataset
Add parsing of munged data presented by the ceph-proxy
charm in the ceph-public-address relation key; this
includes dropping the addition of the port to the values
added to the list of monitor hosts - this is not required
and the ceph-proxy may provide that data as part of the
ceph-public-address.

This change brings this interface inline with existing
ceph context support in the openstack charm helpers.

Change-Id: Id4d7b5df711c378763d5adb54269a3ede344dd45
2017-09-26 08:07:11 +01:00
James Page 0e191799fc Add initial requires 2017-07-03 15:17:35 +01:00