svn path=/trunk/packages/invirt-remote/; revision=2509
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))