diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Link.java b/core/src/main/java/org/jclouds/rest/domain/Link.java similarity index 91% rename from vcloud/core/src/main/java/org/jclouds/vcloud/domain/Link.java rename to core/src/main/java/org/jclouds/rest/domain/Link.java index 45feccbadb..dc0b316441 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Link.java +++ b/core/src/main/java/org/jclouds/rest/domain/Link.java @@ -21,16 +21,16 @@ * under the License. * ==================================================================== */ -package org.jclouds.vcloud.domain; +package org.jclouds.rest.domain; import java.net.URI; -import org.jclouds.vcloud.domain.internal.LinkImpl; +import org.jclouds.rest.domain.internal.LinkImpl; import com.google.inject.ImplementedBy; /** - * Location of a vCloud resource + * Location of a Rest resource * * @author Adrian Cole * diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/LinkImpl.java b/core/src/main/java/org/jclouds/rest/domain/internal/LinkImpl.java similarity index 95% rename from vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/LinkImpl.java rename to core/src/main/java/org/jclouds/rest/domain/internal/LinkImpl.java index e25deaabaa..4edf685678 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/LinkImpl.java +++ b/core/src/main/java/org/jclouds/rest/domain/internal/LinkImpl.java @@ -21,14 +21,14 @@ * under the License. * ==================================================================== */ -package org.jclouds.vcloud.domain.internal; +package org.jclouds.rest.domain.internal; import java.net.URI; -import org.jclouds.vcloud.domain.Link; +import org.jclouds.rest.domain.Link; /** - * Location of a vCloud resource + * Location of a Rest resource * * @author Adrian Cole * diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/util/Utils.java b/core/src/main/java/org/jclouds/rest/util/Utils.java similarity index 92% rename from vcloud/core/src/main/java/org/jclouds/vcloud/util/Utils.java rename to core/src/main/java/org/jclouds/rest/util/Utils.java index 35bca128d0..1c4ba8c2e7 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/util/Utils.java +++ b/core/src/main/java/org/jclouds/rest/util/Utils.java @@ -21,13 +21,13 @@ * under the License. * ==================================================================== */ -package org.jclouds.vcloud.util; +package org.jclouds.rest.util; import java.net.URI; import java.util.Map; -import org.jclouds.vcloud.domain.Link; -import org.jclouds.vcloud.domain.internal.LinkImpl; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.xml.sax.Attributes; /** diff --git a/vcloud/core/pom.xml b/vcloud/core/pom.xml index a558f1db51..7dce7c127e 100755 --- a/vcloud/core/pom.xml +++ b/vcloud/core/pom.xml @@ -4,7 +4,7 @@ $Revision$ $Date$ - Copyright (C) 2009 Adrian Cole + Copyright (C) 2009 Cloud Conscious, LLC. ==================================================================== Licensed to the Apache Software Foundation (ASF) under one @@ -34,7 +34,7 @@ 4.0.0 org.jclouds - jclouds-vcloud-core + jclouds-vcloud jclouds vcloud Components Core jar jclouds Core components to access vcloud diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudClient.java b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudClient.java index f6945a1a5b..34c27d59cd 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudClient.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudClient.java @@ -50,13 +50,12 @@ public interface VCloudClient { @Consumes(CATALOG_XML) @XMLResponseParser(CatalogHandler.class) Future getCatalog(); - - + @GET @Endpoint(org.jclouds.vcloud.endpoints.VDC.class) @Consumes(VDC_XML) String getDefaultVDC(); - + // // @GET // @Endpoint(vDC.class) diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/BaseVCloudContextBuilder.java b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudContextBuilder.java similarity index 71% rename from vcloud/core/src/main/java/org/jclouds/vcloud/BaseVCloudContextBuilder.java rename to vcloud/core/src/main/java/org/jclouds/vcloud/VCloudContextBuilder.java index c860eebb18..837daa1bf1 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/BaseVCloudContextBuilder.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudContextBuilder.java @@ -29,18 +29,18 @@ import java.util.concurrent.ExecutorService; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.logging.jdk.config.JDKLoggingModule; +import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContextBuilder; -import org.jclouds.vcloud.config.BaseVCloudContextModule; -import org.jclouds.vcloud.config.BaseVCloudRestClientModule; +import org.jclouds.vcloud.config.VCloudContextModule; +import org.jclouds.vcloud.config.VCloudRestClientModule; import org.jclouds.vcloud.config.VCloudDiscoveryRestClientModule; -import com.google.inject.Injector; import com.google.inject.Module; import com.google.inject.TypeLiteral; /** - * Creates {@link VCloudContext} or {@link Injector} instances based on the most commonly requested - * arguments. + * Creates {@link RestContext} for {@link VCloudClient} instances based on the most commonly + * requested arguments. *

* Note that Threadsafe objects will be bound as singletons to the Injector or Context provided. *

@@ -49,11 +49,12 @@ import com.google.inject.TypeLiteral; * {@link JavaUrlHttpCommandExecutorServiceModule http transports} will be installed. * * @author Adrian Cole - * @see CloudFilesContext + * @see RestContext + * @see VCloudClient */ -public class BaseVCloudContextBuilder extends RestContextBuilder { +public class VCloudContextBuilder extends RestContextBuilder { - public BaseVCloudContextBuilder(Properties props) { + public VCloudContextBuilder(Properties props) { super(new TypeLiteral() { }, props); } @@ -61,22 +62,22 @@ public class BaseVCloudContextBuilder extends RestContextBuilder { @Override protected void addClientModule(List modules) { modules.add(new VCloudDiscoveryRestClientModule()); - modules.add(new BaseVCloudRestClientModule()); + modules.add(new VCloudRestClientModule()); } @Override protected void addContextModule(List modules) { - modules.add(new BaseVCloudContextModule()); + modules.add(new VCloudContextModule()); } @Override - public BaseVCloudContextBuilder withExecutorService(ExecutorService service) { - return (BaseVCloudContextBuilder) super.withExecutorService(service); + public VCloudContextBuilder withExecutorService(ExecutorService service) { + return (VCloudContextBuilder) super.withExecutorService(service); } @Override - public BaseVCloudContextBuilder withModules(Module... modules) { - return (BaseVCloudContextBuilder) super.withModules(modules); + public VCloudContextBuilder withModules(Module... modules) { + return (VCloudContextBuilder) super.withModules(modules); } } diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudLogin.java b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudLogin.java index dbb862f723..7bf1dee17d 100755 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudLogin.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudLogin.java @@ -34,7 +34,7 @@ import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.annotations.Endpoint; import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.ResponseParser; -import org.jclouds.vcloud.domain.Link; +import org.jclouds.rest.domain.Link; import org.jclouds.vcloud.endpoints.Org; import org.jclouds.vcloud.endpoints.VCloud; import org.jclouds.vcloud.functions.ParseLoginResponseFromHeaders; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudToken.java b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudToken.java index a2c61e71c6..dd2f4e1f7b 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudToken.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/VCloudToken.java @@ -32,7 +32,7 @@ import javax.inject.Qualifier; /** * A VCloud Session Token - * + * * @author Adrian Cole * */ diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudContextModule.java b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudContextModule.java similarity index 96% rename from vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudContextModule.java rename to vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudContextModule.java index 21d0f50f63..d26a0d68b7 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudContextModule.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudContextModule.java @@ -41,7 +41,7 @@ import com.google.inject.Provides; /** * @author Adrian Cole */ -public class BaseVCloudContextModule extends AbstractModule { +public class VCloudContextModule extends AbstractModule { @Override protected void configure() { } diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudRestClientModule.java similarity index 97% rename from vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java rename to vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudRestClientModule.java index dcb7613b8a..147f7e085a 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/config/VCloudRestClientModule.java @@ -45,7 +45,7 @@ import com.google.inject.Provides; */ @RequiresHttp @ConfiguresRestClient -public class BaseVCloudRestClientModule extends AbstractModule { +public class VCloudRestClientModule extends AbstractModule { @Override protected void configure() { diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Catalog.java b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Catalog.java index 4becf6f563..25fdcacbbc 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Catalog.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Catalog.java @@ -25,6 +25,7 @@ package org.jclouds.vcloud.domain; import java.util.Map; +import org.jclouds.rest.domain.Link; import org.jclouds.vcloud.domain.internal.CatalogImpl; import com.google.inject.ImplementedBy; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Organization.java b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Organization.java index ade1e547d4..98c22fd5a0 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Organization.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/Organization.java @@ -25,6 +25,7 @@ package org.jclouds.vcloud.domain; import java.util.Map; +import org.jclouds.rest.domain.Link; import org.jclouds.vcloud.domain.internal.OrganizationImpl; import org.jclouds.vcloud.endpoints.Catalog; import org.jclouds.vcloud.endpoints.Org; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java index dd56897a2c..8424f0d047 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java @@ -29,8 +29,9 @@ import java.net.URI; import java.util.HashMap; import java.util.Map; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.Catalog; -import org.jclouds.vcloud.domain.Link; /** * Locations of resources in vCloud diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/OrganizationImpl.java b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/OrganizationImpl.java index 24092d0cd0..9a8661ed63 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/OrganizationImpl.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/domain/internal/OrganizationImpl.java @@ -26,7 +26,8 @@ package org.jclouds.vcloud.domain.internal; import java.net.URI; import java.util.Map; -import org.jclouds.vcloud.domain.Link; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.Organization; import org.jclouds.vcloud.endpoints.Catalog; import org.jclouds.vcloud.endpoints.TasksList; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java b/vcloud/core/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java index fba6f838c8..362a79a413 100755 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java @@ -38,9 +38,9 @@ import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponseException; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.Factory; +import org.jclouds.rest.domain.Link; import org.jclouds.vcloud.VCloudToken; import org.jclouds.vcloud.VCloudLogin.VCloudSession; -import org.jclouds.vcloud.domain.Link; import org.jclouds.vcloud.endpoints.Org; import org.jclouds.vcloud.xml.OrgListHandler; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java index 25446190c3..a5a415830f 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java @@ -23,16 +23,16 @@ */ package org.jclouds.vcloud.xml; -import static org.jclouds.vcloud.util.Utils.putLink; +import static org.jclouds.rest.util.Utils.putLink; import java.net.URI; import java.util.Map; import org.jclouds.http.functions.ParseSax; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.Catalog; -import org.jclouds.vcloud.domain.Link; import org.jclouds.vcloud.domain.internal.CatalogImpl; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java index 28357d4bf3..4fd30bd083 100644 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java @@ -23,20 +23,20 @@ */ package org.jclouds.vcloud.xml; +import static org.jclouds.rest.util.Utils.newLink; +import static org.jclouds.rest.util.Utils.putLink; import static org.jclouds.vcloud.VCloudMediaType.CATALOG_XML; import static org.jclouds.vcloud.VCloudMediaType.ORG_XML; import static org.jclouds.vcloud.VCloudMediaType.TASKSLIST_XML; import static org.jclouds.vcloud.VCloudMediaType.VDC_XML; -import static org.jclouds.vcloud.util.Utils.newLink; -import static org.jclouds.vcloud.util.Utils.putLink; import java.net.URI; import java.util.Map; import org.jclouds.http.functions.ParseSax; -import org.jclouds.vcloud.domain.Link; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.Organization; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.internal.OrganizationImpl; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java index 0490580202..a2dfbaa470 100755 --- a/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java +++ b/vcloud/core/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java @@ -23,13 +23,13 @@ */ package org.jclouds.vcloud.xml; +import static org.jclouds.rest.util.Utils.putLink; import static org.jclouds.vcloud.VCloudMediaType.ORG_XML; -import static org.jclouds.vcloud.util.Utils.putLink; import java.util.Map; import org.jclouds.http.functions.ParseSax; -import org.jclouds.vcloud.domain.Link; +import org.jclouds.rest.domain.Link; import org.xml.sax.Attributes; import org.xml.sax.SAXException; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientLiveTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientLiveTest.java index ab4cef7379..f4fc607068 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientLiveTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientLiveTest.java @@ -55,12 +55,12 @@ public class VCloudClientLiveTest { assertEquals(response.getType(), "application/vnd.vmware.vcloud.catalog+xml"); assert response.size() > 0; } - + @Test public void testDefaultVDC() throws Exception { String response = connection.getDefaultVDC(); assertNotNull(response); -System.err.println(response); + System.err.println(response); } @BeforeGroups(groups = { "live" }) @@ -69,7 +69,7 @@ System.err.println(response); "jclouds.test.endpoint"); account = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String key = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); - connection = new BaseVCloudContextBuilder(new VCloudPropertiesBuilder(URI.create(endpoint), + connection = new VCloudContextBuilder(new VCloudPropertiesBuilder(URI.create(endpoint), account, key).build()).withModules(new Log4JLoggingModule()).buildContext().getApi(); } diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientTest.java index 19b220df8f..3076c1d084 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudClientTest.java @@ -61,7 +61,7 @@ public class VCloudClientTest extends RestClientTest { GeneratedHttpRequest httpMethod = processor.createRequest(method); assertRequestLineEquals(httpMethod, "GET http://catalog HTTP/1.1"); - assertHeadersEqual(httpMethod,"Accept: application/vnd.vmware.vcloud.catalog+xml\n"); + assertHeadersEqual(httpMethod, "Accept: application/vnd.vmware.vcloud.catalog+xml\n"); assertEntityEquals(httpMethod, null); assertResponseParserClassEquals(method, httpMethod, ParseSax.class); diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/BaseVCloudContextBuilderTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudContextBuilderTest.java similarity index 83% rename from vcloud/core/src/test/java/org/jclouds/vcloud/BaseVCloudContextBuilderTest.java rename to vcloud/core/src/test/java/org/jclouds/vcloud/VCloudContextBuilderTest.java index d8b86ae74b..809d4eb95d 100755 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/BaseVCloudContextBuilderTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudContextBuilderTest.java @@ -38,8 +38,8 @@ import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContextBuilder; import org.jclouds.rest.internal.RestContextImpl; -import org.jclouds.vcloud.config.BaseVCloudContextModule; -import org.jclouds.vcloud.config.BaseVCloudRestClientModule; +import org.jclouds.vcloud.config.VCloudContextModule; +import org.jclouds.vcloud.config.VCloudRestClientModule; import org.jclouds.vcloud.endpoints.Org; import org.testng.annotations.Test; @@ -50,12 +50,12 @@ import com.google.inject.Module; import com.google.inject.TypeLiteral; /** - * Tests behavior of modules configured in BaseVCloudContextBuilder + * Tests behavior of modules configured in VCloudContextBuilder * * @author Adrian Cole */ -@Test(groups = "unit", testName = "vcloud.BaseVCloudContextBuilderTest") -public class BaseVCloudContextBuilderTest { +@Test(groups = "unit", testName = "vcloud.VCloudContextBuilderTest") +public class VCloudContextBuilderTest { VCloudClient connection = createMock(VCloudClient.class); @ConfiguresRestClient @@ -86,10 +86,9 @@ public class BaseVCloudContextBuilderTest { assertEquals(context.getEndPoint(), URI.create("http://org")); } - public BaseVCloudContextBuilder builder() { - return new BaseVCloudContextBuilder(new VCloudPropertiesBuilder(URI - .create("http://localhost"), "id", "secret").build()) - .withModules(new StubClientModule()); + public VCloudContextBuilder builder() { + return new VCloudContextBuilder(new VCloudPropertiesBuilder(URI.create("http://localhost"), + "id", "secret").build()).withModules(new StubClientModule()); } public void testBuildInjector() { @@ -102,18 +101,18 @@ public class BaseVCloudContextBuilderTest { protected void testAddContextModule() { List modules = new ArrayList(); - BaseVCloudContextBuilder builder = builder(); + VCloudContextBuilder builder = builder(); builder.addContextModule(modules); assertEquals(modules.size(), 1); - assertEquals(modules.get(0).getClass(), BaseVCloudContextModule.class); + assertEquals(modules.get(0).getClass(), VCloudContextModule.class); } protected void addClientModule() { List modules = new ArrayList(); - BaseVCloudContextBuilder builder = builder(); + VCloudContextBuilder builder = builder(); builder.addClientModule(modules); assertEquals(modules.size(), 1); - assertEquals(modules.get(0).getClass(), BaseVCloudRestClientModule.class); + assertEquals(modules.get(0).getClass(), VCloudRestClientModule.class); } } diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudDiscoveryLiveTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudDiscoveryLiveTest.java index f9a4e1e2cb..bb9cc07a97 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudDiscoveryLiveTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudDiscoveryLiveTest.java @@ -68,6 +68,7 @@ public class VCloudDiscoveryLiveTest { "jclouds.test.endpoint"); String account = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String key = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); + private final class VCloudDiscoveryContextModule extends AbstractModule { @SuppressWarnings( { "unused" }) @@ -83,7 +84,7 @@ public class VCloudDiscoveryLiveTest { } } - + private RestContext context; @Test diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginLiveTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginLiveTest.java index edd7c6caf1..20bb048b48 100755 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginLiveTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudLoginLiveTest.java @@ -69,8 +69,8 @@ public class VCloudLoginLiveTest { @SuppressWarnings( { "unused" }) @Provides @Singleton - RestContext provideContext(Closer closer, VCloudLogin api, - @VCloud URI endPoint, @Named(VCloudConstants.PROPERTY_VCLOUD_USER) String account) { + RestContext provideContext(Closer closer, VCloudLogin api, @VCloud URI endPoint, + @Named(VCloudConstants.PROPERTY_VCLOUD_USER) String account) { return new RestContextImpl(closer, api, endPoint, account); } @@ -110,8 +110,8 @@ public class VCloudLoginLiveTest { @Override protected void addClientModule(List modules) { - properties.setProperty(VCloudConstants.PROPERTY_VCLOUD_ENDPOINT, checkNotNull( - endpoint, "endpoint").toString()); + properties.setProperty(VCloudConstants.PROPERTY_VCLOUD_ENDPOINT, checkNotNull(endpoint, + "endpoint").toString()); properties.setProperty(PROPERTY_VCLOUD_USER, checkNotNull(account, "user")); properties.setProperty(PROPERTY_VCLOUD_KEY, checkNotNull(key, "key")); properties.setProperty(PROPERTY_VCLOUD_SESSIONINTERVAL, "4"); diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/config/RestVCloudAuthenticationModuleTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/config/RestVCloudAuthenticationModuleTest.java index 1497929a50..603714b27c 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/config/RestVCloudAuthenticationModuleTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/config/RestVCloudAuthenticationModuleTest.java @@ -38,10 +38,10 @@ import org.jclouds.http.handlers.CloseContentAndSetExceptionErrorHandler; import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler; +import org.jclouds.rest.domain.Link; import org.jclouds.util.Jsr330; import org.jclouds.vcloud.VCloudLogin; import org.jclouds.vcloud.VCloudLogin.VCloudSession; -import org.jclouds.vcloud.domain.Link; import org.testng.annotations.Test; import com.google.common.base.Supplier; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java index bc439295d4..6a65850eed 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java @@ -31,9 +31,9 @@ import javax.ws.rs.core.HttpHeaders; import org.jclouds.http.HttpResponse; import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.VCloudLogin.VCloudSession; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java index 37b31fbc6e..fb2d83ed31 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java @@ -30,8 +30,8 @@ import java.io.InputStream; import java.net.URI; import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.domain.Catalog; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java index b23938c463..31a21cf21c 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java @@ -32,9 +32,9 @@ import java.io.InputStream; import java.net.URI; import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.Organization; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -63,8 +63,8 @@ public class OrgHandlerTest extends BaseHandlerTest { assertEquals(result.getLocation(), URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")); assertEquals(result.getType(), ORG_XML); - assertEquals(result.getCatalog(), new LinkImpl("Miami Environment 1 Catalog", CATALOG_XML, URI - .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/catalog"))); + assertEquals(result.getCatalog(), new LinkImpl("Miami Environment 1 Catalog", CATALOG_XML, + URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/catalog"))); assertEquals(result.getVDCs(), ImmutableMap.of("Miami Environment 1", new LinkImpl( "Miami Environment 1", VCloudMediaType.VDC_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32")))); diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java index 8030a0b06c..9f03fd9e10 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java @@ -30,9 +30,9 @@ import java.net.URI; import java.util.Map; import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.rest.domain.Link; +import org.jclouds.rest.domain.internal.LinkImpl; import org.jclouds.vcloud.VCloudMediaType; -import org.jclouds.vcloud.domain.Link; -import org.jclouds.vcloud.domain.internal.LinkImpl; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test;