From 8fa8bd37271d5911d2e7a322a3399c52a72072cd Mon Sep 17 00:00:00 2001 From: Sam Morrison Date: Mon, 1 Nov 2021 11:03:23 +1100 Subject: [PATCH] Allow volumes in error_restoring/error_managing to be deleted The list of statuses is based on the cinder API code [1]. In the API reference [2], 'in-use' is also mentioned, but 'in-use' is not included as 'in-use' volumes can be deleted only when 'force' flag is specified. [1] https://opendev.org/openstack/cinder/src/commit/ae5fd170f0a51306cc9ba44ba9d5fe4169fed239/cinder/volume/api.py#L480-L481 https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=delete-a-volume-detail#delete-a-volume Co-Authored-By: Akihiro Motoki Change-Id: I4a4f3fed1c8e02245573512a1e43749b03890324 --- .../dashboards/project/volumes/tables.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/volumes/tables.py b/openstack_dashboard/dashboards/project/volumes/tables.py index 6db77eefef..f78a65dd90 100644 --- a/openstack_dashboard/dashboards/project/volumes/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/tables.py @@ -35,7 +35,13 @@ from openstack_dashboard.api import cinder from openstack_dashboard import policy from openstack_dashboard.usage import quotas -DELETABLE_STATES = ("available", "error", "error_extending") +DELETABLE_STATES = ( + "available", + "error", + "error_extending", + "error_managing", + "error_restoring", +) class VolumePolicyTargetMixin(policy.PolicyTargetMixin): @@ -463,6 +469,8 @@ class VolumesTableBase(tables.DataTable): ("creating", None), ("error", False), ("error_extending", False), + ("error_managing", False), + ("error_restoring", False), ("maintenance", False), ) STATUS_DISPLAY_CHOICES = (