boto/boto — Issue #471: multi dimension metrics in get_metric_statistics are improperly encoded
Author: trun
Created: 2012-01-12 02:52:43+00:00
State: open

Given a cloudwatch metric with the following `dimensions`...

```
{
'InstanceId': ['i-xxxxxxxx'],
'Disk': ['/dev/sdb'],
}
```

... a call to `get_metric_statistics` will fail. The problem is in `build_dimension_param`. Only the inner list of values is enumerated causing both dimensions to be created with the same index. Thus the second dimension will overwrite the first. The fix is to enumerate both the inner and outer loops ensuring that the index value increases for each additional dimension.