From e16dfb5b1965ce55d925f7ce64050a5870953f0c Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Fri, 2 Oct 2009 14:41:38 +0100 Subject: [PATCH] gnt-os diagnose: show os variants We already show the per-node os variants, also show the global ones. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Olivier Tharan <olive@google.com> --- scripts/gnt-os | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/gnt-os b/scripts/gnt-os index 1aacfacd2..0542a6734 100755 --- a/scripts/gnt-os +++ b/scripts/gnt-os @@ -89,8 +89,8 @@ def DiagnoseOS(opts, args): @return: the desired exit code """ - op = opcodes.OpDiagnoseOS(output_fields=["name", "valid", "node_status"], - names=[]) + op = opcodes.OpDiagnoseOS(output_fields=["name", "valid", "variants", + "node_status"], names=[]) result = SubmitOpCode(op) if not result: @@ -99,7 +99,7 @@ def DiagnoseOS(opts, args): has_bad = False - for os_name, os_valid, node_data in result: + for os_name, os_valid, os_variants, node_data in result: nodes_valid = {} nodes_bad = {} nodes_hidden = {} @@ -140,6 +140,8 @@ def DiagnoseOS(opts, args): ToStdout(msg) ToStdout("OS: %s [global status: %s]", os_name, status) + if os_variants: + ToStdout(" Variants: [%s]" % ', '.join(os_variants)) _OutputPerNodeOSStatus(nodes_valid) _OutputPerNodeOSStatus(nodes_bad) ToStdout("") -- GitLab