From 4dd31ac1e9edf2dc008223e4377db01a7b3e4ef4 Mon Sep 17 00:00:00 2001 From: Luka Peschke Date: Mon, 27 May 2019 11:30:23 +0200 Subject: [PATCH] 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 --- specs/template.rst | 2 +- specs/train/add_delete_method_v2_storage.rst | 119 +++++++++++++++++++ 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 specs/train/add_delete_method_v2_storage.rst diff --git a/specs/template.rst b/specs/template.rst index 6a3da4f..f193f85 100644 --- a/specs/template.rst +++ b/specs/template.rst @@ -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. diff --git a/specs/train/add_delete_method_v2_storage.rst b/specs/train/add_delete_method_v2_storage.rst new file mode 100644 index 0000000..5be1e6e --- /dev/null +++ b/specs/train/add_delete_method_v2_storage.rst @@ -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