Răsfoiți Sursa

Fix openstacksdk connection handling

Nuwan Goonasekera 8 ani în urmă
părinte
comite
c6b7b193a1
3 a modificat fișierele cu 2 adăugiri și 7 ștergeri
  1. 1 5
      cloudbridge/cloud/providers/openstack/provider.py
  2. 0 1
      requirements.txt
  3. 1 1
      setup.py

+ 1 - 5
cloudbridge/cloud/providers/openstack/provider.py

@@ -17,7 +17,6 @@ from novaclient import client as nova_client
 from novaclient import shell as nova_shell
 from novaclient import shell as nova_shell
 
 
 from openstack import connection
 from openstack import connection
-from openstack import profile
 
 
 from swiftclient import client as swift_client
 from swiftclient import client as swift_client
 
 
@@ -125,11 +124,8 @@ class OpenStackCloudProvider(BaseCloudProvider):
         return self._cached_keystone_session
         return self._cached_keystone_session
 
 
     def _connect_openstack(self):
     def _connect_openstack(self):
-        prof = profile.Profile()
-        prof.set_region(profile.Profile.ALL, self.region_name)
-
         return connection.Connection(
         return connection.Connection(
-            profile=prof,
+            region_name=self.region_name,
             user_agent='cloudbridge',
             user_agent='cloudbridge',
             auth_url=self.auth_url,
             auth_url=self.auth_url,
             project_name=self.project_name,
             project_name=self.project_name,

+ 0 - 1
requirements.txt

@@ -1,2 +1 @@
-git+git://github.com/cloudve/moto@all_merged#egg=moto
 -e ".[dev]"
 -e ".[dev]"

+ 1 - 1
setup.py

@@ -34,7 +34,7 @@ REQS_AZURE = ['msrest>=0.4.7',
               'azure-storage>=0.34.0',
               'azure-storage>=0.34.0',
               'pysftp>=0.2.9']
               'pysftp>=0.2.9']
 REQS_OPENSTACK = [
 REQS_OPENSTACK = [
-    'openstacksdk',
+    'openstacksdk>=0.12.0',
     'python-novaclient>=7.0.0',
     'python-novaclient>=7.0.0',
     'python-glanceclient>=2.5.0',
     'python-glanceclient>=2.5.0',
     'python-cinderclient>=1.9.0',
     'python-cinderclient>=1.9.0',