Browse Source

Merge branch 'master' of github.com:gvlproject/cloudbridge

Enis Afgan 10 years ago
parent
commit
997b008227

+ 1 - 1
cloudbridge/cloud/base/__init__.py

@@ -1,4 +1,4 @@
 """
 Public interface exports
 """
-from .impl import BaseCloudProvider  # noqa
+from .provider import BaseCloudProvider  # noqa

+ 0 - 0
cloudbridge/cloud/base/impl.py → cloudbridge/cloud/base/provider.py


+ 1 - 1
cloudbridge/cloud/interfaces/__init__.py

@@ -1,7 +1,7 @@
 """
 Public interface exports
 """
-from .impl import CloudProvider  # noqa
+from .provider import CloudProvider  # noqa
 from .resources import CloudServiceType  # noqa
 from .resources import InstanceState  # noqa
 from .resources import InvalidConfigurationException  # noqa

+ 0 - 0
cloudbridge/cloud/interfaces/impl.py → cloudbridge/cloud/interfaces/provider.py


+ 2 - 2
cloudbridge/cloud/providers/aws/__init__.py

@@ -2,5 +2,5 @@
 Exports from this provider
 """
 
-from .impl import AWSCloudProvider  # noqa
-from .impl import MockAWSCloudProvider  # noqa
+from .provider import AWSCloudProvider  # noqa
+from .provider import MockAWSCloudProvider  # noqa

+ 0 - 0
cloudbridge/cloud/providers/aws/impl.py → cloudbridge/cloud/providers/aws/provider.py


+ 1 - 1
cloudbridge/cloud/providers/aws/services.py

@@ -396,7 +396,7 @@ class AWSImageService(BaseImageService):
         """
         Searches for an image by a given list of attributes
         """
-        filters = {'tag:Name': name}
+        filters = {'name': name}
         images = [AWSMachineImage(self.provider, image) for image in
                   self.provider.ec2_conn.get_all_images(filters=filters)]
         return ClientPagedResultList(self.provider, images,

+ 1 - 1
cloudbridge/cloud/providers/openstack/__init__.py

@@ -2,4 +2,4 @@
 Exports from this provider
 """
 
-from .impl import OpenStackCloudProvider  # noqa
+from .provider import OpenStackCloudProvider  # noqa

+ 0 - 0
cloudbridge/cloud/providers/openstack/impl.py → cloudbridge/cloud/providers/openstack/provider.py


+ 5 - 5
test/test_image_service.py

@@ -65,16 +65,16 @@ class CloudImageServiceTestCase(ProviderTestBase):
                 found_images = self.provider.compute.images.find(name=name)
                 self.assertTrue(
                     len(found_images) == 1,
-                    "Iter images does not return the expected image %s" %
-                    name)
+                    "Find images error: expected image %s but found: %s" %
+                    (name, found_images))
 
                 # check non-existent find
-                found_images = self.provider.compute.images.find(
+                ne_images = self.provider.compute.images.find(
                     name="non_existent")
                 self.assertTrue(
-                    len(found_images) == 0,
+                    len(ne_images) == 0,
                     "Find() for a non-existent image returned %s" %
-                    found_images)
+                    ne_images)
 
                 get_img = self.provider.compute.images.get(
                     test_image.id)