force batch_config.py to use json, as XML has issues (see bug: 798262)

This commit is contained in:
Dan Wendlandt 2011-08-09 01:03:32 -07:00
parent d2618faeaa
commit 26b4bf0f4f

View File

@ -30,7 +30,6 @@ def delete_all_nets(client):
res = client.list_networks() res = client.list_networks()
for n in res["networks"]: for n in res["networks"]:
nid = n["id"] nid = n["id"]
pres = client.list_ports(nid) pres = client.list_ports(nid)
for port in pres["ports"]: for port in pres["ports"]:
pid = port['id'] pid = port['id']
@ -102,7 +101,8 @@ if __name__ == "__main__":
print "nets: %s" % str(nets) print "nets: %s" % str(nets)
client = Client(options.host, options.port, options.ssl, tenant=tenant_id) client = Client(options.host, options.port, options.ssl,
format='json', tenant=tenant_id)
if options.delete: if options.delete:
delete_all_nets(client) delete_all_nets(client)