VCPU, PCPU replaced to vCPU, pCPU

Writing style of units of measurement has been updated to be more correct.

Change-Id: I3d438239c2cf775f1fafd08f4a3052c9b7daac27
This commit is contained in:
Ivan Anfimov 2025-03-22 11:42:16 +00:00
parent 7bc20945ec
commit be43e6c503
28 changed files with 61 additions and 61 deletions

View File

@ -11,7 +11,7 @@ As of Newton, there are no default flavors. The following table
lists the default flavors for Mitaka and earlier. lists the default flavors for Mitaka and earlier.
============ ========= =============== ============= ============ ========= =============== =============
Flavor VCPUs Disk (in GB) RAM (in MB) Flavor vCPUs Disk (in GB) RAM (in MB)
============ ========= =============== ============= ============ ========= =============== =============
m1.tiny 1 1 512 m1.tiny 1 1 512
m1.small 1 20 2048 m1.small 1 20 2048
@ -40,7 +40,7 @@ Create flavors
**ID** Unique ID (integer or UUID) for the **ID** Unique ID (integer or UUID) for the
new flavor. If specifying 'auto', a new flavor. If specifying 'auto', a
UUID will be automatically generated. UUID will be automatically generated.
**VCPUs** Enter the number of virtual CPUs to **vCPUs** Enter the number of virtual CPUs to
use. use.
**RAM (MB)** Enter the amount of RAM to use, in **RAM (MB)** Enter the amount of RAM to use, in
megabytes. megabytes.

View File

@ -62,7 +62,7 @@ Track usage
Use the :guilabel:`Overview` category to track usage of instances Use the :guilabel:`Overview` category to track usage of instances
for each project. for each project.
You can track costs per month by showing meters like number of VCPUs, You can track costs per month by showing meters like number of vCPUs,
disks, RAM, and uptime of all your instances. disks, RAM, and uptime of all your instances.
#. Log in to the Dashboard and select the :guilabel:`admin` project from the #. Log in to the Dashboard and select the :guilabel:`admin` project from the

View File

@ -71,7 +71,7 @@ The following table describes the Compute and Block Storage service quotas:
| Snapshots | Volume snapshots allowed for | Block Storage | | Snapshots | Volume snapshots allowed for | Block Storage |
| | each project. | | | | each project. | |
+--------------------+------------------------------------+---------------+ +--------------------+------------------------------------+---------------+
| VCPUs | Instance cores allowed for each | Compute | | vCPUs | Instance cores allowed for each | Compute |
| | project. | | | | project. | |
+--------------------+------------------------------------+---------------+ +--------------------+------------------------------------+---------------+
| Volumes | Volumes allowed for each | Block Storage | | Volumes | Volumes allowed for each | Block Storage |

View File

@ -2154,12 +2154,12 @@ Default:
When launching a new instance the default flavor is sorted by RAM usage in When launching a new instance the default flavor is sorted by RAM usage in
ascending order. ascending order.
You can customize the sort order by: id, name, ram, disk and vcpus. You can customize the sort order by: id, name, ram, disk and vCPUs.
Additionally, you can insert any custom callback function. You can also Additionally, you can insert any custom callback function. You can also
provide a flag for reverse sort. provide a flag for reverse sort.
See the description in local_settings.py.example for more information. See the description in local_settings.py.example for more information.
This example sorts flavors by vcpus in descending order: This example sorts flavors by vCPUs in descending order:
.. code-block:: python .. code-block:: python

View File

@ -13,7 +13,7 @@
<dd class="small">{{ usage.summary.instances|default:'0' }}</dd> <dd class="small">{{ usage.summary.instances|default:'0' }}</dd>
<dt class="small">{% trans "Active RAM:" %}</dt> <dt class="small">{% trans "Active RAM:" %}</dt>
<dd class="small">{{ usage.summary.memory_mb|mb_float_format|default:'0' }}</dd> <dd class="small">{{ usage.summary.memory_mb|mb_float_format|default:'0' }}</dd>
<dt class="small">{% trans "This Period's VCPU-Hours:" %}</dt> <dt class="small">{% trans "This Period's vCPU-Hours:" %}</dt>
<dd class="small">{{ usage.summary.vcpu_hours|floatformat:2|default:'0' }}</dd> <dd class="small">{{ usage.summary.vcpu_hours|floatformat:2|default:'0' }}</dd>
<dt class="small">{% trans "This Period's GB-Hours:" %}</dt> <dt class="small">{% trans "This Period's GB-Hours:" %}</dt>
<dd class="small">{{ usage.summary.disk_gb_hours|floatformat:2|default:'0' }}</dd> <dd class="small">{{ usage.summary.disk_gb_hours|floatformat:2|default:'0' }}</dd>

View File

@ -66,7 +66,7 @@ def get_compute_quota_name(quota):
'injected_file_content_bytes': _('Injected File Content (B)'), 'injected_file_content_bytes': _('Injected File Content (B)'),
'injected_file_path_bytes': _('Length of Injected File Path'), 'injected_file_path_bytes': _('Length of Injected File Path'),
'metadata_items': _('Metadata Items'), 'metadata_items': _('Metadata Items'),
'cores': _('VCPUs'), 'cores': _('vCPUs'),
'instances': _('Instances'), 'instances': _('Instances'),
'injected_files': _('Injected Files'), 'injected_files': _('Injected Files'),
'ram': _('RAM (MB)'), 'ram': _('RAM (MB)'),

View File

@ -30,7 +30,7 @@ LOG = logging.getLogger(__name__)
class UpdateDefaultComputeQuotasAction(workflows.Action): class UpdateDefaultComputeQuotasAction(workflows.Action):
instances = forms.IntegerField(min_value=-1, label=_("Instances")) instances = forms.IntegerField(min_value=-1, label=_("Instances"))
cores = forms.IntegerField(min_value=-1, label=_("VCPUs")) cores = forms.IntegerField(min_value=-1, label=_("vCPUs"))
ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)")) ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)"))
metadata_items = forms.IntegerField(min_value=-1, metadata_items = forms.IntegerField(min_value=-1,
label=_("Metadata Items")) label=_("Metadata Items"))

View File

@ -137,7 +137,7 @@ def get_extra_specs(flavor):
class FlavorsTable(tables.DataTable): class FlavorsTable(tables.DataTable):
name = tables.WrappingColumn('name', verbose_name=_('Flavor Name')) name = tables.WrappingColumn('name', verbose_name=_('Flavor Name'))
vcpus = tables.Column('vcpus', verbose_name=_('VCPUs')) vcpus = tables.Column('vcpus', verbose_name=_('vCPUs'))
ram = tables.Column(get_size, ram = tables.Column(get_size,
verbose_name=_('RAM'), verbose_name=_('RAM'),
attrs={'data-type': 'size'}) attrs={'data-type': 'size'})

View File

@ -28,9 +28,9 @@ from openstack_dashboard import api
class CreateFlavorInfoAction(workflows.Action): class CreateFlavorInfoAction(workflows.Action):
_flavor_id_regex = (r'^[a-zA-Z0-9. _-]+$') _flavor_id_regex = (r'^[a-zA-Z0-9. _-]+$')
_flavor_id_help_text = _("flavor id can only contain alphanumeric " _flavor_id_help_text = _("Flavor id can only contain alphanumeric "
"characters, underscores, periods, hyphens, " "characters, underscores, periods, hyphens, "
"spaces. Use 'auto' to automatically generate id") "spaces. Use 'auto' to automatically generate ID.")
name = forms.CharField( name = forms.CharField(
label=_("Name"), label=_("Name"),
max_length=255) max_length=255)
@ -40,7 +40,7 @@ class CreateFlavorInfoAction(workflows.Action):
initial='auto', initial='auto',
max_length=255, max_length=255,
help_text=_flavor_id_help_text) help_text=_flavor_id_help_text)
vcpus = forms.IntegerField(label=_("VCPUs"), vcpus = forms.IntegerField(label=_("vCPUs"),
min_value=1, min_value=1,
max_value=2147483647) max_value=2147483647)
memory_mb = forms.IntegerField(label=_("RAM (MB)"), memory_mb = forms.IntegerField(label=_("RAM (MB)"),

View File

@ -72,21 +72,21 @@ class AdminProvidersTable(tables.DataTable):
name = tables.WrappingColumn("name", name = tables.WrappingColumn("name",
verbose_name=_("Resource Provider Name")) verbose_name=_("Resource Provider Name"))
vcpus_used = tables.Column("vcpus_used", vcpus_used = tables.Column("vcpus_used",
verbose_name=_("VCPUs used")) verbose_name=_("vCPUs used"))
vcpus_reserved = tables.Column("vcpus_reserved", vcpus_reserved = tables.Column("vcpus_reserved",
verbose_name=_("VCPUs reserved")) verbose_name=_("vCPUs reserved"))
vcpus = tables.Column("vcpus", vcpus = tables.Column("vcpus",
verbose_name=_("VCPUs total")) verbose_name=_("vCPUs total"))
vcpus_ar = tables.Column("vcpus_ar", vcpus_ar = tables.Column("vcpus_ar",
verbose_name=_("VCPUs allocation ratio")) verbose_name=_("vCPUs allocation ratio"))
pcpus_used = tables.Column("pcpus_used", pcpus_used = tables.Column("pcpus_used",
verbose_name=_("PCPUs used")) verbose_name=_("pCPUs used"))
pcpus_reserved = tables.Column("pcpus_reserved", pcpus_reserved = tables.Column("pcpus_reserved",
verbose_name=_("PCPUs reserved")) verbose_name=_("pCPUs reserved"))
pcpus = tables.Column("pcpus", pcpus = tables.Column("pcpus",
verbose_name=_("PCPUs total")) verbose_name=_("pCPUs total"))
pcpus_ar = tables.Column("pcpus_ar", pcpus_ar = tables.Column("pcpus_ar",
verbose_name=_("PCPUs allocation ratio")) verbose_name=_("pCPUs allocation ratio"))
memory_used = tables.Column("memory_mb_used", memory_used = tables.Column("memory_mb_used",
verbose_name=_("RAM used"), verbose_name=_("RAM used"),
attrs={'data-type': 'size'}, attrs={'data-type': 'size'},

View File

@ -28,7 +28,7 @@
<h4>{{ provider.name }}</h4> <h4>{{ provider.name }}</h4>
<div class="col-sm-4 d3_quota_bar col-lg-3 col-md-2 col-xs-4"> <div class="col-sm-4 d3_quota_bar col-lg-3 col-md-2 col-xs-4">
<div class="pie-chart-usage" data-used="{% widthratio provider.vcpus_used provider.vcpus_capacity 100 %}"></div> <div class="pie-chart-usage" data-used="{% widthratio provider.vcpus_used provider.vcpus_capacity 100 %}"></div>
<div class="h5">{% trans "VCPU Usage" %}</div> <div class="h5">{% trans "vCPU Usage" %}</div>
{% if provider.inventories.VCPU != None %} {% if provider.inventories.VCPU != None %}
<div class="h6"> <div class="h6">
{% blocktrans with used=provider.vcpus_used|intcomma available=provider.vcpus_capacity|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %} {% blocktrans with used=provider.vcpus_used|intcomma available=provider.vcpus_capacity|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}
@ -38,7 +38,7 @@
<div class="col-sm-4 d3_quota_bar col-lg-3 col-md-2 col-xs-4"> <div class="col-sm-4 d3_quota_bar col-lg-3 col-md-2 col-xs-4">
<div class="pie-chart-usage" data-used="{% widthratio provider.pcpus_used provider.pcpus_capacity 100 %}"></div> <div class="pie-chart-usage" data-used="{% widthratio provider.pcpus_used provider.pcpus_capacity 100 %}"></div>
<div class="h5">{% trans "PCPU Usage" %}</div> <div class="h5">{% trans "pCPU Usage" %}</div>
{% if provider.inventories.PCPU != None %} {% if provider.inventories.PCPU != None %}
<div class="h6"> <div class="h6">
{% blocktrans with used=provider.pcpus_used|intcomma available=provider.pcpus_capacity|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %} {% blocktrans with used=provider.pcpus_used|intcomma available=provider.pcpus_capacity|intcomma %}Used <span> {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans %}

View File

@ -197,7 +197,7 @@ class InstanceViewTest(test.BaseAdminViewTests):
self.assertContains(res, "server_1", 2, 200) self.assertContains(res, "server_1", 2, 200)
self.assertContains(res, "10.0.0.1", 1, 200) self.assertContains(res, "10.0.0.1", 1, 200)
self.assertContains(res, "RAM</th><td>512MB", 1, 200) self.assertContains(res, "RAM</th><td>512MB", 1, 200)
self.assertContains(res, "VCPUs</th><td>1", 1, 200) self.assertContains(res, "vCPUs</th><td>1", 1, 200)
self.assertContains(res, "Size</th><td>0 GB", 1, 200) self.assertContains(res, "Size</th><td>0 GB", 1, 200)
self.assertContains(res, "Active", 1, 200) self.assertContains(res, "Active", 1, 200)
self.assertContains(res, "Running", 1, 200) self.assertContains(res, "Running", 1, 200)

View File

@ -1,6 +1,6 @@
{% load i18n %}{% trans "Usage Report For Period:" %},{{ usage.start|date:"Y-m-d" }},{{ usage.end|date:"Y-m-d" }} {% load i18n %}{% trans "Usage Report For Period:" %},{{ usage.start|date:"Y-m-d" }},{{ usage.end|date:"Y-m-d" }}
{% trans "Active Instances:" %},{{ usage.summary.instances }} {% trans "Active Instances:" %},{{ usage.summary.instances }}
{% trans "Total VCPU Usage (Hours):" %},{{ usage.summary.vcpu_hours|floatformat:2 }} {% trans "Total vCPU Usage (Hours):" %},{{ usage.summary.vcpu_hours|floatformat:2 }}
{% trans "Total Active RAM (MB):" %},{{ usage.summary.memory_mb }} {% trans "Total Active RAM (MB):" %},{{ usage.summary.memory_mb }}
{% trans "Total Memory Usage (Hours):" %},{{ usage.summary.memory_mb_hours|floatformat:2 }} {% trans "Total Memory Usage (Hours):" %},{{ usage.summary.memory_mb_hours|floatformat:2 }}
{% trans "Total Disk Size (GB):" %},{{ usage.summary.local_gb }} {% trans "Total Disk Size (GB):" %},{{ usage.summary.local_gb }}

Can't render this file because it contains an unexpected character in line 1 and column 25.

View File

@ -163,7 +163,7 @@ class UsageViewTests(test.BaseAdminViewTests):
res = self.client.get(csv_url) res = self.client.get(csv_url)
self.assertTemplateUsed(res, 'admin/overview/usage.csv') self.assertTemplateUsed(res, 'admin/overview/usage.csv')
self.assertIsInstance(res.context['usage'], usage.GlobalUsage) self.assertIsInstance(res.context['usage'], usage.GlobalUsage)
hdr = '"Project Name","VCPUs","RAM (MB)","Disk (GB)","Usage (Hours)"' hdr = '"Project Name","vCPUs","RAM (MB)","Disk (GB)","Usage (Hours)"'
self.assertContains(res, '%s\r\n' % hdr) self.assertContains(res, '%s\r\n' % hdr)
if nova_stu_enabled: if nova_stu_enabled:

View File

@ -30,7 +30,7 @@ from openstack_dashboard import usage
class GlobalUsageCsvRenderer(csvbase.BaseCsvResponse): class GlobalUsageCsvRenderer(csvbase.BaseCsvResponse):
columns = [_("Project Name"), _("VCPUs"), _("RAM (MB)"), columns = [_("Project Name"), _("vCPUs"), _("RAM (MB)"),
_("Disk (GB)"), _("Usage (Hours)")] _("Disk (GB)"), _("Usage (Hours)")]
def get_row_data(self): def get_row_data(self):

View File

@ -1201,7 +1201,7 @@ class UsageViewTests(test.BaseAdminViewTests):
self.assertTemplateUsed(res, 'project/overview/usage.csv') self.assertTemplateUsed(res, 'project/overview/usage.csv')
self.assertIsInstance(res.context['usage'], usage.ProjectUsage) self.assertIsInstance(res.context['usage'], usage.ProjectUsage)
hdr = ('"Instance Name","VCPUs","RAM (MB)","Disk (GB)",' hdr = ('"Instance Name","vCPUs","RAM (MB)","Disk (GB)",'
'"Usage (Hours)","Age (Seconds)","State"') '"Usage (Hours)","Age (Seconds)","State"')
self.assertContains(res, '%s\r\n' % hdr) self.assertContains(res, '%s\r\n' % hdr)
@ -1224,7 +1224,7 @@ class UsageViewTests(test.BaseAdminViewTests):
res = self.client.get(csv_url) res = self.client.get(csv_url)
self.assertIsInstance(res.context['usage'], usage.ProjectUsage) self.assertIsInstance(res.context['usage'], usage.ProjectUsage)
hdr = ('"Instance Name","VCPUs","RAM (MB)","Disk (GB)",' hdr = ('"Instance Name","vCPUs","RAM (MB)","Disk (GB)",'
'"Usage (Hours)","Age (Seconds)","State"') '"Usage (Hours)","Age (Seconds)","State"')
self.assertContains(res, '%s\r\n' % hdr) self.assertContains(res, '%s\r\n' % hdr)
usage_1_quoted = ('"\'=cmd|\' /C calc\'!A0","1","512","0","122.87",' usage_1_quoted = ('"\'=cmd|\' /C calc\'!A0","1","512","0","122.87",'

View File

@ -96,7 +96,7 @@ class CommonQuotaAction(workflows.Action):
class ComputeQuotaAction(CommonQuotaAction): class ComputeQuotaAction(CommonQuotaAction):
instances = forms.IntegerField(min_value=-1, label=_("Instances")) instances = forms.IntegerField(min_value=-1, label=_("Instances"))
cores = forms.IntegerField(min_value=-1, label=_("VCPUs")) cores = forms.IntegerField(min_value=-1, label=_("vCPUs"))
ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)")) ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)"))
metadata_items = forms.IntegerField(min_value=-1, metadata_items = forms.IntegerField(min_value=-1,
label=_("Metadata Items")) label=_("Metadata Items"))

View File

@ -69,8 +69,8 @@
<dd>{{ instance.full_flavor.id }}</dd> <dd>{{ instance.full_flavor.id }}</dd>
<dt>{% trans "RAM" %}</dt> <dt>{% trans "RAM" %}</dt>
<dd>{{ instance.full_flavor.ram|mb_float_format }}</dd> <dd>{{ instance.full_flavor.ram|mb_float_format }}</dd>
<dt>{% trans "VCPUs" %}</dt> <dt>{% trans "vCPUs" %}</dt>
<dd>{{ instance.full_flavor.vcpus }} {% trans "VCPU" %}</dd> <dd>{{ instance.full_flavor.vcpus }} {% trans "vCPU" %}</dd>
<dt>{% trans "Disk" %}</dt> <dt>{% trans "Disk" %}</dt>
<dd>{{ instance.full_flavor.disk }}{% trans "GB" %}</dd> <dd>{{ instance.full_flavor.disk }}{% trans "GB" %}</dd>
{% if instance.full_flavor.ephemeral %} {% if instance.full_flavor.ephemeral %}

View File

@ -7,7 +7,7 @@
<table class="flavor_table table table-striped table-fixed"> <table class="flavor_table table table-striped table-fixed">
<tbody> <tbody>
<tr><td class="flavor_name">{% trans "Name" %}</td><td><span id="flavor_name" class="truncate"></span></td></tr> <tr><td class="flavor_name">{% trans "Name" %}</td><td><span id="flavor_name" class="truncate"></span></td></tr>
<tr><td class="flavor_name">{% trans "VCPUs" %}</td><td><span id="flavor_vcpus"></span></td></tr> <tr><td class="flavor_name">{% trans "vCPUs" %}</td><td><span id="flavor_vcpus"></span></td></tr>
<tr><td class="flavor_name">{% trans "Root Disk" %}</td><td><span id="flavor_disk"></span> {% trans "GB" %}</td></tr> <tr><td class="flavor_name">{% trans "Root Disk" %}</td><td><span id="flavor_disk"></span> {% trans "GB" %}</td></tr>
<tr><td class="flavor_name">{% trans "Ephemeral Disk" %}</td><td><span id="flavor_ephemeral"></span> {% trans "GB" %}</td></tr> <tr><td class="flavor_name">{% trans "Ephemeral Disk" %}</td><td><span id="flavor_ephemeral"></span> {% trans "GB" %}</td></tr>
<tr><td class="flavor_name">{% trans "Total Disk" %}</td><td><span id="flavor_disk_total"></span> {% trans "GB" %}</td></tr> <tr><td class="flavor_name">{% trans "Total Disk" %}</td><td><span id="flavor_disk_total"></span> {% trans "GB" %}</td></tr>
@ -38,7 +38,7 @@
{{ endminifyspace }} {{ endminifyspace }}
<div class="quota_title"> <div class="quota_title">
<strong class="pull-left">{% trans "Number of VCPUs" %}</strong> <strong class="pull-left">{% trans "Number of vCPUs" %}</strong>
<span class="pull-right"> <span class="pull-right">
{% blocktrans trimmed with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|intcomma|quotainf %} {% blocktrans trimmed with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|intcomma|quotainf %}
{{ used }} of {{ quota }} Used {{ used }} of {{ quota }} Used

View File

@ -2,7 +2,7 @@
<a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content=" <a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content="
<table class=&quot;table table-bordered&quot;> <table class=&quot;table table-bordered&quot;>
<tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr> <tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr>
<tr><th>{% trans 'VCPUs' %}</th><td>{{ vcpus }}</td></tr> <tr><th>{% trans 'vCPUs' %}</th><td>{{ vcpus }}</td></tr>
<tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr> <tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr>
<tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr> <tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr>
</table> </table>

View File

@ -1,7 +1,7 @@
{% load i18n %}{% trans "Usage Report For Period:" %},{{ usage.start|date:"Y-m-d" }},{{ usage.end|date:"Y-m-d" }} {% load i18n %}{% trans "Usage Report For Period:" %},{{ usage.start|date:"Y-m-d" }},{{ usage.end|date:"Y-m-d" }}
{% trans "Project ID:" %},{{ usage.project_id }} {% trans "Project ID:" %},{{ usage.project_id }}
{% trans "Active Instances:" %},{{ usage.summary.instances }} {% trans "Active Instances:" %},{{ usage.summary.instances }}
{% trans "Total VCPU Usage (Hours):" %},{{ usage.summary.vcpu_hours|floatformat:2 }} {% trans "Total vCPU Usage (Hours):" %},{{ usage.summary.vcpu_hours|floatformat:2 }}
{% trans "Total Active RAM (MB):" %},{{ usage.summary.memory_mb }} {% trans "Total Active RAM (MB):" %},{{ usage.summary.memory_mb }}
{% trans "Total Memory Usage (Hours):" %},{{ usage.summary.memory_mb_hours|floatformat:2 }} {% trans "Total Memory Usage (Hours):" %},{{ usage.summary.memory_mb_hours|floatformat:2 }}
{% trans "Total Disk Size (GB):" %},{{ usage.summary.local_gb }} {% trans "Total Disk Size (GB):" %},{{ usage.summary.local_gb }}

Can't render this file because it contains an unexpected character in line 1 and column 25.

View File

@ -34,7 +34,7 @@ from openstack_dashboard.utils import filters
class ProjectUsageCsvRenderer(csvbase.BaseCsvResponse): class ProjectUsageCsvRenderer(csvbase.BaseCsvResponse):
columns = [_("Instance Name"), _("VCPUs"), _("RAM (MB)"), columns = [_("Instance Name"), _("vCPUs"), _("RAM (MB)"),
_("Disk (GB)"), _("Usage (Hours)"), _("Disk (GB)"), _("Usage (Hours)"),
_("Age (Seconds)"), _("State")] _("Age (Seconds)"), _("State")]

View File

@ -44,7 +44,7 @@
// Labels used by quota charts // Labels used by quota charts
ctrl.chartTotalInstancesLabel = gettext('Total Instances'); ctrl.chartTotalInstancesLabel = gettext('Total Instances');
ctrl.chartTotalVcpusLabel = gettext('Total VCPUs'); ctrl.chartTotalVcpusLabel = gettext('Total vCPUs');
ctrl.chartTotalRamLabel = gettext('Total RAM'); ctrl.chartTotalRamLabel = gettext('Total RAM');
ctrl.chartTotalVolumeLabel = gettext('Total Volumes'); ctrl.chartTotalVolumeLabel = gettext('Total Volumes');
ctrl.chartTotalVolumeStorageLabel = gettext('Total Volume Storage'); ctrl.chartTotalVolumeStorageLabel = gettext('Total Volume Storage');
@ -56,7 +56,7 @@
singleton: true singleton: true
}, },
{ {
label: gettext('VCPUs'), label: gettext('vCPUs'),
name: 'vcpus', name: 'vcpus',
singleton: true singleton: true
}, },
@ -112,7 +112,7 @@
detailsTemplateUrl: basePath + 'flavor/flavor-details.html', detailsTemplateUrl: basePath + 'flavor/flavor-details.html',
columns: [ columns: [
{id: 'name', title: gettext('Name'), priority: 1}, {id: 'name', title: gettext('Name'), priority: 1},
{id: 'vcpus', title: gettext('VCPUS'), priority: 1, {id: 'vcpus', title: gettext('vCPUs'), priority: 1,
template: `<span class="invalid fa fa-exclamation-triangle" template: `<span class="invalid fa fa-exclamation-triangle"
ng-show="item.errors.vcpus" ng-show="item.errors.vcpus"
uib-popover="{$ item.errors.vcpus $}" uib-popover="{$ item.errors.vcpus $}"
@ -419,7 +419,7 @@
var coresRequired = instanceCount * flavor.vcpus; var coresRequired = instanceCount * flavor.vcpus;
if (coresRequired > availableCores) { if (coresRequired > availableCores) {
/*eslint-disable max-len */ /*eslint-disable max-len */
messages.vcpus = gettext('This flavor requires more VCPUs than your quota allows. Please select a smaller flavor or decrease the instance count.'); messages.vcpus = gettext('This flavor requires more vCPUs than your quota allows. Please select a smaller flavor or decrease the instance count.');
/*eslint-enable max-len */ /*eslint-enable max-len */
} }

View File

@ -88,7 +88,7 @@
singleton: true singleton: true
}) })
.append({ .append({
label: gettext('VCPUs'), label: gettext('vCPUs'),
name: 'vcpus', name: 'vcpus',
singleton: true singleton: true
}) })
@ -119,7 +119,7 @@
function flavorProperties() { function flavorProperties() {
return { return {
name: gettext('Flavor Name'), name: gettext('Flavor Name'),
vcpus: gettext('VCPUs'), vcpus: gettext('vCPUs'),
ram: {label: gettext('RAM'), filters: ['mb']}, ram: {label: gettext('RAM'), filters: ['mb']},
disk: {label: gettext('Root Disk'), filters: ['gb']}, disk: {label: gettext('Root Disk'), filters: ['gb']},
'OS-FLV-EXT-DATA:ephemeral': {label: gettext('Ephemeral Disk'), filters: ['gb']}, 'OS-FLV-EXT-DATA:ephemeral': {label: gettext('Ephemeral Disk'), filters: ['gb']},

View File

@ -52,23 +52,23 @@ def test_vcpu_pcpu_data_display(live_server, driver, user, dashboard_data):
driver.get(live_server.url + '/admin/hypervisors') driver.get(live_server.url + '/admin/hypervisors')
assert (driver.find_element_by_xpath( assert (driver.find_element_by_xpath(
f"//*[normalize-space()='VCPU Usage']/" f"//*[normalize-space()='vCPU Usage']/"
f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231 f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231
f"/div[contains(@class,'h6')]/" # noqa: E231 f"/div[contains(@class,'h6')]/" # noqa: E231
f"span[1]").text == str(p['vcpus_used'])) f"span[1]").text == str(p['vcpus_used']))
assert (driver.find_element_by_xpath( assert (driver.find_element_by_xpath(
f"//*[normalize-space()='VCPU Usage']/" f"//*[normalize-space()='vCPU Usage']/"
f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231 f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231
f"/div[contains(@class,'h6')]/" # noqa: E231 f"/div[contains(@class,'h6')]/" # noqa: E231
f"span[2]").text == str(p['vcpus_capacity'])) f"span[2]").text == str(p['vcpus_capacity']))
assert (driver.find_element_by_xpath( assert (driver.find_element_by_xpath(
f"//*[normalize-space()='PCPU Usage']/" f"//*[normalize-space()='pCPU Usage']/"
f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231 f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231
f"/div[contains(@class,'h6')]/" # noqa: E231 f"/div[contains(@class,'h6')]/" # noqa: E231
f"span[1]").text == str(p['pcpus_used'])) f"span[1]").text == str(p['pcpus_used']))
assert (driver.find_element_by_xpath( assert (driver.find_element_by_xpath(
f"//*[normalize-space()='PCPU Usage']/" f"//*[normalize-space()='pCPU Usage']/"
f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231 f"ancestor::div[contains(@class,'d3_quota_bar')]" # noqa: E231
f"/div[contains(@class,'h6')]/" # noqa: E231 f"/div[contains(@class,'h6')]/" # noqa: E231
f"span[2]").text == str(p['pcpus_capacity'])) f"span[2]").text == str(p['pcpus_capacity']))
@ -84,14 +84,14 @@ def test_vcpu_pcpu_data_display(live_server, driver, user, dashboard_data):
table_providers = dict(zip((x.text for x in table_header), table_providers = dict(zip((x.text for x in table_header),
(x.text for x in table_row_test_provider))) (x.text for x in table_row_test_provider)))
want_to_check = {"VCPUs used": p['vcpus_used'], want_to_check = {"vCPUs used": p['vcpus_used'],
"VCPUs reserved": p['vcpus_reserved'], "vCPUs reserved": p['vcpus_reserved'],
"VCPUs total": p['vcpus'], "vCPUs total": p['vcpus'],
"VCPUs allocation ratio": p['vcpus_ar'], "vCPUs allocation ratio": p['vcpus_ar'],
"PCPUs used": p['pcpus_used'], "pCPUs used": p['pcpus_used'],
"PCPUs reserved": p['pcpus_reserved'], "pCPUs reserved": p['pcpus_reserved'],
"PCPUs total": p['pcpus'], "pCPUs total": p['pcpus'],
"PCPUs allocation ratio": p['pcpus_ar']} "pCPUs allocation ratio": p['pcpus_ar']}
for key, value in want_to_check.items(): for key, value in want_to_check.items():
assert table_providers[key] == str(value) assert table_providers[key] == str(value)

View File

@ -93,7 +93,7 @@ QUOTA_FIELDS = NOVA_QUOTA_FIELDS | CINDER_QUOTA_FIELDS | NEUTRON_QUOTA_FIELDS
QUOTA_NAMES = { QUOTA_NAMES = {
# nova # nova
"metadata_items": _('Metadata Items'), "metadata_items": _('Metadata Items'),
"cores": _('VCPUs'), "cores": _('vCPUs'),
"instances": _('Instances'), "instances": _('Instances'),
"injected_files": _('Injected Files'), "injected_files": _('Injected Files'),
"injected_file_content_bytes": _('Injected File Content (B)'), "injected_file_content_bytes": _('Injected File Content (B)'),

View File

@ -29,7 +29,7 @@ class CSVSummary(tables.LinkAction):
class BaseUsageTable(tables.DataTable): class BaseUsageTable(tables.DataTable):
vcpus = tables.Column('vcpus', verbose_name=_("VCPUs")) vcpus = tables.Column('vcpus', verbose_name=_("vCPUs"))
disk = tables.Column('local_gb', verbose_name=_("Disk"), disk = tables.Column('local_gb', verbose_name=_("Disk"),
filters=(sizeformat.diskgbformat,), filters=(sizeformat.diskgbformat,),
attrs={"data-type": "size"}) attrs={"data-type": "size"})
@ -41,9 +41,9 @@ class BaseUsageTable(tables.DataTable):
class GlobalUsageTable(BaseUsageTable): class GlobalUsageTable(BaseUsageTable):
project = tables.Column('project_name', verbose_name=_("Project Name")) project = tables.Column('project_name', verbose_name=_("Project Name"))
vcpu_hours = tables.Column('vcpu_hours', verbose_name=_("VCPU Hours"), vcpu_hours = tables.Column('vcpu_hours', verbose_name=_("vCPU Hours"),
help_text=_("Total VCPU usage (Number of " help_text=_("Total vCPU usage (Number of "
"VCPU in instance * Hours Used) " "vCPU in instance * Hours Used) "
"for the project"), "for the project"),
filters=(lambda v: floatformat(v, 2),)) filters=(lambda v: floatformat(v, 2),))
disk_hours = tables.Column('disk_gb_hours', disk_hours = tables.Column('disk_gb_hours',

View File

@ -114,7 +114,7 @@ CHART_DEFS = [
'title': _("Compute"), 'title': _("Compute"),
'charts': [ 'charts': [
ChartDef("instances", _("Instances"), None, None), ChartDef("instances", _("Instances"), None, None),
ChartDef("cores", _("VCPUs"), None, None), ChartDef("cores", _("vCPUs"), None, None),
ChartDef("ram", _("RAM"), None, (sizeformat.mb_float_format,)), ChartDef("ram", _("RAM"), None, (sizeformat.mb_float_format,)),
], ],
}, },