diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudContextBuilder.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudContextBuilder.java index 0660dc110f..9b0d6a59b0 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudContextBuilder.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudContextBuilder.java @@ -25,7 +25,7 @@ import java.util.Properties; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.logging.jdk.config.JDKLoggingModule; import org.jclouds.vcloud.VCloudExpressContextBuilder; -import org.jclouds.vcloud.terremark.compute.config.TerremarkVCloudComputeServiceContextModule; +import org.jclouds.vcloud.terremark.compute.config.TerremarkECloudComputeServiceContextModule; import org.jclouds.vcloud.terremark.config.TerremarkECloudRestClientModule; import com.google.inject.Injector; @@ -52,7 +52,7 @@ public class TerremarkECloudContextBuilder extends VCloudExpressContextBuilder { @Override protected void addContextModule(List modules) { - modules.add(new TerremarkVCloudComputeServiceContextModule()); + modules.add(new TerremarkECloudComputeServiceContextModule()); } @Override diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudPropertiesBuilder.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudPropertiesBuilder.java index 9bec07eb52..547bdaf8f3 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudPropertiesBuilder.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkECloudPropertiesBuilder.java @@ -21,6 +21,7 @@ package org.jclouds.vcloud.terremark; import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; +import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED; import static org.jclouds.vcloud.terremark.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_NAME; import static org.jclouds.vcloud.terremark.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_VERSION; @@ -39,6 +40,8 @@ public class TerremarkECloudPropertiesBuilder extends TerremarkVCloudPropertiesB properties.setProperty(PROPERTY_ENDPOINT, "https://services.enterprisecloud.terremark.com/api"); properties.setProperty(PROPERTY_TERREMARK_EXTENSION_NAME, "eCloudExtensions"); properties.setProperty(PROPERTY_TERREMARK_EXTENSION_VERSION, "2.5"); + // for some reason the centos template is very slow to deploy + properties.setProperty(PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED, 720l * 1000l + ""); return properties; } diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/config/TerremarkECloudComputeServiceContextModule.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/config/TerremarkECloudComputeServiceContextModule.java new file mode 100644 index 0000000000..017c798f46 --- /dev/null +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/config/TerremarkECloudComputeServiceContextModule.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.vcloud.terremark.compute.config; + +import static org.jclouds.compute.domain.OsFamily.CENTOS; + +import org.jclouds.compute.domain.TemplateBuilder; + +import com.google.inject.Injector; + +/** + * @author Adrian Cole + */ +public class TerremarkECloudComputeServiceContextModule extends TerremarkVCloudComputeServiceContextModule { + protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { + return template.osFamily(CENTOS); + } +} diff --git a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTestDisabled.java b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTest.java similarity index 94% rename from vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTestDisabled.java rename to vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTest.java index 9c1086b3f5..3be000c4c8 100644 --- a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTestDisabled.java +++ b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkECloudComputeServiceLiveTest.java @@ -44,9 +44,9 @@ import org.testng.annotations.Test; * * @author Adrian Cole */ -@Test(groups = "live", enabled = false, sequential = true, testName = "terremark.TerremarkVCloudComputeServiceLiveTest") -public class TerremarkECloudComputeServiceLiveTestDisabled extends BaseComputeServiceLiveTest { - public TerremarkECloudComputeServiceLiveTestDisabled() { +@Test(groups = "live", enabled = true, sequential = true, testName = "terremark.TerremarkVCloudComputeServiceLiveTest") +public class TerremarkECloudComputeServiceLiveTest extends BaseComputeServiceLiveTest { + public TerremarkECloudComputeServiceLiveTest() { provider = "trmk-ecloud"; }