Change labels in QOS Specs panels
Under Admin->Volumes->Volume Types, all the QOS spec forms and tables should match the Cinder docs, which use "QoS", instead of "QOS". Also, references to QoS "consumer" should be capitalized. Change-Id: I70237152732f02c4c2c6c34917181a5dcb669b12 Closes-Bug: #1371711
This commit is contained in:
parent
6f2c431130
commit
aa345883bd
@ -84,7 +84,7 @@ class VolumeTypesTab(tabs.TableTab, volumes_tabs.VolumeTableMixIn):
|
||||
except Exception:
|
||||
qos_specs = []
|
||||
exceptions.handle(self.request,
|
||||
_("Unable to retrieve QOS specs"))
|
||||
_("Unable to retrieve QoS specs"))
|
||||
return qos_specs
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% block form_action %}{% url 'horizon:admin:volumes:volume_types:manage_qos_spec_association' type_id %}{% endblock %}
|
||||
|
||||
{% block modal_id %}associate_qos_spec_modal{% endblock %}
|
||||
{% block modal-header %}{% trans "Associate QOS Spec with Volume Type"%}{% endblock %}
|
||||
{% block modal-header %}{% trans "Associate QoS Spec with Volume Type"%}{% endblock %}
|
||||
|
||||
{% block modal-body %}
|
||||
<div class="left">
|
||||
@ -17,11 +17,11 @@
|
||||
<div class="right">
|
||||
<h3>{% trans "Description:" %}</h3>
|
||||
<p>{% blocktrans %}
|
||||
Add, modify or remove the QOS Spec associated with this volume type.
|
||||
Add, modify or remove the QoS Spec associated with this volume type.
|
||||
<br>
|
||||
<br>
|
||||
"None" indicates that no QOS Spec is currently associated. Conversely, setting
|
||||
the QOS Spec to "None" will remove the current association.
|
||||
"None" indicates that no QoS Spec is currently associated. Conversely, setting
|
||||
the QoS Spec to "None" will remove the current association.
|
||||
<br>
|
||||
<br>
|
||||
This is equivalent to the <tt>cinder qos-associate</tt> and <tt>cinder qos-disassociate</tt>
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% block form_action %}{% url 'horizon:admin:volumes:volume_types:create_qos_spec' %}{% endblock %}
|
||||
|
||||
{% block modal_id %}create_volume_type_modal{% endblock %}
|
||||
{% block modal-header %}{% trans "Create QOS Spec" %}{% endblock %}
|
||||
{% block modal-header %}{% trans "Create QoS Spec" %}{% endblock %}
|
||||
|
||||
{% block modal-body %}
|
||||
<div class="left">
|
||||
@ -17,16 +17,16 @@
|
||||
<div class="right">
|
||||
<h3>{% trans "Description" %}:</h3>
|
||||
<p>{% blocktrans %}
|
||||
QOS Specs can be associated with volume types.
|
||||
QoS Specs can be associated with volume types.
|
||||
It is used to map to a set of quality of service capabilities requested
|
||||
by the volume owner. This is equivalent to the
|
||||
<tt>cinder qos-create</tt> command. Once the QOS Spec gets created,
|
||||
click the "Manage Specs" button to manage the key-value specs for the QOS Spec.
|
||||
<tt>cinder qos-create</tt> command. Once the QoS Spec gets created,
|
||||
click the "Manage Specs" button to manage the key-value specs for the QoS Spec.
|
||||
<br>
|
||||
<br>
|
||||
Each QOS Specs entity will have a "consumer" value which indicates where the
|
||||
administrator would like the QOS policy to be enforced. This value can be "front-end"
|
||||
(Nova Compute), "back-end" (Cinder back-end), or both.
|
||||
Each QoS Specs entity will have a "Consumer" value which indicates where the
|
||||
administrator would like the QoS policy to be enforced. This value can be "front-end"
|
||||
(Nova Compute), "back-end" (Cinder back-end), or "both".
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% block form_action %}{% url 'horizon:admin:volumes:volume_types:edit_qos_spec_consumer' qos_spec_id %}{% endblock %}
|
||||
|
||||
{% block modal_id %}associate_qos_spec_modal{% endblock %}
|
||||
{% block modal-header %}{% trans "Edit Consumer of QOS Spec" %} {% endblock %}
|
||||
{% block modal-header %}{% trans "Edit Consumer of QoS Spec" %} {% endblock %}
|
||||
|
||||
{% block modal-body %}
|
||||
<div class="left">
|
||||
@ -17,9 +17,9 @@
|
||||
<div class="right">
|
||||
<h3>{% trans "Description:" %}</h3>
|
||||
<p>{% blocktrans %}
|
||||
Each QOS Specs entity will have a "consumer" value which indicates where the
|
||||
administrator would like the QOS policy to be enforced. This value can be "front-end"
|
||||
(Nova Compute), "back-end" (Cinder back-end), or both.
|
||||
Each QoS Specs entity will have a "Consumer" value which indicates where the
|
||||
administrator would like the QoS policy to be enforced. This value can be "front-end"
|
||||
(Nova Compute), "back-end" (Cinder back-end), or "both".
|
||||
{% endblocktrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Associate QOS Spec" %}{% endblock %}
|
||||
{% block title %}{% trans "Associate QoS Spec" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Associate QOS Spec with Volume Type") %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Associate QoS Spec with Volume Type") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create QOS Spec" %}{% endblock %}
|
||||
{% block title %}{% trans "Create QoS Spec" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a QOS Spec") %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a QoS Spec") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Edit QOS Spec Consumer" %}{% endblock %}
|
||||
{% block title %}{% trans "Edit QoS Spec Consumer" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Edit QOS Spec Consumer") %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Edit QoS Spec Consumer") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<h3>{% trans "Description" %}:</h3>
|
||||
<p>{% blocktrans with key=qos_spec_name %}Create a new "spec" key-value pair for QOS Spec "{{ qos_spec_name }}"{% endblocktrans %}</p>
|
||||
<p>{% blocktrans with key=qos_spec_name %}Create a new "spec" key-value pair for QoS Spec "{{ qos_spec_name }}"{% endblocktrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% block title %}{% trans "Edit Spec" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
<h2>{% trans "QOS Spec: " %} {{qos_spec_name}} </h2>
|
||||
<h2>{% trans "QoS Spec: " %} {{qos_spec_name}} </h2>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_header %}
|
||||
<h2>{% trans "QOS Spec" %}: {{qos_spec_name}} </h2>
|
||||
<h2>{% trans "QoS Spec" %}: {{qos_spec_name}} </h2>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
@ -22,8 +22,8 @@ from openstack_dashboard.api import cinder
|
||||
|
||||
class ManageQosSpecAssociation(forms.SelfHandlingForm):
|
||||
qos_spec_choice = forms.ChoiceField(
|
||||
label=_("QOS Spec to be associated"),
|
||||
help_text=_("Choose associated QOS Spec."))
|
||||
label=_("QoS Spec to be associated"),
|
||||
help_text=_("Choose associated QoS Spec."))
|
||||
|
||||
def __init__(self, request, *args, **kwargs):
|
||||
super(ManageQosSpecAssociation, self).__init__(request,
|
||||
@ -68,8 +68,8 @@ class ManageQosSpecAssociation(forms.SelfHandlingForm):
|
||||
|
||||
if found_error:
|
||||
raise forms.ValidationError(
|
||||
_('New associated QOS Spec must be different than '
|
||||
'the current associated QOS Spec.'))
|
||||
_('New associated QoS Spec must be different than '
|
||||
'the current associated QoS Spec.'))
|
||||
return cleaned_new_spec_id
|
||||
|
||||
def handle(self, request, data):
|
||||
@ -100,19 +100,19 @@ class ManageQosSpecAssociation(forms.SelfHandlingForm):
|
||||
vol_type_id)
|
||||
|
||||
messages.success(request,
|
||||
_('Successfully updated QOS Spec association.'))
|
||||
_('Successfully updated QoS Spec association.'))
|
||||
return True
|
||||
except Exception:
|
||||
exceptions.handle(request,
|
||||
_('Error updating QOS Spec association.'))
|
||||
_('Error updating QoS Spec association.'))
|
||||
return False
|
||||
|
||||
|
||||
class EditQosSpecConsumer(forms.SelfHandlingForm):
|
||||
consumer_choice = forms.ChoiceField(
|
||||
label=_("QOS Spec Consumer"),
|
||||
label=_("QoS Spec Consumer"),
|
||||
choices=cinder.CONSUMER_CHOICES,
|
||||
help_text=_("Choose consumer for this QOS Spec."))
|
||||
help_text=_("Choose consumer for this QoS Spec."))
|
||||
|
||||
def __init__(self, request, *args, **kwargs):
|
||||
super(EditQosSpecConsumer, self).__init__(request, *args, **kwargs)
|
||||
@ -128,7 +128,7 @@ class EditQosSpecConsumer(forms.SelfHandlingForm):
|
||||
|
||||
if cleaned_new_consumer == old_consumer:
|
||||
raise forms.ValidationError(
|
||||
_('QOS Spec consumer value must be different than '
|
||||
_('QoS Spec consumer value must be different than '
|
||||
'the current consumer value.'))
|
||||
return cleaned_new_consumer
|
||||
|
||||
@ -142,8 +142,8 @@ class EditQosSpecConsumer(forms.SelfHandlingForm):
|
||||
qos_spec_id,
|
||||
{'consumer': new_consumer})
|
||||
messages.success(request,
|
||||
_('Successfully modified QOS Spec consumer.'))
|
||||
_('Successfully modified QoS Spec consumer.'))
|
||||
return True
|
||||
except Exception:
|
||||
exceptions.handle(request, _('Error editing QOS Spec consumer.'))
|
||||
exceptions.handle(request, _('Error editing QoS Spec consumer.'))
|
||||
return False
|
||||
|
@ -61,7 +61,7 @@ class IndexView(QosSpecMixin, forms.ModalFormMixin, tables.DataTableView):
|
||||
except Exception:
|
||||
qos_list = []
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve QOS spec list.'))
|
||||
_('Unable to retrieve QoS spec list.'))
|
||||
return qos_list
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ class EditKeyValuePairView(QosSpecMixin, forms.ModalFormView):
|
||||
except Exception:
|
||||
qos_specs = {}
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve QOS spec '
|
||||
_('Unable to retrieve QoS spec '
|
||||
'details.'))
|
||||
return {'qos_spec_id': qos_spec_id,
|
||||
'key': key,
|
||||
|
@ -38,7 +38,7 @@ class ViewVolumeTypeExtras(tables.LinkAction):
|
||||
|
||||
class ManageQosSpecAssociation(tables.LinkAction):
|
||||
name = "associate"
|
||||
verbose_name = _("Manage QOS Spec Association")
|
||||
verbose_name = _("Manage QoS Spec Association")
|
||||
url = "horizon:admin:volumes:volume_types:manage_qos_spec_association"
|
||||
classes = ("ajax-modal",)
|
||||
icon = "pencil"
|
||||
@ -70,7 +70,7 @@ class DeleteVolumeType(tables.DeleteAction):
|
||||
class VolumeTypesTable(tables.DataTable):
|
||||
name = tables.Column("name", verbose_name=_("Name"))
|
||||
assoc_qos_spec = tables.Column("associated_qos_spec",
|
||||
verbose_name=_("Associated QOS Spec"))
|
||||
verbose_name=_("Associated QoS Spec"))
|
||||
|
||||
def get_object_display(self, vol_type):
|
||||
return vol_type.name
|
||||
@ -104,7 +104,7 @@ def render_spec_keys(qos_spec):
|
||||
|
||||
class CreateQosSpec(tables.LinkAction):
|
||||
name = "create"
|
||||
verbose_name = _("Create QOS Spec")
|
||||
verbose_name = _("Create QoS Spec")
|
||||
url = "horizon:admin:volumes:volume_types:create_qos_spec"
|
||||
classes = ("ajax-modal",)
|
||||
icon = "plus"
|
||||
@ -115,16 +115,16 @@ class DeleteQosSpecs(tables.DeleteAction):
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
u"Delete QOS Spec",
|
||||
u"Delete QOS Specs",
|
||||
u"Delete QoS Spec",
|
||||
u"Delete QoS Specs",
|
||||
count
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
u"Deleted QOS Spec",
|
||||
u"Deleted QOS Specs",
|
||||
u"Deleted QoS Spec",
|
||||
u"Deleted QoS Specs",
|
||||
count
|
||||
)
|
||||
policy_rules = (("volume", "volume_extension:types_manage"),)
|
||||
@ -158,6 +158,6 @@ class QosSpecsTable(tables.DataTable):
|
||||
|
||||
class Meta:
|
||||
name = "qos_specs"
|
||||
verbose_name = _("QOS Specs")
|
||||
verbose_name = _("QoS Specs")
|
||||
table_actions = (CreateQosSpec, DeleteQosSpecs,)
|
||||
row_actions = (ManageQosSpec, EditConsumer, DeleteQosSpecs)
|
||||
|
@ -66,7 +66,7 @@ class EditQosSpecConsumerView(forms.ModalFormView):
|
||||
try:
|
||||
self._object = api.cinder.qos_spec_get(self.request, qos_spec_id)
|
||||
except Exception:
|
||||
msg = _('Unable to retrieve QOS Spec details.')
|
||||
msg = _('Unable to retrieve QoS Spec details.')
|
||||
exceptions.handle(self.request, msg)
|
||||
return self._object
|
||||
|
||||
@ -108,7 +108,7 @@ class ManageQosSpecAssociationView(forms.ModalFormView):
|
||||
return api.cinder.qos_spec_list(self.request)
|
||||
except Exception:
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve QOS Specs.'))
|
||||
_('Unable to retrieve QoS Specs.'))
|
||||
|
||||
def find_current_qos_spec_association(self, vol_type_id):
|
||||
qos_specs = self.get_qos_specs()
|
||||
@ -127,7 +127,7 @@ class ManageQosSpecAssociationView(forms.ModalFormView):
|
||||
|
||||
except Exception:
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve QOS Spec association.'))
|
||||
_('Unable to retrieve QoS Spec association.'))
|
||||
|
||||
return None
|
||||
|
||||
|
@ -95,10 +95,10 @@ class CreateQosSpec(forms.SelfHandlingForm):
|
||||
data['name'],
|
||||
{'consumer': data['consumer']})
|
||||
messages.success(request,
|
||||
_('Successfully created QOS Spec: %s')
|
||||
_('Successfully created QoS Spec: %s')
|
||||
% data['name'])
|
||||
return qos_spec
|
||||
except Exception:
|
||||
exceptions.handle(request,
|
||||
_('Unable to create QOS Spec.'))
|
||||
_('Unable to create QoS Spec.'))
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user