From ded3bcf122e61bc03ab6b05c3536b09ce2d38271 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Tue, 24 Jun 2014 19:26:07 -0700 Subject: [PATCH] metadata: add links to metadata source information --- datasource/metadata_service.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datasource/metadata_service.go b/datasource/metadata_service.go index 79ee559..996071c 100644 --- a/datasource/metadata_service.go +++ b/datasource/metadata_service.go @@ -9,6 +9,13 @@ import ( "github.com/coreos/coreos-cloudinit/pkg" ) +// metadataService retrieves metadata from either an OpenStack[1] or EC2[2] compatible endpoint. +// It will first attempt to directly retrieve a JSON blob from the OpenStack endpoint. If that +// fails with a 404, it then attempts to retrieve metadata bit-by-bit from the EC2 endpoint, +// and populates that into an equivalent JSON blob. +// +// [1] http://docs.openstack.org/grizzly/openstack-compute/admin/content/metadata-service.html +// [2] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html#instancedata-data-categories type metadataService struct { url string }