From 26cc0b37807c345a64dc0b4314cc59cd918d1b81 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 30 Jun 2014 21:40:11 -0700 Subject: [PATCH] nova.py: indented and sorted JSON output --- plugins/inventory/nova.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inventory/nova.py b/plugins/inventory/nova.py index 60da2d83e9e..d935ca0a58f 100755 --- a/plugins/inventory/nova.py +++ b/plugins/inventory/nova.py @@ -199,7 +199,7 @@ if len(sys.argv) == 2 and (sys.argv[1] == '--list'): continue # Return server list - print json.dumps(groups) + print(json.dumps(groups, sort_keys=True, indent=2)) sys.exit(0) ##################################################### @@ -228,7 +228,7 @@ elif len(sys.argv) == 3 and (sys.argv[1] == '--host'): if key != 'os_manager': results[key] = value - print json.dumps(results) + print(json.dumps(results, sort_keys=True, indent=2)) sys.exit(0) else: