Merge pull request #7996 from msabramo/nova.py_JSON_indented_and_sorted
nova.py: indented and sorted JSON output
This commit is contained in:
commit
67e56853d3
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ if len(sys.argv) == 2 and (sys.argv[1] == '--list'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Return server list
|
# Return server list
|
||||||
print json.dumps(groups)
|
print(json.dumps(groups, sort_keys=True, indent=2))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
#####################################################
|
#####################################################
|
||||||
|
@ -116,7 +116,7 @@ elif len(sys.argv) == 3 and (sys.argv[1] == '--host'):
|
||||||
if key != 'os_manager':
|
if key != 'os_manager':
|
||||||
results[key] = value
|
results[key] = value
|
||||||
|
|
||||||
print json.dumps(results)
|
print(json.dumps(results, sort_keys=True, indent=2))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue