extracted Registry from awsInfrastructure

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
extracted MetadataService from aws infrastructure

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
added instance id and registry endpoint fetching to MetadataService

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
use metadataService to find registry settings url

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
moved FakeDNSResolved into its own file

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
return error if 0 dns servers were provided to resolve a host

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
added tests for concreteMetadataService

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
use fakeMetadataService in aws infrastructure SetupSsh test

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
fix SetupNetworking on inf tests

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
use exit code return value instead of $?

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
added tests for registry

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>