Revision 7f37f0ca lib/client/gnt_os.py
b/lib/client/gnt_os.py | ||
---|---|---|
75 | 75 |
""" |
76 | 76 |
op = opcodes.OpOsDiagnose(output_fields=["name", "valid", "variants", |
77 | 77 |
"parameters", "api_versions", |
78 |
"blacklisted", "hidden"], |
|
78 |
"blacklisted", "hidden", "os_hvp", |
|
79 |
"osparams"], |
|
79 | 80 |
names=[]) |
80 | 81 |
result = SubmitOpCode(op, opts=opts) |
81 | 82 |
|
... | ... | |
85 | 86 |
|
86 | 87 |
do_filter = bool(args) |
87 | 88 |
|
88 |
for (name, valid, variants, parameters, api_versions, blk, hid) in result: |
|
89 |
total_os_hvp = {} |
|
90 |
total_osparams = {} |
|
91 |
|
|
92 |
for (name, valid, variants, parameters, api_versions, blk, hid, os_hvp, |
|
93 |
osparams) in result: |
|
94 |
total_os_hvp.update(os_hvp) |
|
95 |
total_osparams.update(osparams) |
|
89 | 96 |
if do_filter: |
90 | 97 |
if name not in args: |
91 | 98 |
continue |
... | ... | |
108 | 115 |
ToStdout("") |
109 | 116 |
|
110 | 117 |
if args: |
118 |
all_names = total_os_hvp.keys() + total_osparams.keys() |
|
111 | 119 |
for name in args: |
112 |
ToStdout("%s: ", name) |
|
120 |
if not name in all_names: |
|
121 |
ToStdout("%s: ", name) |
|
122 |
else: |
|
123 |
info = [ |
|
124 |
(name, [ |
|
125 |
("OS-specific hypervisor parameters", total_os_hvp.get(name, {})), |
|
126 |
("OS parameters", total_osparams.get(name, {})), |
|
127 |
]), |
|
128 |
] |
|
129 |
PrintGenericInfo(info) |
|
113 | 130 |
ToStdout("") |
114 | 131 |
|
115 | 132 |
return 0 |
Also available in: Unified diff