def api_create_net(client, *args):
tid, name = args
- data = {'network': {'network-name': '%s' % name}}
+ data = {'network': {'net-name': '%s' % name}}
res = client.create_network(data)
LOG.debug(res)
nid = None
def api_rename_net(client, *args):
tid, nid, name = args
- data = {'network': {'network-name': '%s' % name}}
+ data = {'network': {'net-name': '%s' % name}}
try:
res = client.update_network(nid, data)
except Exception, e:
# Open connection and send request, handling SSL certs
certs = {'key_file':self.key_file, 'cert_file':self.cert_file}
-
- # Only use ssl certs if the cert dict has 1 or more file strings
- if len([x for x in certs if x != None]):
+ certs = {x:certs[x] for x in certs if x != None}
+ print connection_type
+ if self.use_ssl and len(certs):
c = connection_type(self.host, self.port, **certs)
else:
c = connection_type(self.host, self.port)
return status
# To test error codes, set the host to 10.0.0.1, and the port to the code
- def __init__(self, host, port, key_file, cert_file):
+ def __init__(self, host, port=9696, key_file="", cert_file=""):
self.host = host
self.port = port
self.key_file = key_file