summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch.Garnaat <Mitch.Garnaat@604d75c7-a419-0410-a38f-bde1a0bd1dbf>2009-12-21 06:54:29 +0000
committerMitch.Garnaat <Mitch.Garnaat@604d75c7-a419-0410-a38f-bde1a0bd1dbf>2009-12-21 06:54:29 +0000
commita6c1d1c34dd682966b8cd821e0e0b4dad35ded7d (patch)
tree84ba5fc35a57668217a04c31dc92404039ac4ccd
parente328a6c80e428fb73e5f4eb2a2cda442445e70a1 (diff)
downloadboto-a6c1d1c34dd682966b8cd821e0e0b4dad35ded7d.tar.gz
Allow BlockDeviceMapping data structure to be part of ImageAttribute.
-rw-r--r--boto/ec2/connection.py6
-rw-r--r--boto/ec2/image.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/boto/ec2/connection.py b/boto/ec2/connection.py
index 6c866148..95749869 100644
--- a/boto/ec2/connection.py
+++ b/boto/ec2/connection.py
@@ -289,7 +289,11 @@ class EC2Connection(AWSQueryConnection):
:param image_id: The Amazon image id for which you want info about
:type attribute: string
- :param attribute: The attribute you need information about
+ :param attribute: The attribute you need information about.
+ Valid choices are:
+ * launchPermission
+ * productCodes
+ * blockDeviceMapping
:rtype: :class:`boto.ec2.image.ImageAttribute`
:return: An ImageAttribute object representing the value of the attribute requested
diff --git a/boto/ec2/image.py b/boto/ec2/image.py
index 6b163382..8ef2513f 100644
--- a/boto/ec2/image.py
+++ b/boto/ec2/image.py
@@ -209,7 +209,11 @@ class ImageAttribute:
self.attrs = {}
def startElement(self, name, attrs, connection):
- return None
+ if name == 'blockDeviceMapping':
+ self.attrs['block_device_mapping'] = BlockDeviceMapping()
+ return self.attrs['block_device_mapping']
+ else:
+ return None
def endElement(self, name, value, connection):
if name == 'launchPermission':