Thanks for the patch. I've made the following changes and merged it into trunk:
- pep8 style fixes
- Changed variable name from "ids" to "size_id". Having a plural name for a variable which isn't a collection is deceiving and confusing.
- Refactored _to_sizes to reduce amount of repeated code.
- Improved assertions in the test - doing a loosely assertion like "self.assertTrue(size.cpu is None or isinstance(size.cpu, float))" is unnecessary and doesn't make sense. Tests use fixtures so the order in which sizes are returned is deterministic.
Next time please also follow the contribution guidelines described at http://libcloud.apache.org/contributing.html. You submitted a git formatted patch which can't be applied directly to a SVN tree so this means more work for us.