diff options
| author | Avinash Prasad <avinash.prasad@nttdata.com> | 2013-05-16 07:50:03 -0700 |
|---|---|---|
| committer | Avinash Prasad <avinash.prasad@nttdata.com> | 2013-05-28 23:36:36 -0700 |
| commit | 83dec85cd9ec8217aaaa9764266cdf584d064cdc (patch) | |
| tree | 9b3aabc16edd72d2e39ac906c550a935dcd861c0 /nova/image | |
| parent | 64b234d5cb69fbfd183d74f20d7b243569f6c6f6 (diff) | |
| download | nova-83dec85cd9ec8217aaaa9764266cdf584d064cdc.tar.gz nova-83dec85cd9ec8217aaaa9764266cdf584d064cdc.tar.xz nova-83dec85cd9ec8217aaaa9764266cdf584d064cdc.zip | |
Fix EC2 RegisterImage ImageLocation starts with /
* Allows image location that begins with '/' during EC2 image register
* Adds relevant unit test
Fixes LP bug #1074908
Change-Id: I488b126c2079de4370823b347e80c7ec1ecc2c9f
Diffstat (limited to 'nova/image')
| -rw-r--r-- | nova/image/s3.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/image/s3.py b/nova/image/s3.py index f08cbcdcb..8fa7fc4ad 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -283,10 +283,9 @@ class S3ImageService(object): def _s3_create(self, context, metadata): """Gets a manifest from s3 and makes an image.""" - image_path = tempfile.mkdtemp(dir=CONF.image_decryption_dir) - image_location = metadata['properties']['image_location'] + image_location = metadata['properties']['image_location'].lstrip('/') bucket_name = image_location.split('/')[0] manifest_path = image_location[len(bucket_name) + 1:] bucket = self._conn(context).get_bucket(bucket_name) |
