From c708e5ab42fe9a2837a358d42bd2ada3b198888d Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Sat, 8 Feb 2014 16:16:02 +0000 Subject: [PATCH] Add image_location param when registering an S3 backde AMI. --- providers/ec2/tasks/ami.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/ec2/tasks/ami.py b/providers/ec2/tasks/ami.py index 582c59e..9e0ff0b 100644 --- a/providers/ec2/tasks/ami.py +++ b/providers/ec2/tasks/ami.py @@ -62,6 +62,7 @@ class UploadImage(Task): s3_url = 'https://s3.cn-north-1.amazonaws.com.cn' else: s3_url = 'https://s3-{region}.amazonaws.com/'.format(region=info.host['region']) + info.manifest.manifest_location = info.manifest.image['bucket'] + '/' + info.ami_name + '.manifest.xml' log_check_call(['/usr/bin/euca-upload-bundle', '--bucket', info.manifest.image['bucket'], '--manifest', manifest_file, @@ -140,6 +141,7 @@ class RegisterAMI(Task): if info.manifest.volume['backing'] == 's3': grub_boot_device = 'hd0' + registration_params['image_location'] = info.manifest.manifest_location else: root_dev_name = {'pvm': '/dev/sda', 'hvm': '/dev/xvda'}.get(info.manifest.data['virtualization'])