See "specs/train/add_delete_method_v2_storage.rst" for details. Change-Id: I9b2531225895a4f8769112078f4fc4e443a31696 Story: 2005395 Task: 30791
2.7 KiB
Add a "delete" method to the v2 storage interface
https://storyboard.openstack.org/#!/story/2005395
Problem Description
Note
This spec is the detailed implementation of one part of a larger spec. If you haven't read it yet, please see https://specs.openstack.org/openstack/cloudkitty-specs/specs/train/reset_scope_state.html
Currently, there is no way to delete data from a v2 storage backend via cloudkitty. However, this is required in order to reset the state of a scope (see note above).
Proposed Change
A delete
method will be added to the v2 storage
interface and implemented in the v2 storage drivers. It will take three
parameters:
begin
(datetime object, optional): The start of the period for which data should be deleted.end
(datetime object, optional): The end of the period for which data should be deleted.filters
(dict, optional): A dict of optional filters allowing to select data marked for deletion.
Alternatives
None.
Data model impact
No changes will be made to the data model. However, it will be possible to delete data from the storage backend through cloudkitty now.
REST API impact
None. Described in another spec.
Security impact
None. API security impact is described in other specs.
Notifications Impact
None. Described in another spec.
Other end user impact
None.
Performance Impact
Data deletion may slow down and put some load on the storage backend.
Other deployer impact
None.
Developer impact
Changes related to scope state reset will need to be rebased on this change.
Implementation
Assignee(s)
- Primary assignee:
-
peschk_l
Work Items
Add the delete
method to the v2 storage interface and
implement it in the InfluxDB storage driver.
Dependencies
Spec: allowing to get/reset the state of a scope. https://specs.openstack.org/openstack/cloudkitty-specs/specs/train/reset_scope_state.html
Testing
In addition to unit tests, Tempest scenarios testing the whole scope state reset action will be added.
Documentation Impact
The delete
method will be added to the autogenerated
documentation.
References
Spec: allowing to get/reset the state of a scope. https://specs.openstack.org/openstack/cloudkitty-specs/specs/train/reset_scope_state.html