Permalink
Browse files

Allow BlockDeviceMapping data structure to be part of ImageAttribute.

  • Loading branch information...
1 parent e328a6c commit a6c1d1c34dd682966b8cd821e0e0b4dad35ded7d Mitch.Garnaat committed Dec 21, 2009
Showing with 10 additions and 2 deletions.
  1. +5 −1 boto/ec2/connection.py
  2. +5 −1 boto/ec2/image.py
View
@@ -289,7 +289,11 @@ def get_image_attribute(self, image_id, attribute='launchPermission'):
: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
View
@@ -209,7 +209,11 @@ def __init__(self, parent=None):
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':

0 comments on commit a6c1d1c

Please sign in to comment.