Merge "Quote cinder qos-spec key name"
This commit is contained in:
commit
ade6c70f5d
|
@ -13,6 +13,7 @@
|
|||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from six.moves.urllib import parse
|
||||
|
||||
from horizon import tables
|
||||
|
||||
|
@ -49,12 +50,13 @@ class SpecDeleteKeyValuePair(tables.DeleteAction):
|
|||
count
|
||||
)
|
||||
|
||||
def delete(self, request, obj_ids):
|
||||
def delete(self, request, obj_id):
|
||||
qos_spec_id = self.table.kwargs['qos_spec_id']
|
||||
# use "unset" api to remove this key-value pair from QOS Spec
|
||||
key = parse.unquote(obj_id)
|
||||
api.cinder.qos_spec_unset_keys(request,
|
||||
qos_spec_id,
|
||||
[obj_ids])
|
||||
[key])
|
||||
|
||||
# redirect to non-modal page
|
||||
def get_success_url(self, request=None):
|
||||
|
@ -83,7 +85,7 @@ class SpecsTable(tables.DataTable):
|
|||
row_actions = (SpecEditKeyValuePair, SpecDeleteKeyValuePair)
|
||||
|
||||
def get_object_id(self, datum):
|
||||
return datum.key
|
||||
return parse.quote(datum.key)
|
||||
|
||||
def get_object_display(self, datum):
|
||||
return datum.key
|
||||
|
|
Loading…
Reference in New Issue