Issue 976:update to support eucalyptus 3

This commit is contained in:
Adrian Cole 2012-06-15 19:13:38 -04:00
parent d29fbba783
commit a928746528
13 changed files with 375 additions and 35 deletions

View File

@ -55,7 +55,7 @@ public class DescribeRegionsResponseHandler extends ParseSax.HandlerWithResult<M
String pending = currentText.toString().trim(); String pending = currentText.toString().trim();
if (pending.indexOf("Walrus") == -1) if (pending.indexOf("Walrus") == -1)
regionEndpoint = URI.create(pending.startsWith("http") ? pending : String.format("https://%s", pending)); regionEndpoint = URI.create(pending.startsWith("http") ? pending : String.format("https://%s", pending));
} else if (qName.equals("item") && region != null) { } else if (qName.equals("item") && region != null && regionEndpoint != null) {
regionEndpoints.put(region, regionEndpoint); regionEndpoints.put(region, regionEndpoint);
this.region = null; this.region = null;
this.regionEndpoint = null; this.regionEndpoint = null;

View File

@ -0,0 +1,138 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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.ec2.config;
import static org.testng.Assert.assertEquals;
import java.net.URI;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.jclouds.ec2.internal.BaseEC2ExpectTest;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.location.Region;
import org.jclouds.location.Zone;
import org.jclouds.location.functions.ZoneToEndpoint;
import org.testng.annotations.Test;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;
/**
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "EC2RestClientModuleExpectTest")
public class EC2RestClientModuleExpectTest extends BaseEC2ExpectTest<Injector> {
private Injector injector;
public EC2RestClientModuleExpectTest() {
Builder<HttpRequest, HttpResponse> builder = ImmutableMap.<HttpRequest, HttpResponse> builder();
builder.put(describeRegionsRequest, describeRegionsResponse);
builder.putAll(describeAvailabilityZonesRequestResponse);
injector = requestsSendResponses(builder.build());
}
public void testLocationIdAndURIBindings() {
assertEquals(injector.getInstance(Key.get(new TypeLiteral<Supplier<Set<String>>>() {
}, Region.class)).get(), ImmutableSet.<String> of("sa-east-1", "ap-northeast-1", "eu-west-1", "us-east-1",
"us-west-1", "us-west-2", "ap-southeast-1"));
assertEquals(injector.getInstance(Key.get(new TypeLiteral<Supplier<Set<String>>>() {
}, Zone.class)).get(), ImmutableSet.<String> of("sa-east-1a", "sa-east-1b", "ap-northeast-1a", "ap-northeast-1b",
"eu-west-1a", "eu-west-1b", "eu-west-1c", "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d",
"us-east-1e", "us-west-1a", "us-west-1b", "us-west-1c", "us-west-2a", "us-west-2b", "us-west-2c",
"ap-southeast-1a", "ap-southeast-1b"));
Map<String, Supplier<URI>> regionToURISupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<URI>>>>() {
}, Region.class)).get();
assertEquals(regionToURISupplier.get("sa-east-1").get(), URI.create("https://ec2.sa-east-1.amazonaws.com"));
assertEquals(regionToURISupplier.get("ap-northeast-1").get(),
URI.create("https://ec2.ap-northeast-1.amazonaws.com"));
assertEquals(regionToURISupplier.get("eu-west-1").get(), URI.create("https://ec2.eu-west-1.amazonaws.com"));
assertEquals(regionToURISupplier.get("us-east-1").get(), URI.create("https://ec2.us-east-1.amazonaws.com"));
assertEquals(regionToURISupplier.get("us-west-1").get(), URI.create("https://ec2.us-west-1.amazonaws.com"));
assertEquals(regionToURISupplier.get("us-west-2").get(), URI.create("https://ec2.us-west-2.amazonaws.com"));
assertEquals(regionToURISupplier.get("ap-southeast-1").get(),
URI.create("https://ec2.ap-southeast-1.amazonaws.com"));
Map<String, Supplier<Set<String>>> regionToZoneIdSupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<Set<String>>>>>() {
}, Zone.class)).get();
assertEquals(regionToZoneIdSupplier.get("sa-east-1").get(), ImmutableSet.of("sa-east-1a", "sa-east-1b"));
assertEquals(regionToZoneIdSupplier.get("ap-northeast-1").get(),
ImmutableSet.of("ap-northeast-1a", "ap-northeast-1b"));
assertEquals(regionToZoneIdSupplier.get("eu-west-1").get(),
ImmutableSet.of("eu-west-1a", "eu-west-1b", "eu-west-1c"));
assertEquals(regionToZoneIdSupplier.get("us-east-1").get(),
ImmutableSet.of("us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1e"));
assertEquals(regionToZoneIdSupplier.get("us-west-1").get(),
ImmutableSet.of("us-west-1a", "us-west-1b", "us-west-1c"));
assertEquals(regionToZoneIdSupplier.get("us-west-2").get(),
ImmutableSet.of("us-west-2a", "us-west-2b", "us-west-2c"));
assertEquals(regionToZoneIdSupplier.get("ap-southeast-1").get(),
ImmutableSet.of("ap-southeast-1a", "ap-southeast-1b"));
Map<String, Supplier<URI>> zoneToURISupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<URI>>>>() {
}, Zone.class)).get();
assertEquals(zoneToURISupplier.get("sa-east-1a").get(), URI.create("https://ec2.sa-east-1.amazonaws.com"));
assertEquals(zoneToURISupplier.get("ap-northeast-1a").get(),
URI.create("https://ec2.ap-northeast-1.amazonaws.com"));
assertEquals(zoneToURISupplier.get("eu-west-1a").get(), URI.create("https://ec2.eu-west-1.amazonaws.com"));
assertEquals(zoneToURISupplier.get("us-east-1a").get(), URI.create("https://ec2.us-east-1.amazonaws.com"));
assertEquals(zoneToURISupplier.get("us-west-1a").get(), URI.create("https://ec2.us-west-1.amazonaws.com"));
assertEquals(zoneToURISupplier.get("us-west-2a").get(), URI.create("https://ec2.us-west-2.amazonaws.com"));
assertEquals(zoneToURISupplier.get("ap-southeast-1a").get(),
URI.create("https://ec2.ap-southeast-1.amazonaws.com"));
}
public void testZoneToEndpoint() {
assertEquals(injector.getInstance(ZoneToEndpoint.class).apply("us-west-2a"),
URI.create("https://ec2.us-west-2.amazonaws.com"));
}
@Override
public Injector createClient(Function<HttpRequest, HttpResponse> fn, Module module, Properties props) {
return createInjector(fn, module, props);
}
}

View File

@ -17,9 +17,7 @@
* under the License. * under the License.
*/ */
package org.jclouds.eucalyptus; package org.jclouds.eucalyptus;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_PORT_OPEN; import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_PORT_OPEN;
import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
import java.util.Properties; import java.util.Properties;
@ -57,8 +55,8 @@ public class EucalyptusApiMetadata extends EC2ApiMetadata {
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = EC2ApiMetadata.defaultProperties(); Properties properties = EC2ApiMetadata.defaultProperties();
properties.setProperty(PROPERTY_REGIONS, "Eucalyptus"); // in version 3, lowecase 'e' version 2, uppercase 'E'
properties.setProperty(PROPERTY_EC2_AMI_OWNERS, "admin"); properties.setProperty(PROPERTY_REGIONS, "eucalyptus");
properties.setProperty(TIMEOUT_PORT_OPEN, 5 * 60 * 1000 + ""); properties.setProperty(TIMEOUT_PORT_OPEN, 5 * 60 * 1000 + "");
return properties; return properties;
} }
@ -67,7 +65,7 @@ public class EucalyptusApiMetadata extends EC2ApiMetadata {
protected Builder(){ protected Builder(){
super(EC2Client.class, EC2AsyncClient.class); super(EC2Client.class, EC2AsyncClient.class);
id("eucalyptus") id("eucalyptus")
.defaultEndpoint("http://173.205.188.130:8773/services/Eucalyptus") .defaultEndpoint("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus/")
.name("Eucalyptus (EC2 clone) API") .name("Eucalyptus (EC2 clone) API")
.defaultProperties(EucalyptusApiMetadata.defaultProperties()); .defaultProperties(EucalyptusApiMetadata.defaultProperties());
} }

View File

@ -0,0 +1,106 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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.eucalyptus.config;
import static org.testng.Assert.assertEquals;
import java.net.URI;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.jclouds.eucalyptus.internal.BaseEucalyptusExpectTest;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.location.Region;
import org.jclouds.location.Zone;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.location.functions.ZoneToEndpoint;
import org.testng.annotations.Test;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;
/**
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "EucalyptusRestClientModuleExpectTest")
public class EucalyptusRestClientModuleExpectTest extends BaseEucalyptusExpectTest<Injector> {
private Injector injector;
public EucalyptusRestClientModuleExpectTest() {
Builder<HttpRequest, HttpResponse> builder = ImmutableMap.<HttpRequest, HttpResponse> builder();
builder.put(describeRegionsRequest, describeRegionsResponse);
builder.put(describeAZRequest, describeAZResponse);
injector = requestsSendResponses(builder.build());
}
public void testLocationIdAndURIBindings() {
assertEquals(injector.getInstance(Key.get(new TypeLiteral<Supplier<Set<String>>>() {
}, Region.class)).get(), ImmutableSet.<String> of("eucalyptus"));
assertEquals(injector.getInstance(Key.get(new TypeLiteral<Supplier<Set<String>>>() {
}, Zone.class)).get(), ImmutableSet.<String> of("partner01"));
Map<String, Supplier<URI>> regionToURISupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<URI>>>>() {
}, Region.class)).get();
assertEquals(regionToURISupplier.get("eucalyptus").get(), URI.create("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus"));
Map<String, Supplier<Set<String>>> regionToZoneIdSupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<Set<String>>>>>() {
}, Zone.class)).get();
assertEquals(regionToZoneIdSupplier.get("eucalyptus").get(), ImmutableSet.of("partner01"));
Map<String, Supplier<URI>> zoneToURISupplier = injector.getInstance(
Key.get(new TypeLiteral<Supplier<Map<String, Supplier<URI>>>>() {
}, Zone.class)).get();
assertEquals(zoneToURISupplier.get("partner01").get(), URI.create("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus"));
}
public void testZoneToEndpoint() {
assertEquals(injector.getInstance(ZoneToEndpoint.class).apply("partner01"),
URI.create("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus"));
}
public void testRegionToEndpointOrProviderIfNull() {
assertEquals(injector.getInstance(RegionToEndpointOrProviderIfNull.class).apply("eucalyptus"),
URI.create("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus"));
}
@Override
public Injector createClient(Function<HttpRequest, HttpResponse> fn, Module module, Properties props) {
return createInjector(fn, module, props);
}
}

View File

@ -0,0 +1,91 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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.eucalyptus.internal;
import java.net.URI;
import javax.ws.rs.core.MediaType;
import org.jclouds.date.DateService;
import org.jclouds.date.internal.SimpleDateFormatDateService;
import org.jclouds.ec2.EC2AsyncClient;
import org.jclouds.ec2.EC2Client;
import org.jclouds.ec2.config.EC2RestClientModule;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.rest.ConfiguresRestClient;
import org.jclouds.rest.internal.BaseRestClientExpectTest;
import com.google.common.collect.ImmutableMultimap;
import com.google.inject.Module;
import com.google.inject.Provides;
/**
*
* @author Adrian Cole
*/
public abstract class BaseEucalyptusExpectTest<T> extends BaseRestClientExpectTest<T> {
protected static final String CONSTANT_DATE = "2012-04-16T15:54:08.897Z";
protected DateService dateService = new SimpleDateFormatDateService();
protected HttpRequest describeRegionsRequest = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus/"))
.headers(ImmutableMultimap.of("Host", "partnercloud.eucalyptus.com:8773"))
.payload(payloadFromStringWithContentType(
"Action=DescribeRegions&Signature=tp9WpT8503JdxIXYu6Eu2Dmu%2Bd%2FpqviST7N7Fvr%2FyQo%3D&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-16T15%3A54%3A08.897Z&Version=2010-06-15&AWSAccessKeyId=identity",
MediaType.APPLICATION_FORM_URLENCODED)).build();
protected HttpResponse describeRegionsResponse = HttpResponse.builder().statusCode(200)
.payload(payloadFromResourceWithContentType("/regionEndpoints-euca.xml", MediaType.APPLICATION_XML))
.build();
protected HttpRequest describeAZRequest = HttpRequest.builder()
.method("POST")
.endpoint(URI.create("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus/"))
.headers(ImmutableMultimap.of("Host", "eucalyptus.partner.eucalyptus.com:8773"))
.payload(payloadFromStringWithContentType(
"Action=DescribeAvailabilityZones&Signature=i4OkMed1sqQV7hlF%2Fl1KdbQwmwJ4Fh4o9W32eVGayPk%3D&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-16T15%3A54%3A08.897Z&Version=2010-06-15&AWSAccessKeyId=identity",
MediaType.APPLICATION_FORM_URLENCODED)).build();
protected HttpResponse describeAZResponse = HttpResponse.builder().statusCode(200)
.payload(payloadFromResourceWithContentType(
"/availabilityZones-eucalyptus.xml", MediaType.APPLICATION_XML)).build();
public BaseEucalyptusExpectTest() {
provider = "eucalyptus";
}
@ConfiguresRestClient
private static final class TestEucalyptusRestClientModule extends EC2RestClientModule<EC2Client, EC2AsyncClient> {
@Override
@Provides
protected String provideTimeStamp(DateService dateService) {
return CONSTANT_DATE;
}
}
@Override
protected Module createModule() {
return new TestEucalyptusRestClientModule();
}
}

View File

@ -0,0 +1,11 @@
<DescribeAvailabilityZonesResponse
xmlns="http://ec2.amazonaws.com/doc/2010-06-15/">
<availabilityZoneInfo>
<item>
<zoneName>partner01</zoneName>
<zoneState>173.205.188.7 arn:euca:eucalyptus:partner01:cluster:cc_01/</zoneState>
<regionName />
<messageSet />
</item>
</availabilityZoneInfo>
</DescribeAvailabilityZonesResponse>

View File

@ -0,0 +1,12 @@
<DescribeRegionsResponse xmlns="http://ec2.amazonaws.com/doc/2010-06-15/">
<regionInfo>
<item>
<regionName>eucalyptus</regionName>
<regionEndpoint>http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus</regionEndpoint>
</item>
<item>
<regionName>walrus</regionName>
<regionEndpoint>http://walrus.partner.eucalyptus.com:8773/services/Walrus</regionEndpoint>
</item>
</regionInfo>
</DescribeRegionsResponse>

View File

@ -41,8 +41,6 @@
<test.eucalyptus-partnercloud-ec2.credential>FIXME_CREDENTIAL</test.eucalyptus-partnercloud-ec2.credential> <test.eucalyptus-partnercloud-ec2.credential>FIXME_CREDENTIAL</test.eucalyptus-partnercloud-ec2.credential>
<test.eucalyptus-partnercloud-ec2.template></test.eucalyptus-partnercloud-ec2.template> <test.eucalyptus-partnercloud-ec2.template></test.eucalyptus-partnercloud-ec2.template>
<test.eucalyptus-partnercloud-ec2.ebs-template></test.eucalyptus-partnercloud-ec2.ebs-template> <test.eucalyptus-partnercloud-ec2.ebs-template></test.eucalyptus-partnercloud-ec2.ebs-template>
<!-- corresponds to image manifest and also virt + "-cluster" zone -->
<test.eucalyptus-partnercloud-ec2.virtualization-type>kvm</test.eucalyptus-partnercloud-ec2.virtualization-type>
<jclouds.osgi.export>org.jclouds.epc*;version="${project.version}"</jclouds.osgi.export> <jclouds.osgi.export>org.jclouds.epc*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import> <jclouds.osgi.import>
@ -131,7 +129,6 @@
<test.eucalyptus-partnercloud-ec2.credential>${test.eucalyptus-partnercloud-ec2.credential}</test.eucalyptus-partnercloud-ec2.credential> <test.eucalyptus-partnercloud-ec2.credential>${test.eucalyptus-partnercloud-ec2.credential}</test.eucalyptus-partnercloud-ec2.credential>
<test.eucalyptus-partnercloud-ec2.template>${test.eucalyptus-partnercloud-ec2.template}</test.eucalyptus-partnercloud-ec2.template> <test.eucalyptus-partnercloud-ec2.template>${test.eucalyptus-partnercloud-ec2.template}</test.eucalyptus-partnercloud-ec2.template>
<test.eucalyptus-partnercloud-ec2.ebs-template>${test.eucalyptus-partnercloud-ec2.ebs-template}</test.eucalyptus-partnercloud-ec2.ebs-template> <test.eucalyptus-partnercloud-ec2.ebs-template>${test.eucalyptus-partnercloud-ec2.ebs-template}</test.eucalyptus-partnercloud-ec2.ebs-template>
<test.eucalyptus-partnercloud-ec2.virtualization-type>${test.eucalyptus-partnercloud-ec2.virtualization-type}</test.eucalyptus-partnercloud-ec2.virtualization-type>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</execution> </execution>

View File

@ -18,7 +18,6 @@
*/ */
package org.jclouds.epc; package org.jclouds.epc;
import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES; import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
@ -65,10 +64,8 @@ public class EucalyptusPartnerCloudEC2ProviderMetadata extends BaseProviderMetad
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = new Properties(); Properties properties = new Properties();
properties.setProperty(PROPERTY_REGIONS, "Eucalyptus"); properties.setProperty(PROPERTY_REGIONS, "eucalyptus");
properties.setProperty(PROPERTY_REGION + ".Eucalyptus." + ISO3166_CODES, "US-CA"); properties.setProperty(PROPERTY_REGION + ".eucalyptus." + ISO3166_CODES, "US-CA");
properties.setProperty("eucalyptus-partnercloud-ec2.virtualization-type", "kvm");
properties.setProperty(TEMPLATE, "osFamily=UBUNTU,locationId=${eucalyptus-partnercloud-ec2.virtualization-type}-cluster");
return properties; return properties;
} }
@ -82,7 +79,7 @@ public class EucalyptusPartnerCloudEC2ProviderMetadata extends BaseProviderMetad
.defaultModules(ImmutableSet.<Class<? extends Module>>of(EC2RestClientModule.class, EC2ResolveImagesModule.class, EucalyptusPartnerCloudComputeServiceContextModule.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>of(EC2RestClientModule.class, EC2ResolveImagesModule.class, EucalyptusPartnerCloudComputeServiceContextModule.class))
.build()) .build())
.homepage(URI.create("http://www.eucalyptus.com/partners")) .homepage(URI.create("http://www.eucalyptus.com/partners"))
.console(URI.create("https://partnercloud.eucalyptus.com:8443")) .console(URI.create("https://eucalyptus.partner.eucalyptus.com"))
.linkedServices("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3") .linkedServices("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3")
.iso3166Codes("US-CA") .iso3166Codes("US-CA")
.endpoint("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus") .endpoint("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus")

View File

@ -18,8 +18,6 @@
*/ */
package org.jclouds.epc.compute; package org.jclouds.epc.compute;
import java.util.Properties;
import org.jclouds.eucalyptus.compute.EucalyptusComputeServiceLiveTest; import org.jclouds.eucalyptus.compute.EucalyptusComputeServiceLiveTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -35,14 +33,4 @@ public class EucalyptusPartnerCloudEucalyptusComputeServiceLiveTest extends Euca
// security groups must be <30 characters // security groups must be <30 characters
group = "eu"; group = "eu";
} }
@Override
protected Properties setupProperties() {
Properties overrides = super.setupProperties();
if (System.getProperties().containsKey("test.eucalyptus-partnercloud-ec2.virtualization-type"))
overrides.setProperty("eucalyptus-partnercloud-ec2.virtualization-type", System
.getProperty("test.eucalyptus-partnercloud-ec2.virtualization-type"));
return overrides;
}
} }

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging> <packaging>bundle</packaging>
<properties> <properties>
<test.eucalyptus-partnercloud-s3.endpoint>http://partnercloud.eucalyptus.com:8773/services/Walrus</test.eucalyptus-partnercloud-s3.endpoint> <test.eucalyptus-partnercloud-s3.endpoint>http://walrus.partner.eucalyptus.com:8773/services/Walrus</test.eucalyptus-partnercloud-s3.endpoint>
<test.eucalyptus-partnercloud-s3.api-version>2006-03-01</test.eucalyptus-partnercloud-s3.api-version> <test.eucalyptus-partnercloud-s3.api-version>2006-03-01</test.eucalyptus-partnercloud-s3.api-version>
<test.eucalyptus-partnercloud-s3.build-version></test.eucalyptus-partnercloud-s3.build-version> <test.eucalyptus-partnercloud-s3.build-version></test.eucalyptus-partnercloud-s3.build-version>
<test.eucalyptus-partnercloud-s3.identity>FIXME_IDENTITY</test.eucalyptus-partnercloud-s3.identity> <test.eucalyptus-partnercloud-s3.identity>FIXME_IDENTITY</test.eucalyptus-partnercloud-s3.identity>

View File

@ -60,10 +60,10 @@ public class EucalyptusPartnerCloudS3ProviderMetadata extends BaseProviderMetada
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = new Properties(); Properties properties = new Properties();
properties.setProperty(PROPERTY_REGIONS, "Walrus"); properties.setProperty(PROPERTY_REGIONS, "walrus");
properties.setProperty(PROPERTY_ISO3166_CODES, "US-CA"); properties.setProperty(PROPERTY_ISO3166_CODES, "US-CA");
properties.setProperty(PROPERTY_REGION + ".Walrus." + ISO3166_CODES, "US-CA"); properties.setProperty(PROPERTY_REGION + ".walrus." + ISO3166_CODES, "US-CA");
properties.setProperty(PROPERTY_REGION + "." + "Walrus" + "." + ENDPOINT, "http://partnercloud.eucalyptus.com:8773/services/Walrus"); properties.setProperty(PROPERTY_REGION + "." + "walrus" + "." + ENDPOINT, "http://walrus.partner.eucalyptus.com:8773/services/Walrus");
return properties; return properties;
} }
@ -74,10 +74,10 @@ public class EucalyptusPartnerCloudS3ProviderMetadata extends BaseProviderMetada
.name("Eucalyptus Partner Cloud (S3)") .name("Eucalyptus Partner Cloud (S3)")
.apiMetadata(new WalrusApiMetadata()) .apiMetadata(new WalrusApiMetadata())
.homepage(URI.create("http://www.eucalyptus.com/partners")) .homepage(URI.create("http://www.eucalyptus.com/partners"))
.console(URI.create("https://partnercloud.eucalyptus.com:8443")) .console(URI.create("https://walrus.partner.eucalyptus.com"))
.linkedServices("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3") .linkedServices("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3")
.iso3166Codes("US-CA") .iso3166Codes("US-CA")
.endpoint("http://partnercloud.eucalyptus.com:8773/services/Walrus") .endpoint("http://walrus.partner.eucalyptus.com:8773/services/Walrus")
.defaultProperties(EucalyptusPartnerCloudS3ProviderMetadata.defaultProperties()); .defaultProperties(EucalyptusPartnerCloudS3ProviderMetadata.defaultProperties());
} }

View File

@ -26,7 +26,9 @@ import org.testng.annotations.Test;
* *
* @author Adrian Cole * @author Adrian Cole
*/ */
@Test(groups = "live", sequential = true, testName = "EucalyptusPartnerCloudWalrusClientLiveTest") @Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudWalrusClientLiveTest")
public class EucalyptusPartnerCloudWalrusClientLiveTest extends WalrusClientLiveTest { public class EucalyptusPartnerCloudWalrusClientLiveTest extends WalrusClientLiveTest {
public EucalyptusPartnerCloudWalrusClientLiveTest() {
provider = "eucalyptus-partnercloud-s3";
}
} }