From 377422b33e3db760cc1b0103147d599d8a9b4d3d Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Thu, 12 Apr 2018 20:18:48 +0300 Subject: [PATCH] Delete the deprecated Edit Flavor feature Historically, Horizon has provided the ability to edit Flavors by deleting and creating a new one with the same information. This is not supported in the Nova API and causes unexpected issues and breakages. Change-Id: I796259c66e01be088a50ab6ba63f515de9590c9b Closes-Bug: #1751354 --- .../dashboards/admin/flavors/tables.py | 21 +------------------ ...pdate-flavor-feature-6ed1e482b91f5e08.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/delete-update-flavor-feature-6ed1e482b91f5e08.yaml diff --git a/openstack_dashboard/dashboards/admin/flavors/tables.py b/openstack_dashboard/dashboards/admin/flavors/tables.py index e5c4d1a4cd..f4e8423d4c 100644 --- a/openstack_dashboard/dashboards/admin/flavors/tables.py +++ b/openstack_dashboard/dashboards/admin/flavors/tables.py @@ -16,7 +16,6 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf import settings from django.template import defaultfilters as filters from django.urls import reverse from django.utils.http import urlencode @@ -58,23 +57,6 @@ class CreateFlavor(tables.LinkAction): icon = "plus" -class UpdateFlavor(tables.LinkAction): - name = "update" - verbose_name = _("Edit Flavor") - url = "horizon:admin:flavors:update" - classes = ("ajax-modal",) - icon = "pencil" - - def allowed(self, request, flavor): - return getattr(settings, 'ENABLE_FLAVOR_EDIT', False) - - def get_link_url(self, flavor): - step = 'update_info' - base_url = reverse(self.url, args=[flavor.id]) - param = urlencode({"step": step}) - return "?".join([base_url, param]) - - class UpdateMetadata(tables.LinkAction): name = "update_metadata" verbose_name = _("Update Metadata") @@ -182,7 +164,6 @@ class FlavorsTable(tables.DataTable): name = "flavors" verbose_name = _("Flavors") table_actions = (FlavorFilterAction, CreateFlavor, DeleteFlavor) - row_actions = (UpdateFlavor, - ModifyAccess, + row_actions = (ModifyAccess, UpdateMetadata, DeleteFlavor) diff --git a/releasenotes/notes/delete-update-flavor-feature-6ed1e482b91f5e08.yaml b/releasenotes/notes/delete-update-flavor-feature-6ed1e482b91f5e08.yaml new file mode 100644 index 0000000000..2f34cd3792 --- /dev/null +++ b/releasenotes/notes/delete-update-flavor-feature-6ed1e482b91f5e08.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The deprecated feature of "Edit Flavor" was deleted + Historically, Horizon has provided the ability to edit Flavors by deleting + and creating a new one with the same information. This is not supported in + the Nova API and causes unexpected issues and breakages.