peterknife / boto

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

describe_alarms() bug #544

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a cloudwatch alarm 
2. call describe_alarms()
3.

What is the expected output? What do you see instead?
AWS response:
<DescribeAlarmsResponse 
xmlns="http://monitoring.amazonaws.com/doc/2010-08-01/">\n  
    <DescribeAlarmsResult>\n    
        <MetricAlarms>\n      
             <member>\n        
                <AlarmDescription>testing alarm</AlarmDescription>\n        
                <StateUpdatedTimestamp>2011-08-03T09:32:15.061Z</StateUpdatedTimestamp>\n        
                <InsufficientDataActions/>\n        
                <StateReasonData>{&quot;version&quot;:&quot;1.0&quot;,&quot;queryDate&quot;:&quot;2011-08-03T09:32:15.047+0000&quot;,&quot;unit&quot;:&quot;Kilobytes/Second&quot;,&quot;statistic&quot;:&quot;Maximum&quot;,&quot;period&quot;:60,&quot;recentDatapoints&quot;:[],&quot;threshold&quot;:1.0E7}</StateReasonData>\n        
                <AlarmArn>arn:aws:cloudwatch:us-east-1:731871899911:alarm:testing alarm</AlarmArn>\n        
                <AlarmConfigurationUpdatedTimestamp>2011-08-03T09:36:34.189Z</AlarmConfigurationUpdatedTimestamp>\n        
                <AlarmName>testing alarm</AlarmName>\n        
                <StateValue>INSUFFICIENT_DATA</StateValue>\n        
                <Period>60</Period>\n        
                <OKActions/>\n        
                <ActionsEnabled>false</ActionsEnabled>\n        
                <Namespace>AWS/EC2</Namespace>\n        
                <EvaluationPeriods>60</EvaluationPeriods>\n        
                <Threshold>1.0E7</Threshold>\n        
                <Statistic>Maximum</Statistic>\n        
                <Unit>Kilobytes/Second</Unit>\n        
                <AlarmActions>\n          
                    <member>arn:aws:sns:us-east-1:731871899911:testing-topic</member>\n       
                </AlarmActions>\n        
                <StateReason>Insufficient Data: 60 datapoints were unknown.</StateReason>\n        
                <Dimensions>\n          
                    <member>\n            
                        <Name>InstanceId</Name>\n            
                        <Value>i-a32bf0c2</Value>\n          
                    </member>\n        
                </Dimensions>\n        
                <ComparisonOperator>GreaterThanThreshold</ComparisonOperator>\n        
                <MetricName>DiskWriteBytes</MetricName>\n      
            </member>\n    
        </MetricAlarms>\n  
    </DescribeAlarmsResult>\n  

    <ResponseMetadata>\n    
        <RequestId>ecf50b36-bfdb-11e0-9a0e-29f74b1a9520</RequestId>\n   
    </ResponseMetadata>\n
</DescribeAlarmsResponse>\n'

boto's xml parser seems have some bug, which leads to incorrect xml parsing 
result.

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

Please provide any additional information below.
I think boto xml parser code has some bug, which is the root cause of several 
bugs I have reported.

Original issue reported on code.google.com by jass.z...@gmail.com on 6 Aug 2011 at 3:37

GoogleCodeExporter commented 9 years ago
Can you be a bit more specific about the actual problem you are seeing?  Is the 
parser throwing an exception?  Is some of the data in the XML being ignored or 
misinterpreted?  I am doing some work on the CloudWatch module right now and 
would like to take care of this issue, if possible.

Original comment by Mitch.Ga...@gmail.com on 21 Sep 2011 at 2:13

GoogleCodeExporter commented 9 years ago
From my testing results:
StateUpdatedTimestamp, Dimensions, ComparisonOperator, 
AlarmConfigurationUpdatedTimestamp, StateReasonData are ignored

Also, wondering whether it is possible to let user fill http request and parse 
xml response manually, boto will only generate the auth params? The primary 
benefit is easy-bug-fix and AWS-API-independent? I noticed boto2.0 still use 
2011-01-01 version.

Original comment by jass.z...@gmail.com on 21 Sep 2011 at 2:22

GoogleCodeExporter commented 9 years ago
I have created a pull request to fix this: 
https://github.com/boto/boto/pull/414 .

Original comment by william....@gmail.com on 21 Nov 2011 at 7:22