vavavr00m / boto

Automatically exported from code.google.com/p/boto
1 stars 0 forks source link

get_instance_attribute() bug #543

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. call get_instance_attribute() with attribute="blockDeviceMapping"
2. trace boto call
3.

What is the expected output? What do you see instead?
AWS response:
'<?xml version="1.0" encoding="UTF-8"?>\n<DescribeInstanceAttributeResponse 
xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">\n    
<requestId>8b12ebe0-20ec-4121-887e-c7a1692dc840</requestId>\n    
<instanceId>i-734bd412</instanceId>\n    <blockDeviceMapping>\n        <item>\n 
           <deviceName>/dev/sda1</deviceName>\n            <ebs>\n              
  <volumeId>vol-58ab4132</volumeId>\n                
<status>attached</status>\n                
<attachTime>2011-08-04T08:29:35.000Z</attachTime>\n                
<deleteOnTermination>true</deleteOnTermination>\n            </ebs>\n        
</item>\n    </blockDeviceMapping>\n</DescribeInstanceAttributeResponse>'

However, after boto parses the xml response, boto's return is:
{u'status': None, u'deviceName': None, u'blockDeviceMapping': None, 
u'attachTime': None, u'instanceId': None, u'volumeId': None, u'item': None, 
u'deleteOnTermination': None, u'requestId': None, 
u'DescribeInstanceAttributeResponse': None, u'ebs': None}

What version of the product are you using? On what operating system?
boto 2.0 centos5.5

Please provide any additional information below.
I believe the bug is in the XML parser of get_object()

Original issue reported on code.google.com by jass.z...@gmail.com on 4 Aug 2011 at 10:35

GoogleCodeExporter commented 9 years ago
This has been fixed.  See:

https://github.com/boto/boto/issues/291

for details.

Original comment by Mitch.Ga...@gmail.com on 5 Aug 2011 at 1:17

GoogleCodeExporter commented 9 years ago
I just tested the fix, and it seems does not work:

aws response:
'<?xml version="1.0" encoding="UTF-8"?>\n<DescribeInstanceAttributeResponse 
xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">\n    
<requestId>c741bc15-115a-4e16-a5f0-df3a1c382feb</requestId>\n    
<instanceId>i-734bd412</instanceId>\n    <blockDeviceMapping>\n        <item>\n 
           <deviceName>/dev/sda1</deviceName>\n            <ebs>\n              
  <volumeId>vol-58ab4132</volumeId>\n                
<status>attached</status>\n                
<attachTime>2011-08-05T04:26:40.000Z</attachTime>\n                
<deleteOnTermination>true</deleteOnTermination>\n            </ebs>\n        
</item>\n    </blockDeviceMapping>\n</DescribeInstanceAttributeResponse>'

boto return:
{u'status': None, u'deviceName': None, u'blockDeviceMapping': None, 
u'attachTime': None, u'instanceId': None, u'volumeId': None, u'item': None, 
u'deleteOnTermination': None, u'requestId': None, 
u'DescribeInstanceAttributeResponse': None, u'ebs': None}

Original comment by jass.z...@gmail.com on 6 Aug 2011 at 3:09