Spec: Add a "delete" method to the v2 storage interface

See "specs/train/add_delete_method_v2_storage.rst" for details.

Change-Id: I9b2531225895a4f8769112078f4fc4e443a31696
Story: 2005395
Task: 30791
This commit is contained in:
Luka Peschke 2019-05-27 11:30:23 +02:00
parent ce5cc73278
commit 4dd31ac1e9
2 changed files with 120 additions and 1 deletions

View File

@ -173,7 +173,7 @@ security best practices. For further information, feel free to reach out
to the OpenStack Security Group at openstack-security@lists.openstack.org.
Notifications Impact
----------------------------
--------------------
Please specify any changes to notifications or auditing. Be that an extra
notification, changes to an existing notification, or removing a notification.

View File

@ -0,0 +1,119 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
http://creativecommons.org/licenses/by/3.0/legalcode
=================================================
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