summaryrefslogtreecommitdiffstats
path: root/nova/image
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-04-05 15:35:17 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2011-04-05 15:35:17 -0700
commit8eff0a91bbc475d8559b39fb81e1a62beda841f3 (patch)
tree76770595b90baba655cfffe65c6ab27581cd2ecb /nova/image
parent56eb682a169c20a9a8275b3b9bfd423f0d562cbc (diff)
update and fix tests
Diffstat (limited to 'nova/image')
-rw-r--r--nova/image/local.py1
-rw-r--r--nova/image/s3.py13
2 files changed, 14 insertions, 0 deletions
diff --git a/nova/image/local.py b/nova/image/local.py
index 92d3dabd4..bad4c2d85 100644
--- a/nova/image/local.py
+++ b/nova/image/local.py
@@ -87,6 +87,7 @@ class LocalImageService(service.BaseImageService):
image_meta = json.load(metadata_file)
if not self._is_image_available(context, image_meta):
raise exception.NotFound
+ return image_meta
except (IOError, ValueError):
raise exception.NotFound
diff --git a/nova/image/s3.py b/nova/image/s3.py
index 93af21022..a7301eefd 100644
--- a/nova/image/s3.py
+++ b/nova/image/s3.py
@@ -46,6 +46,7 @@ flags.DEFINE_string('image_decryption_dir', '/tmp',
class S3ImageService(service.BaseImageService):
+ """Wraps an existing image service to support s3 based register"""
def __init__(self, service=None, *args, **kwargs):
if service == None:
service = utils.import_object(FLAGS.image_service)
@@ -68,6 +69,18 @@ class S3ImageService(service.BaseImageService):
image = self.service.update(context, image_id, metadata, data)
return image
+ def index(self, context):
+ return self.service.index(context)
+
+ def detail(self, context):
+ return self.service.detail(context)
+
+ def show(self, context, image_id):
+ return self.service.show(context, image_id)
+
+ def show_by_name(self, context, name):
+ return self.service.show(context, name)
+
@staticmethod
def _conn(context):
# TODO(vish): is there a better way to get creds to sign