+ if '--json' in sys.argv[1:]:
+ import cjson
+ print cjson.encode(vms)
+ elif '--pickle' in sys.argv[1:]:
+ import cPickle
+ cPickle.dump(vms, sys.stdout, cPickle.HIGHEST_PROTOCOL)
+ else:
+ import yaml
+ print yaml.dump(vms, Dumper=yaml.CSafeDumper, default_flow_style=False)