Issue 286: terremark ecloud support now works

This commit is contained in:
Adrian Cole 2010-11-01 22:49:55 -07:00
parent d908600e8a
commit 6db5727755
4 changed files with 43 additions and 5 deletions

View File

@ -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<Module> modules) {
modules.add(new TerremarkVCloudComputeServiceContextModule());
modules.add(new TerremarkECloudComputeServiceContextModule());
}
@Override

View File

@ -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;
}

View File

@ -0,0 +1,35 @@
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* 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);
}
}

View File

@ -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";
}