| Age | Commit message (Collapse) | Author | 
 | 
This adds a DataSource for DigitalOcean's metadata service. The service is
documented at https://developers.digitalocean.com/metadata/ .
 | 
 | 
There are a couple new test cases that are now erroring out.
- A usage of the non helper unit testcase base which is trigging
  and error on python 2.6 due to lack of method, fix this by using
  the base helper class.
- A freebsd distro test check thats looking for /etc/resolv.conf and
  examining its contents, which won't exist due to our mocking routine
  that does not allow that file to be read.
- A freebsd distro test where the distro class tries to call into 
  ['ifconfig', '-a'] for a set of values, those values don't exist on
  the machine I am running on (and likely others machines) so we should
  mock the subp function out (that the distro class calls) and correctly
  return values that will work for the testcase.
 | 
 | 
For now, this vendor data handling is just added to openstack.
However, in an effort to allow sanely handling of multi-part vendor-data
that is namespaced, we add openstack.convert_vendordata_json .
That basically takes whatever was loaded from vendordata and takes
the 'cloud-init' key if it is a dict.  This way the author can
namespace cloud-init, basically telling it to ignore everything else.
 | 
 | 
instead of taking a version that they should look for,
the readers now just select the highest supported version.
definitely a use case later for having version= but nothing 
is using it now.
 | 
 | 
 | 
 | 
 | 
 | 
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
LP: #1356855
 | 
 | 
 | 
 | 
previously this would fail:
  http_proxy=http://foo.bar make test
now it will pass.  This works around a bug where httpretty is not able to
patch http operations if http_proxy is set.
https://github.com/gabrielfalcao/HTTPretty/issues/122
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 |