Revision d729e03a scripts/gnt-cluster
b/scripts/gnt-cluster | ||
---|---|---|
216 | 216 |
return 0 |
217 | 217 |
|
218 | 218 |
|
219 |
def _PrintGroupedParams(paramsdict, level=1): |
|
219 |
def _PrintGroupedParams(paramsdict, level=1, roman=False):
|
|
220 | 220 |
"""Print Grouped parameters (be, nic, disk) by group. |
221 | 221 |
|
222 | 222 |
@type paramsdict: dict of dicts |
... | ... | |
229 | 229 |
for item, val in sorted(paramsdict.items()): |
230 | 230 |
if isinstance(val, dict): |
231 | 231 |
ToStdout("%s- %s:", indent, item) |
232 |
_PrintGroupedParams(val, level=level + 1) |
|
232 |
_PrintGroupedParams(val, level=level + 1, roman=roman) |
|
233 |
elif roman and isinstance(val, int): |
|
234 |
ToStdout("%s %s: %s", indent, item, compat.TryToRoman(val)) |
|
233 | 235 |
else: |
234 | 236 |
ToStdout("%s %s: %s", indent, item, val) |
235 | 237 |
|
... | ... | |
276 | 278 |
_PrintGroupedParams(result["os_hvp"]) |
277 | 279 |
|
278 | 280 |
ToStdout("Cluster parameters:") |
279 |
ToStdout(" - candidate pool size: %s", result["candidate_pool_size"]) |
|
281 |
ToStdout(" - candidate pool size: %s", |
|
282 |
compat.TryToRoman(result["candidate_pool_size"], |
|
283 |
convert=opts.roman_integers)) |
|
280 | 284 |
ToStdout(" - master netdev: %s", result["master_netdev"]) |
281 | 285 |
ToStdout(" - lvm volume group: %s", result["volume_group_name"]) |
282 | 286 |
ToStdout(" - file storage path: %s", result["file_storage_dir"]) |
283 | 287 |
ToStdout(" - maintenance of node health: %s", |
284 | 288 |
result["maintain_node_health"]) |
285 |
ToStdout(" - uid pool: %s", uidpool.FormatUidPool(result["uid_pool"])) |
|
289 |
ToStdout(" - uid pool: %s", |
|
290 |
uidpool.FormatUidPool(result["uid_pool"], |
|
291 |
roman=opts.roman_integers)) |
|
286 | 292 |
|
287 | 293 |
ToStdout("Default instance parameters:") |
288 |
_PrintGroupedParams(result["beparams"]) |
|
294 |
_PrintGroupedParams(result["beparams"], roman=opts.roman_integers)
|
|
289 | 295 |
|
290 | 296 |
ToStdout("Default nic parameters:") |
291 |
_PrintGroupedParams(result["nicparams"]) |
|
297 |
_PrintGroupedParams(result["nicparams"], roman=opts.roman_integers)
|
|
292 | 298 |
|
293 | 299 |
return 0 |
294 | 300 |
|
... | ... | |
789 | 795 |
[NODE_LIST_OPT], |
790 | 796 |
"[-n node...] <command>", "Runs a command on all (or only some) nodes"), |
791 | 797 |
'info': ( |
792 |
ShowClusterConfig, ARGS_NONE, [], |
|
793 |
"", "Show cluster configuration"), |
|
798 |
ShowClusterConfig, ARGS_NONE, [ROMAN_OPT],
|
|
799 |
"[--roman]", "Show cluster configuration"),
|
|
794 | 800 |
'list-tags': ( |
795 | 801 |
ListTags, ARGS_NONE, [], "", "List the tags of the cluster"), |
796 | 802 |
'add-tags': ( |
Also available in: Unified diff