[python26-boto/el5/master: 17/26] Backported upstream patch for image registration (#561216)

gholms gholms at fedoraproject.org
Fri Mar 4 17:51:19 UTC 2011


commit 42551d7ba1bf5dd6f87246b89baad67ce8ef8e07
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Tue Feb 9 00:42:54 2010 +0000

    Backported upstream patch for image registration (#561216)

 python-boto-1.9b-image.patch |   42 ++++++++++++++++++++++++++++++++++++++++++
 python-boto.spec             |    7 ++++++-
 2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/python-boto-1.9b-image.patch b/python-boto-1.9b-image.patch
new file mode 100644
index 0000000..1c93a77
--- /dev/null
+++ b/python-boto-1.9b-image.patch
@@ -0,0 +1,42 @@
+Don't require Name param on RegisterImage (even though EC2 docs say it is required)
+and change Image to ImageLocation. Fixes issue 323:
+
+ - http://code.google.com/p/boto/issues/detail?id=323
+ - http://code.google.com/p/boto/source/detail?r=1448
+
+--- boto-1.9b/boto/ec2/connection.py		2009-12-21 14:59:03.000000000 +0100
++++ boto-1.9b/boto/ec2/connection.py.image	2010-02-09 01:36:11.000000000 +0100
+@@ -176,11 +176,11 @@
+         except IndexError: # None of those images available
+             return None
+ 
+-    def register_image(self, name, description=None, image_location=None,
++    def register_image(self, name=None, description=None, image_location=None,
+                        architecture=None, kernel_id=None, ramdisk_id=None,
+                        root_device_name=None, block_device_map=None):
+         """
+-        Register an image.
++        Register an image.  Valid only for EBS-based images.
+ 
+         :type name: string
+         :param name: The name of the AMI.
+@@ -210,7 +210,9 @@
+         :rtype: string
+         :return: The new image id
+         """
+-        params = {'Name': name}
++        params = {}
++        if name:
++            params['Name'] = name
+         if description:
+             params['Description'] = description
+         if architecture:
+@@ -220,7 +222,7 @@
+         if ramdisk_id:
+             params['RamdiskId'] = ramdisk_id
+         if image_location:
+-            params['Location'] = image_location
++            params['ImageLocation'] = image_location
+         if root_device_name:
+             params['RootDeviceName'] = root_device_name
+         if block_device_map:
diff --git a/python-boto.spec b/python-boto.spec
index 84af98c..b5c8675 100644
--- a/python-boto.spec
+++ b/python-boto.spec
@@ -4,11 +4,12 @@
 Summary:	A simple lightweight interface to Amazon Web Services
 Name:		python-boto
 Version:	1.9b
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	MIT
 Group:		Development/Languages
 URL:		http://code.google.com/p/%{pkgname}/
 Source:		http://boto.googlecode.com/files/%{pkgname}-%{version}.tar.gz
+Patch0:		python-boto-1.9b-image.patch
 BuildRequires:	python-devel, python-setuptools-devel
 BuildArch:	noarch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -22,6 +23,7 @@ use, lightweight wrapper around the Amazon services.
 
 %prep
 %setup -q -n %{pkgname}-%{version}
+%patch0 -p1 -b .image
 
 %build
 %{__python} setup.py build
@@ -46,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/*
 
 %changelog
+* Tue Feb 09 2010 Robert Scheck <robert at fedoraproject.org> 1.9b-2
+- Backported upstream patch for image registration (#561216)
+
 * Sat Jan 09 2010 Robert Scheck <robert at fedoraproject.org> 1.9b-1
 - Upgrade to 1.9b
 


More information about the scm-commits mailing list