Scott Moser e89bdd0c6a ec2_utils.py: get_instance_metadata explicitly add trailing /
This change works around a bug in CloudStack's EC2 api implementation.
That is filed upstream at [1].

The fix is safe for openstack and EC2 use cases as well.
EC2 and OpenStacks' EC2 metadata service both return a list with
access to either of:
  <url_base>/latest/meta-data
  <url_base>/latest/meta-data/

Additionally, the responses explicitly contain a trailing '/' for
items that have a child.  The ec2_utils code then just re-uses the trailng
/ there.  Thus, only the top level request for 'meta-data/' needs
the explicit fix.

This also changes test cases.  Those test cases failed without fixing
them.  If ever this regressed, those would fail again.

--
[1] https://issues.apache.org/jira/browse/CLOUDSTACK-7405
2014-08-22 11:40:25 -04:00
..
2013-07-24 13:31:16 -04:00
2012-10-27 19:25:48 -07:00