Updating to fix some SSL issues
This commit is contained in:
parent
3e69c52fcd
commit
c438d0575f
|
@ -64,7 +64,7 @@ def create_net(manager, *args):
|
|||
|
||||
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
|
||||
|
@ -133,7 +133,7 @@ def rename_net(manager, *args):
|
|||
|
||||
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:
|
||||
|
|
|
@ -122,9 +122,9 @@ class Client(object):
|
|||
|
||||
# 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)
|
||||
|
|
|
@ -45,7 +45,7 @@ class ServerStub():
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue