diff options
-rw-r--r-- | sfc/lib/openstack_utils.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sfc/lib/openstack_utils.py b/sfc/lib/openstack_utils.py index 7e629c26..09b93f37 100644 --- a/sfc/lib/openstack_utils.py +++ b/sfc/lib/openstack_utils.py @@ -42,8 +42,19 @@ class OpenStackSFC: def register_glance_image(self, name, url, img_format, public): logger.info("Registering the image...") - image_settings = ImageConfig(name=name, img_format=img_format, url=url, - public=public, image_user='admin') + # Check whether the image is local or not + if 'http' in url: + image_settings = ImageConfig(name=name, + img_format=img_format, + url=url, + public=public, + image_user='admin') + else: + image_settings = ImageConfig(name=name, + img_format=img_format, + image_file=url, + public=public, + image_user='admin') # TODO Remove this when tacker is part of SNAPS self.image_settings = image_settings |