The CephBrokerRq class will be used to validate the arguments
passed so that the caller will get immediate feedback if any
unknown arguments or invalid values are used.
Change-Id: Ideb142ead729977dedd2c00435e98846fc842da3
Its not possible to call a method which is annotated as a property
so which to just using the property directly.
Its also difficult to patch a property during unit testing so
provide private methods for unit testing to allow properties
to be specified during testing.
Change-Id: Id9db6578e00fa412e4cf58e75bd89970b6e8e682
Switch requires relation from the old api
charms.reactive.relations.RelationBase to the replacement
charms.reactive.endpoints.Endpoint.
Change-Id: I6fe7cab654d5768f521ffa4218ae5c3974ef4ae8
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
Re-enable and fix unit tests. Unit test check of set_local removed
as the json dump is not ordering dict keys and the set_local
calls will be removed by an imminent patch.
Change-Id: Id804e0e518c0013043db6f4b7cd44ccaa5499749
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.
Change-Id: I887adac6caebb327871d3709ed59f25e401b5600
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
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