fix bug 817826 and similar error in batch_config.py

This commit is contained in:
Dan Wendlandt 2011-07-29 22:20:52 -07:00
parent 7d6b7ca673
commit 94e46173aa
2 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ def create_net(manager, *args):
def api_create_net(client, *args): def api_create_net(client, *args):
tid, name = args tid, name = args
data = {'network': {'network-name': '%s' % name}} data = {'network': {'net-name': '%s' % name}}
body = Serializer().serialize(data, CONTENT_TYPE) body = Serializer().serialize(data, CONTENT_TYPE)
res = client.do_request(tid, 'POST', "/networks." + FORMAT, body=body) res = client.do_request(tid, 'POST', "/networks." + FORMAT, body=body)
rd = json.loads(res.read()) rd = json.loads(res.read())
@ -185,7 +185,7 @@ def rename_net(manager, *args):
def api_rename_net(client, *args): def api_rename_net(client, *args):
tid, nid, name = args tid, nid, name = args
data = {'network': {'network-name': '%s' % name}} data = {'network': {'net-name': '%s' % name}}
body = Serializer().serialize(data, CONTENT_TYPE) body = Serializer().serialize(data, CONTENT_TYPE)
res = client.do_request(tid, 'PUT', "/networks/%s.%s" % (nid, FORMAT), res = client.do_request(tid, 'PUT', "/networks/%s.%s" % (nid, FORMAT),
body=body) body=body)

View File

@ -84,7 +84,7 @@ def delete_all_nets(client, tenant_id):
def create_net_with_attachments(net_name, iface_ids): def create_net_with_attachments(net_name, iface_ids):
data = {'network': {'network-name': '%s' % net_name}} data = {'network': {'net-name': '%s' % net_name}}
body = Serializer().serialize(data, CONTENT_TYPE) body = Serializer().serialize(data, CONTENT_TYPE)
res = client.do_request(tenant_id, 'POST', res = client.do_request(tenant_id, 'POST',
"/networks." + FORMAT, body=body) "/networks." + FORMAT, body=body)