Rename ConcreteMetadataService to HTTPMetadataService

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Extract registry endpoint resolver

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Move metadataService and registry creation into infrastructure

AWS and Openstack infrastructures implement MetadataServiceProvider
and RegistryProvider interfaces. MetadataService and Registry
are specific to infrastructure so they are defined on those
infrastructures. They are getting injected into infrastructure
initializers so that they can be easily tested.

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Parse infrastructure options in agent config

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Rename cdutil interface to deviceutil

cdutil is a concrete implementation of deviceutil

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Add DiskUtil to read contents of disk

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Move cdutil, diskutil to cdrom, disk packages accordingly

deviceutil only defines interface and fake

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Add GetFileContentsFromDisk to linux platform

It is using DiskUtil to mount disk to temporary folder, read file and unmount it

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Create config drive metadataservice if UseConfigDrive is set

* Fall back to http metadata service if config drive service fails to load
* Split out metadata service for aws and openstack

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Resolve registry endpoint

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Set userdata and metadata paths in openstack metadata service provider

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Add logs to config drive metadata service

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Fail earlier if disk path does not exist

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Read all files from disk at once

Instead of mounting and reading one file per request, read
all the required files to speed up the boot process

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Unmount temporary directory when reading disk contents

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>
Prefer Godeps path to base go path

Signed-off-by: Maria Shaldibina <mshaldibina@pivotal.io>