]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Updating to fix some SSL issues
authorTyler Smith <tylesmit@cisco.com>
Fri, 29 Jul 2011 21:38:26 +0000 (14:38 -0700)
committerTyler Smith <tylesmit@cisco.com>
Fri, 29 Jul 2011 21:38:26 +0000 (14:38 -0700)
quantum/cli.py
quantum/client.py
tests/unit/api.py

index cce6f52a0c054a8b0a30cd4e0fd09e8aa48cbde0..89edb192162df87ade577a297c08d70f1c0c2b0e 100644 (file)
@@ -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:
index a9d57e9c9d72449d9d75c5061d7b1e3f266b5363..a8b70f8cd906991187310c544877e9077fe49718 100644 (file)
@@ -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)
index 663870bfa775505af2af377fdf90ba4be9321e22..551d0672ebb6cdd2201a1393df1df4f326e93aff 100644 (file)
@@ -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