Commit 033d58b0 authored by Iustin Pop's avatar Iustin Pop

Implement uuid in gnt-node/instance list and info

The patch modifies LUQueryInstanceData to return the uuid too and also
adds support for it in the gnt-* scripts.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 19bed813
......@@ -7007,6 +7007,7 @@ class LUQueryInstanceData(NoHooksLU):
"serial_no": instance.serial_no,
"mtime": instance.mtime,
"ctime": instance.ctime,
"uuid": instance.uuid,
}
result[instance.name] = idict
......
......@@ -255,7 +255,7 @@ def ListInstances(opts, args):
"nic.count": "NICs", "nic.ips": "NIC_IPs",
"nic.modes": "NIC_modes", "nic.links": "NIC_links",
"nic.bridges": "NIC_bridges", "nic.macs": "NIC_MACs",
"ctime": "CTime", "mtime": "MTime",
"ctime": "CTime", "mtime": "MTime", "uuid": "UUID",
}
else:
headers = None
......@@ -1088,6 +1088,7 @@ def ShowInstanceConfig(opts, args):
for instance_name in result:
instance = result[instance_name]
buf.write("Instance name: %s\n" % instance["name"])
buf.write("UUID: %s\n" % instance["uuid"])
buf.write("Serial number: %s\n" % instance["serial_no"])
buf.write("Creation time: %s\n" % utils.FormatTime(instance["ctime"]))
buf.write("Modification time: %s\n" % utils.FormatTime(instance["mtime"]))
......
......@@ -56,7 +56,7 @@ _LIST_HEADERS = {
"master": "IsMaster",
"offline": "Offline", "drained": "Drained",
"role": "Role",
"ctime": "CTime", "mtime": "MTime",
"ctime": "CTime", "mtime": "MTime", "uuid": "UUID"
}
#: User-facing storage unit types
......
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