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
This commit is contained in:
Ivan Kolodyazhny 2018-04-12 20:18:48 +03:00
parent 07237c1fc6
commit 377422b33e
2 changed files with 8 additions and 20 deletions

View File

@ -16,7 +16,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf import settings
from django.template import defaultfilters as filters from django.template import defaultfilters as filters
from django.urls import reverse from django.urls import reverse
from django.utils.http import urlencode from django.utils.http import urlencode
@ -58,23 +57,6 @@ class CreateFlavor(tables.LinkAction):
icon = "plus" 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): class UpdateMetadata(tables.LinkAction):
name = "update_metadata" name = "update_metadata"
verbose_name = _("Update Metadata") verbose_name = _("Update Metadata")
@ -182,7 +164,6 @@ class FlavorsTable(tables.DataTable):
name = "flavors" name = "flavors"
verbose_name = _("Flavors") verbose_name = _("Flavors")
table_actions = (FlavorFilterAction, CreateFlavor, DeleteFlavor) table_actions = (FlavorFilterAction, CreateFlavor, DeleteFlavor)
row_actions = (UpdateFlavor, row_actions = (ModifyAccess,
ModifyAccess,
UpdateMetadata, UpdateMetadata,
DeleteFlavor) DeleteFlavor)

View File

@ -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.