X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/b45376be69c54b01310d757487b1e9edabb580a2..f70d04e3d9dc7d60405123bea05cd2d28b69ec4f:/server/usr/sbin/invirt-remote-listuser diff --git a/server/usr/sbin/invirt-remote-listuser b/server/usr/sbin/invirt-remote-listuser index a43412f..dec6da7 100755 --- a/server/usr/sbin/invirt-remote-listuser +++ b/server/usr/sbin/invirt-remote-listuser @@ -19,10 +19,16 @@ def main(argv): database.connect() machines = Machine.query().join('acl').filter_by(user=username) - output = "Machine Name \t\t Owner \t\t contact \n\r" + output = {} for m in machines: - output += m.name + "\t" + m.owner +"\t" + m.contact + "\n\r" + + data = {} + data['owner']=m.owner + data['contact'] = m.contact + output[m.name] = data + print output + print yaml.dump(output, Dumper=yaml.CSafeDumper, default_flow_style=False) return 0 if __name__ == '__main__': sys.exit(main(sys.argv))