Commit 0ca7e384 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename a few instance field titles



The conversion to querylib introduced unique field titles, which however
did an inconsistent rename of the instance vcpus/memory fields.

This patch makes both BE_MEMORY and _VCPUS be named with prefix “Config”
(which before was “Configured_”), and drops the “Runtime” (note no
underscore) prefix on the oper_ ones.

Rationale: for numeric fields, the width of the title defines the width
of the columns, as the numbers are usually small. Hence these columns
(more likely used than the BE ones) would be very wide, leading to a
not-so-nice display. I happened upon this when my terminals didn't
manage to fit a gnt-instance list anymore.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent e2d188cc
......@@ -998,8 +998,8 @@ def _GetInstanceParameterFields():
# TODO: Consider moving titles closer to constants
be_title = {
constants.BE_AUTO_BALANCE: "Auto_balance",
constants.BE_MEMORY: "Configured_memory",
constants.BE_VCPUS: "VCPUs",
constants.BE_MEMORY: "ConfigMemory",
constants.BE_VCPUS: "ConfigVCPUs",
}
hv_title = {
......@@ -1093,9 +1093,9 @@ def _BuildInstanceFields():
fields.extend([
(_MakeField("oper_state", "Running", QFT_BOOL), IQ_LIVE,
_GetInstOperState),
(_MakeField("oper_ram", "RuntimeMemory", QFT_UNIT), IQ_LIVE,
(_MakeField("oper_ram", "Memory", QFT_UNIT), IQ_LIVE,
_GetInstLiveData("memory")),
(_MakeField("oper_vcpus", "RuntimeVCPUs", QFT_NUMBER), IQ_LIVE,
(_MakeField("oper_vcpus", "VCPUs", QFT_NUMBER), IQ_LIVE,
_GetInstLiveData("vcpus")),
(_MakeField("status", "Status", QFT_TEXT), IQ_LIVE, _GetInstStatus),
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment