peterknife / boto

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

Bug in boto.iam.connection.py #559

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Boto version: 2.0

What steps will reproduce the problem?
1. Create a valid boto.iam.connection
2. Make sure there is an account alias (either created through Amazon's AWS 
console or through its APi or son other way)
3. Try to get the account alias through boto.iam.connection.get_account_alias()

What is the expected output? What do you see instead?
You want get any. You'll get an exception, stating basically, that response is 
Null.

Identified problem: get_account_alias() is using non-pythonized labels to 
access the aliases enveloped in the json response but 
...connection.get_response() returns a json response using pythonized labels.

Solution: Either change the labels in get_account_alias to pythonized labels 
(list_account_aliases-result,...) or you export the "pythonize_name" flag in 
...connection.make_request()and set it to False when calling get_response 
inside of get_account_alias, like:

r = self.get_response('ListAccountAliases', {},pythonize=False)

Original issue reported on code.google.com by kurze.tobias on 12 Oct 2011 at 2:50

GoogleCodeExporter commented 9 years ago
see https://github.com/boto/boto/issues/366

Original comment by Mitch.Ga...@gmail.com on 12 Oct 2011 at 6:45