From 0ca7e38495509e38f834669975278d1698a07746 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sun, 16 Jan 2011 16:23:45 +0100 Subject: [PATCH] Rename a few instance field titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/query.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/query.py b/lib/query.py index 5a86e1cd9..937b4d3f1 100644 --- a/lib/query.py +++ b/lib/query.py @@ -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), ]) -- GitLab