~cloud-init-dev/cloud-init/trunk

Viewing all changes in revision 715.

  • Committer: Scott Moser
  • Date: 2012-11-12 15:01:02 UTC
  • mfrom: (696.2.7 boto-metadata-fixings)
  • Revision ID: smoser@ubuntu.com-20121112150102-529c9kelahta0lty
wrap boto.utils.get_instance_metadata to ensure non-lazy loading

newer versions of boto lazily load the metadata from the ec2
metadata service. Here, we:

1. Add a ec2_utils module that checks which version of boto is being used and
   under the right versions the metadata dictionary will be expanded.
2. Use this new ec2_utils module in the cloudstack and ec2
   datasources as there entrypoints into boto.
3. Add a dependency on python-pkg-resources (from pkg_resources import
   parse_version) to determine the boto version.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: