mirror of https://github.com/apache/jclouds.git
Merge pull request #1115 from jclouds/remove-eucalyptus
issue #1108: remove eucalyptus and related providers
This commit is contained in:
commit
194fb45ca7
|
@ -35,11 +35,6 @@
|
|||
<artifactId>greenhousedata-element-vcloud</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>eucalyptus-partnercloud-ec2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>deltacloud</artifactId>
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.jclouds.ec2.compute.functions;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.base.Strings.emptyToNull;
|
||||
import static com.google.common.collect.Iterables.filter;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -55,7 +56,6 @@ import org.jclouds.util.InetAddresses2.IsPrivateIPAddress;
|
|||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
|
@ -120,13 +120,9 @@ public class RunningInstanceToNodeMetadata implements Function<RunningInstance,
|
|||
// collect all ip addresses into one bundle in case the api mistakenly put a private address
|
||||
// into the public address field
|
||||
Builder<String> addressesBuilder = ImmutableSet.builder();
|
||||
if (Strings.emptyToNull(instance.getIpAddress()) != null)
|
||||
if (emptyToNull(instance.getIpAddress()) != null)
|
||||
addressesBuilder.add(instance.getIpAddress());
|
||||
//Add dnsName (if available) to addresses, when the IPAddress is null
|
||||
// happens on Eucalyptus sometimes.
|
||||
else if(Strings.emptyToNull(instance.getDnsName()) != null)
|
||||
addressesBuilder.add(instance.getDnsName());
|
||||
if (Strings.emptyToNull(instance.getPrivateIpAddress()) != null)
|
||||
if (emptyToNull(instance.getPrivateIpAddress()) != null)
|
||||
addressesBuilder.add(instance.getPrivateIpAddress());
|
||||
|
||||
Set<String> addresses = addressesBuilder.build();
|
||||
|
|
|
@ -121,10 +121,7 @@ public abstract class BaseReservationHandler<T> extends HandlerForGeneratedReque
|
|||
} else if (equalsOrSuffix(qName, "amiLaunchIndex")) {
|
||||
builder.amiLaunchIndex(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "dnsName")) {
|
||||
String dnsName = currentOrNull(currentText);
|
||||
// Eucalyptus
|
||||
if (!"0.0.0.0".equals(dnsName))
|
||||
builder.dnsName(dnsName);
|
||||
builder.dnsName(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "imageId")) {
|
||||
builder.imageId(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "instanceId")) {
|
||||
|
@ -152,10 +149,7 @@ public abstract class BaseReservationHandler<T> extends HandlerForGeneratedReque
|
|||
} else if (equalsOrSuffix(qName, "platform")) {
|
||||
builder.platform(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "privateDnsName")) {
|
||||
String privateDnsName = currentOrNull(currentText);
|
||||
// Eucalyptus
|
||||
if (!"0.0.0.0".equals(privateDnsName))
|
||||
builder.privateDnsName(privateDnsName);
|
||||
builder.privateDnsName(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "privateIpAddress")) {
|
||||
builder.privateIpAddress(currentOrNull(currentText));
|
||||
} else if (equalsOrSuffix(qName, "ramdiskId")) {
|
||||
|
@ -197,18 +191,6 @@ public abstract class BaseReservationHandler<T> extends HandlerForGeneratedReque
|
|||
|
||||
protected void refineBuilderBeforeAddingInstance() {
|
||||
String region = getRequest() != null ? AWSUtils.findRegionInArgsOrNull(getRequest()) : null;
|
||||
|
||||
// Eucalyptus
|
||||
if (builder.getIpAddress() == null && builder.getDnsName() != null && builder.getDnsName().matches(".*[0-9]$")) {
|
||||
builder.ipAddress(builder.getDnsName());
|
||||
builder.dnsName(null);
|
||||
}
|
||||
if (builder.getPrivateIpAddress() == null && builder.getPrivateDnsName() != null
|
||||
&& builder.getPrivateDnsName().matches(".*[0-9]$")) {
|
||||
builder.privateIpAddress(builder.getPrivateDnsName());
|
||||
builder.privateDnsName(null);
|
||||
}
|
||||
|
||||
builder.region((region == null) ? defaultRegion.get() : region);
|
||||
builder.groupNames(groupNames);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ public class DescribeAvailabilityZonesResponseHandler extends ParseSax.HandlerWi
|
|||
private Set<String> messages = Sets.newHashSet();
|
||||
|
||||
/**
|
||||
* Eucalyptus 1.6 doesn't return region in the XML output
|
||||
* clones like {@code openstack-nova-ec2}, which don't support multiple regions don't return region in the XML
|
||||
* output.
|
||||
*/
|
||||
@Inject
|
||||
DescribeAvailabilityZonesResponseHandler(@Region Supplier<String> defaultRegion) {
|
||||
|
|
|
@ -83,9 +83,6 @@ public class DescribeImagesResponseHandler extends ParseSax.HandlerForGeneratedR
|
|||
private String ramdiskId;
|
||||
private boolean inProductCodes;
|
||||
private boolean inBlockDeviceMapping;
|
||||
/**
|
||||
* Eucalyptus 1.6 doesn't set rootDeviceType
|
||||
*/
|
||||
private RootDeviceType rootDeviceType = RootDeviceType.INSTANCE_STORE;
|
||||
private Map<String, EbsBlockDevice> ebsBlockDevices = Maps.newHashMap();
|
||||
private String deviceName;
|
||||
|
@ -129,8 +126,7 @@ public class DescribeImagesResponseHandler extends ParseSax.HandlerForGeneratedR
|
|||
} else if (qName.equals("imageState")) {
|
||||
rawState = currentOrNull(currentText);
|
||||
imageState = ImageState.fromValue(rawState);
|
||||
// eucalyptus
|
||||
} else if (qName.equals("imageType") || qName.equals("type")) {
|
||||
} else if (qName.equals("imageType")) {
|
||||
imageType = ImageType.fromValue(currentText.toString().trim());
|
||||
} else if (qName.equals("isPublic")) {
|
||||
isPublic = Boolean.parseBoolean(currentText.toString().trim());
|
||||
|
|
|
@ -99,21 +99,6 @@ public class RunningInstanceToNodeMetadataTest {
|
|||
"us-east-1/image").providerId("id").build().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIPAddressIsSetToDnsNameWhenIPAddressIsNull() {
|
||||
RunningInstance instance = RunningInstance.builder().instanceId("id").imageId("image").instanceType("m1.small")
|
||||
.instanceState(InstanceState.RUNNING).rawState("running").region("us-east-1").dnsName("jclouds-1-1-1-1.jclouds.org").build();
|
||||
|
||||
RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.<Hardware> of(), ImmutableSet
|
||||
.<Location> of(), ImmutableSet.<Image> of(), ImmutableMap.<String, Credentials> of());
|
||||
|
||||
assertEquals(parser.apply(instance).toString(), new NodeMetadataBuilder().status(Status.RUNNING).backendStatus("running").privateAddresses(
|
||||
ImmutableSet.<String> of()).publicAddresses(ImmutableSet.of("jclouds-1-1-1-1.jclouds.org")).id("us-east-1/id").imageId(
|
||||
"us-east-1/image").providerId("id").build().toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
static Location provider = new LocationBuilder().scope(LocationScope.REGION).id("us-east-1")
|
||||
.description("us-east-1").build();
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
====
|
||||
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.
|
||||
====
|
||||
|
||||
#
|
||||
# The jclouds API for Eucalyptus Systems' EC2 flavour (http://www.eucalyptus.com/).
|
||||
#
|
||||
# Expects the jclouds EC2 API to be present on your application's classpath.
|
||||
#
|
||||
# TODO: Implementation status.
|
||||
# TODO: Supported features.
|
||||
# TODO: Usage example.
|
|
@ -1,129 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-project</artifactId>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<relativePath>../../project/pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>eucalyptus</artifactId>
|
||||
<name>jclouds Eucalyptus api</name>
|
||||
<description>EC2 implementation based on Eucalyptus</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<properties>
|
||||
<test.eucalyptus.endpoint>http://ecc.eucalyptus.com:8773/services/Eucalyptus</test.eucalyptus.endpoint>
|
||||
<test.eucalyptus.api-version>2010-06-15</test.eucalyptus.api-version>
|
||||
<test.eucalyptus.build-version></test.eucalyptus.build-version>
|
||||
<test.eucalyptus.identity>FIXME_IDENTITY</test.eucalyptus.identity>
|
||||
<test.eucalyptus.credential>FIXME_CREDENTIAL</test.eucalyptus.credential>
|
||||
<test.eucalyptus.template></test.eucalyptus.template>
|
||||
<test.eucalyptus.ebs-template></test.eucalyptus.ebs-template>
|
||||
<jclouds.osgi.export>org.jclouds.eucalyptus*;version="${project.version}"</jclouds.osgi.export>
|
||||
<jclouds.osgi.import>
|
||||
org.jclouds.compute.internal;version="${project.version}",
|
||||
org.jclouds.rest.internal;version="${project.version}",
|
||||
org.jclouds*;version="${project.version}",
|
||||
*
|
||||
</jclouds.osgi.import>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>ec2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>ec2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-compute</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-log4j</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-sshj</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>live</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<test.eucalyptus.endpoint>${test.eucalyptus.endpoint}</test.eucalyptus.endpoint>
|
||||
<test.eucalyptus.api-version>${test.eucalyptus.api-version}</test.eucalyptus.api-version>
|
||||
<test.eucalyptus.build-version>${test.eucalyptus.build-version}</test.eucalyptus.build-version>
|
||||
<test.eucalyptus.identity>${test.eucalyptus.identity}</test.eucalyptus.identity>
|
||||
<test.eucalyptus.credential>${test.eucalyptus.credential}</test.eucalyptus.credential>
|
||||
<test.eucalyptus.template>${test.eucalyptus.template}</test.eucalyptus.template>
|
||||
<test.eucalyptus.ebs-template>${test.eucalyptus.ebs-template}</test.eucalyptus.ebs-template>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_PORT_OPEN;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.apis.ApiMetadata;
|
||||
import org.jclouds.ec2.EC2ApiMetadata;
|
||||
import org.jclouds.ec2.EC2AsyncClient;
|
||||
import org.jclouds.ec2.EC2Client;
|
||||
import org.jclouds.eucalyptus.config.Iso8601SecondsModule;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Module;
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of {@link ApiMetadata} for the Eucalyptus (EC2 clone) api.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class EucalyptusApiMetadata extends EC2ApiMetadata {
|
||||
|
||||
private static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return builder().fromApiMetadata(this);
|
||||
}
|
||||
|
||||
public EucalyptusApiMetadata() {
|
||||
this(builder());
|
||||
}
|
||||
|
||||
protected EucalyptusApiMetadata(Builder builder) {
|
||||
super(builder);
|
||||
}
|
||||
|
||||
public static Properties defaultProperties() {
|
||||
Properties properties = EC2ApiMetadata.defaultProperties();
|
||||
// in version 3, lowercase 'e' version 2, uppercase 'E'
|
||||
properties.setProperty(PROPERTY_REGIONS, "eucalyptus");
|
||||
properties.setProperty(TIMEOUT_PORT_OPEN, 5 * 60 * 1000 + "");
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static class Builder extends EC2ApiMetadata.Builder {
|
||||
protected Builder() {
|
||||
super(EC2Client.class, EC2AsyncClient.class);
|
||||
id("eucalyptus")
|
||||
.defaultEndpoint("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus/")
|
||||
.name("Eucalyptus (EC2 clone) API")
|
||||
.defaultProperties(EucalyptusApiMetadata.defaultProperties())
|
||||
.defaultModules(ImmutableSet.<Class<? extends Module>>builder()
|
||||
.addAll(defaultModules)
|
||||
.add(Iso8601SecondsModule.class).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EucalyptusApiMetadata build() {
|
||||
return new EucalyptusApiMetadata(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromApiMetadata(ApiMetadata in) {
|
||||
super.fromApiMetadata(in);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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 org.jclouds.date.internal.DateServiceDateCodecFactory.DateServiceIso8601Codec;
|
||||
import org.jclouds.eucalyptus.internal.DateServiceIso8601SecondsCodec;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
|
||||
public class Iso8601SecondsModule extends AbstractModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(DateServiceIso8601Codec.class).to(DateServiceIso8601SecondsCodec.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/**
|
||||
* 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.util.Date;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.date.DateService;
|
||||
import org.jclouds.date.internal.DateServiceDateCodecFactory.DateServiceIso8601Codec;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
@Singleton
|
||||
public class DateServiceIso8601SecondsCodec extends DateServiceIso8601Codec {
|
||||
|
||||
@Inject
|
||||
public DateServiceIso8601SecondsCodec(DateService dateService) {
|
||||
super(dateService);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date toDate(String date) throws IllegalArgumentException {
|
||||
try {
|
||||
return super.toDate(date);
|
||||
} catch (RuntimeException e) {
|
||||
// Eucalyptus <3.0 didn't include milliseconds
|
||||
// TODO: see if this is still a problem
|
||||
return dateService.iso8601SecondsDateParse(date);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "iso8601Seconds()";
|
||||
}
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
org.jclouds.eucalyptus.EucalyptusApiMetadata
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import org.jclouds.compute.internal.BaseComputeServiceApiMetadataTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "EucalyptusApiMetadataTest")
|
||||
public class EucalyptusApiMetadataTest extends BaseComputeServiceApiMetadataTest {
|
||||
|
||||
public EucalyptusApiMetadataTest() {
|
||||
super(new EucalyptusApiMetadata());
|
||||
}
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
/**
|
||||
* 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.compute;
|
||||
|
||||
import static org.testng.Assert.fail;
|
||||
|
||||
import org.jclouds.compute.domain.ExecResponse;
|
||||
import org.jclouds.compute.domain.NodeMetadata;
|
||||
import org.jclouds.ec2.compute.EC2ComputeServiceLiveTest;
|
||||
import org.jclouds.http.HttpResponseException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusComputeServiceLiveTest")
|
||||
public class EucalyptusComputeServiceLiveTest extends EC2ComputeServiceLiveTest {
|
||||
|
||||
public EucalyptusComputeServiceLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
// security groups must be <30 characters
|
||||
group = "eu";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test(enabled = true, dependsOnMethods = "testReboot")
|
||||
public void testSuspendResume() throws Exception {
|
||||
try {
|
||||
super.testSuspendResume();
|
||||
fail("Expected HttpResponseException");
|
||||
} catch (HttpResponseException e) {
|
||||
// ebs backed not yet available
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test(enabled = true)
|
||||
public void testMapEBS() throws Exception {
|
||||
// ebs backed not yet available
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test(enabled = true, dependsOnMethods = "testSuspendResume")
|
||||
public void testListNodes() throws Exception {
|
||||
super.testListNodes();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test(enabled = true, dependsOnMethods = "testSuspendResume")
|
||||
public void testGetNodesWithDetails() throws Exception {
|
||||
super.testGetNodesWithDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test(enabled = true, dependsOnMethods = { "testListNodes", "testGetNodesWithDetails" })
|
||||
public void testDestroyNodes() {
|
||||
super.testDestroyNodes();
|
||||
}
|
||||
|
||||
protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) {
|
||||
// hostname is not predictable based on node metadata
|
||||
assert execResponse.getOutput().trim().equals("ubuntu");
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
* 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 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.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("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus/")
|
||||
.addHeader("Host", "partnercloud.eucalyptus.com:8773")
|
||||
.payload(payloadFromStringWithContentType(
|
||||
"Action=DescribeRegions&Signature=tp9WpT8503JdxIXYu6Eu2Dmu%2Bd/pqviST7N7Fvr/yQo%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("http://eucalyptus.partner.eucalyptus.com:8773/services/Eucalyptus/")
|
||||
.addHeader("Host", "eucalyptus.partner.eucalyptus.com:8773")
|
||||
.payload(payloadFromStringWithContentType(
|
||||
"Action=DescribeAvailabilityZones&Signature=i4OkMed1sqQV7hlF/l1KdbQwmwJ4Fh4o9W32eVGayPk%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();
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.AMIClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusAMIClientLiveTest")
|
||||
public class EucalyptusAMIClientLiveTest extends AMIClientLiveTest {
|
||||
public EucalyptusAMIClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.AvailabilityZoneAndRegionClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusAvailabilityZoneAndRegionClientLiveTest")
|
||||
public class EucalyptusAvailabilityZoneAndRegionClientLiveTest extends AvailabilityZoneAndRegionClientLiveTest {
|
||||
public EucalyptusAvailabilityZoneAndRegionClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.ElasticBlockStoreClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusElasticBlockStoreClientLiveTest")
|
||||
public class EucalyptusElasticBlockStoreClientLiveTest extends ElasticBlockStoreClientLiveTest {
|
||||
public EucalyptusElasticBlockStoreClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.ElasticIPAddressClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusElasticIPAddressClientLiveTest")
|
||||
public class EucalyptusElasticIPAddressClientLiveTest extends ElasticIPAddressClientLiveTest {
|
||||
public EucalyptusElasticIPAddressClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.InstanceClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusInstanceClientLiveTest")
|
||||
public class EucalyptusInstanceClientLiveTest extends InstanceClientLiveTest {
|
||||
public EucalyptusInstanceClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.KeyPairClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusKeyPairClientLiveTest")
|
||||
public class EucalyptusKeyPairClientLiveTest extends KeyPairClientLiveTest {
|
||||
public EucalyptusKeyPairClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.services;
|
||||
|
||||
import org.jclouds.ec2.services.SecurityGroupClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusSecurityGroupClientLiveTest")
|
||||
public class EucalyptusSecurityGroupClientLiveTest extends SecurityGroupClientLiveTest {
|
||||
public EucalyptusSecurityGroupClientLiveTest() {
|
||||
provider = "eucalyptus";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
<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>
|
|
@ -1,12 +0,0 @@
|
|||
<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>
|
|
@ -41,7 +41,6 @@
|
|||
<module>ec2</module>
|
||||
<module>sqs</module>
|
||||
<module>deltacloud</module>
|
||||
<module>eucalyptus</module>
|
||||
<module>vcloud</module>
|
||||
<module>elasticstack</module>
|
||||
<module>atmos</module>
|
||||
|
|
|
@ -85,15 +85,12 @@ public class AWSUtils {
|
|||
}
|
||||
|
||||
public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) {
|
||||
// HEAD has no content
|
||||
if (response.getPayload() == null)
|
||||
return null;
|
||||
// Eucalyptus and Walrus occasionally return text/plain
|
||||
if (response.getPayload().getContentMetadata().getContentType() != null
|
||||
&& response.getPayload().getContentMetadata().getContentType().indexOf("text/plain") != -1)
|
||||
if ("text/plain".equals(response.getPayload().getContentMetadata().getContentType()))
|
||||
return null;
|
||||
try {
|
||||
AWSError error = (AWSError) factory.create(errorHandlerProvider.get()).setContext(request).apply(response);
|
||||
AWSError error = factory.create(errorHandlerProvider.get()).setContext(request).apply(response);
|
||||
if (error.getRequestId() == null)
|
||||
error.setRequestId(response.getFirstHeaderOrNull(requestId));
|
||||
error.setRequestToken(response.getFirstHeaderOrNull(requestToken));
|
||||
|
|
|
@ -22,6 +22,7 @@ import static org.easymock.EasyMock.createMock;
|
|||
import static org.easymock.EasyMock.expect;
|
||||
import static org.easymock.EasyMock.replay;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -69,6 +70,25 @@ public class AWSUtilsTest {
|
|||
response.getPayload().getContentMetadata().setContentType("text/xml");
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* HEAD requests don't have a payload
|
||||
*/
|
||||
@Test
|
||||
public void testNoExceptionWhenNoPayload() {
|
||||
HttpResponse response = HttpResponse.builder().statusCode(400).build();
|
||||
assertNull(utils.parseAWSErrorFromContent(command.getCurrentRequest(), response));
|
||||
}
|
||||
|
||||
/**
|
||||
* clones or proxies can mess up the error message.
|
||||
*/
|
||||
@Test
|
||||
public void testNoExceptionParsingTextPlain() {
|
||||
HttpResponse response = HttpResponse.builder().statusCode(400).payload("foo bar").build();
|
||||
response.getPayload().getContentMetadata().setContentType("text/plain");
|
||||
assertNull(utils.parseAWSErrorFromContent(command.getCurrentRequest(), response));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseAWSErrorFromContentHttpCommandHttpResponseInputStream() {
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
====
|
||||
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.
|
||||
====
|
||||
|
||||
#
|
||||
# The jclouds provider for Eucalyptus Partner Cloud's EC2 (http://www.eucalyptus.com/resources/AmazonAWS) service.
|
||||
#
|
||||
# Expects the jclouds ec2 API to be present on your application's classpath.
|
||||
#
|
||||
# TODO: Implementation status.
|
||||
# TODO: Supported features.
|
||||
# TODO: Usage example.
|
|
@ -1,143 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-project</artifactId>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<relativePath>../../project/pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>eucalyptus-partnercloud-ec2</artifactId>
|
||||
<name>jclouds Eucalyptus Partner Cloud EC2 provider</name>
|
||||
<description>Eucalyptus (EC2) implementation targeted to the Eucalyptus Partner Cloud</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<properties>
|
||||
<test.eucalyptus-partnercloud-ec2.endpoint>http://partnercloud.eucalyptus.com:8773/services/Eucalyptus</test.eucalyptus-partnercloud-ec2.endpoint>
|
||||
<test.eucalyptus-partnercloud-ec2.api-version>2010-06-15</test.eucalyptus-partnercloud-ec2.api-version>
|
||||
<test.eucalyptus-partnercloud-ec2.build-version></test.eucalyptus-partnercloud-ec2.build-version>
|
||||
<test.eucalyptus-partnercloud-ec2.identity>FIXME_IDENTITY</test.eucalyptus-partnercloud-ec2.identity>
|
||||
<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.ebs-template></test.eucalyptus-partnercloud-ec2.ebs-template>
|
||||
|
||||
<jclouds.osgi.export>org.jclouds.epc*;version="${project.version}"</jclouds.osgi.export>
|
||||
<jclouds.osgi.import>
|
||||
org.jclouds.compute.internal;version="${project.version}",
|
||||
org.jclouds.rest.internal;version="${project.version}",
|
||||
org.jclouds*;version="${project.version}",
|
||||
*
|
||||
</jclouds.osgi.import>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>eucalyptus</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>ec2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>eucalyptus</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>ec2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-compute</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-log4j</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-sshj</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>live</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<threadCount>1</threadCount>
|
||||
<systemPropertyVariables>
|
||||
<test.eucalyptus-partnercloud-ec2.endpoint>${test.eucalyptus-partnercloud-ec2.endpoint}</test.eucalyptus-partnercloud-ec2.endpoint>
|
||||
<test.eucalyptus-partnercloud-ec2.api-version>${test.eucalyptus-partnercloud-ec2.api-version}</test.eucalyptus-partnercloud-ec2.api-version>
|
||||
<test.eucalyptus-partnercloud-ec2.build-version>${test.eucalyptus-partnercloud-ec2.build-version}</test.eucalyptus-partnercloud-ec2.build-version>
|
||||
<test.eucalyptus-partnercloud-ec2.identity>${test.eucalyptus-partnercloud-ec2.identity}</test.eucalyptus-partnercloud-ec2.identity>
|
||||
<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.ebs-template>${test.eucalyptus-partnercloud-ec2.ebs-template}</test.eucalyptus-partnercloud-ec2.ebs-template>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
/**
|
||||
* 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.epc;
|
||||
|
||||
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_REGIONS;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.ec2.compute.config.EC2ResolveImagesModule;
|
||||
import org.jclouds.ec2.config.EC2RestClientModule;
|
||||
import org.jclouds.epc.config.EucalyptusPartnerCloudComputeServiceContextModule;
|
||||
import org.jclouds.eucalyptus.EucalyptusApiMetadata;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadata;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Module;
|
||||
|
||||
/**
|
||||
* Implementation of {@link org.jclouds.providers.ProviderMetadata} for Eucalyptus Partner Cloud EC2.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class EucalyptusPartnerCloudEC2ProviderMetadata extends BaseProviderMetadata {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return builder().fromProviderMetadata(this);
|
||||
}
|
||||
|
||||
public EucalyptusPartnerCloudEC2ProviderMetadata() {
|
||||
super(builder());
|
||||
}
|
||||
|
||||
public EucalyptusPartnerCloudEC2ProviderMetadata(Builder builder) {
|
||||
super(builder);
|
||||
}
|
||||
|
||||
public static Properties defaultProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(PROPERTY_REGIONS, "eucalyptus");
|
||||
properties.setProperty(PROPERTY_REGION + ".eucalyptus." + ISO3166_CODES, "US-CA");
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static class Builder extends BaseProviderMetadata.Builder {
|
||||
|
||||
protected Builder(){
|
||||
id("eucalyptus-partnercloud-ec2")
|
||||
.name("Eucalyptus Partner Cloud (EC2)")
|
||||
.apiMetadata(
|
||||
new EucalyptusApiMetadata().toBuilder()
|
||||
.defaultModules(ImmutableSet.<Class<? extends Module>>of(EC2RestClientModule.class, EC2ResolveImagesModule.class, EucalyptusPartnerCloudComputeServiceContextModule.class))
|
||||
.build())
|
||||
.homepage(URI.create("http://www.eucalyptus.com/partners"))
|
||||
.console(URI.create("https://eucalyptus.partner.eucalyptus.com"))
|
||||
.linkedServices("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3")
|
||||
.iso3166Codes("US-CA")
|
||||
.endpoint("http://partnercloud.eucalyptus.com:8773/services/Eucalyptus")
|
||||
.defaultProperties(EucalyptusPartnerCloudEC2ProviderMetadata.defaultProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EucalyptusPartnerCloudEC2ProviderMetadata build() {
|
||||
return new EucalyptusPartnerCloudEC2ProviderMetadata(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromProviderMetadata(
|
||||
ProviderMetadata in) {
|
||||
super.fromProviderMetadata(in);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
* 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.epc.config;
|
||||
|
||||
import org.jclouds.ec2.compute.config.EC2ComputeServiceContextModule;
|
||||
import org.jclouds.ec2.compute.strategy.ReviseParsedImage;
|
||||
import org.jclouds.epc.strategy.EucalyptusPartnerCloudReviseParsedImage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class EucalyptusPartnerCloudComputeServiceContextModule extends EC2ComputeServiceContextModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
super.configure();
|
||||
bind(ReviseParsedImage.class).to(EucalyptusPartnerCloudReviseParsedImage.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/**
|
||||
* 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.epc.strategy;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.compute.domain.ImageBuilder;
|
||||
import org.jclouds.compute.domain.OperatingSystem;
|
||||
import org.jclouds.compute.domain.OsFamily;
|
||||
import org.jclouds.compute.reference.ComputeServiceConstants;
|
||||
import org.jclouds.compute.util.ComputeServiceUtils;
|
||||
import org.jclouds.ec2.compute.strategy.ReviseParsedImage;
|
||||
import org.jclouds.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class EucalyptusPartnerCloudReviseParsedImage implements ReviseParsedImage {
|
||||
|
||||
// debian-6.0-x86_64/debian.6-0.x86-64.img.manifest.xml
|
||||
public static final Pattern PATTERN = Pattern.compile("^([^-]+)-([^-]+)-.*");
|
||||
public static final Pattern WINDOWS = Pattern.compile("^windows-([^/]+)/.*");
|
||||
|
||||
private final Map<OsFamily, Map<String, String>> osVersionMap;
|
||||
|
||||
@Resource
|
||||
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
|
||||
protected Logger logger = Logger.NULL;
|
||||
|
||||
@Inject
|
||||
public EucalyptusPartnerCloudReviseParsedImage(Map<OsFamily, Map<String, String>> osVersionMap) {
|
||||
this.osVersionMap = checkNotNull(osVersionMap, "osVersionMap");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reviseParsedImage(org.jclouds.ec2.domain.Image from, ImageBuilder builder, OsFamily family,
|
||||
OperatingSystem.Builder osBuilder) {
|
||||
try {
|
||||
if (from.getImageLocation().startsWith("windows")) {
|
||||
family = OsFamily.WINDOWS;
|
||||
osBuilder.family(family);
|
||||
Matcher matcher = WINDOWS.matcher(from.getImageLocation());
|
||||
if (matcher.find()) {
|
||||
osBuilder.version(ComputeServiceUtils.parseVersionOrReturnEmptyString(family, matcher.group(1).replace(
|
||||
'-', ' ').replace('s', 'S'), osVersionMap));
|
||||
}
|
||||
} else {
|
||||
Matcher matcher = PATTERN.matcher(from.getImageLocation());
|
||||
if (matcher.find()) {
|
||||
family = OsFamily.fromValue(matcher.group(1));
|
||||
osBuilder.family(family);
|
||||
osBuilder.version(ComputeServiceUtils.parseVersionOrReturnEmptyString(family, matcher.group(2),
|
||||
osVersionMap));
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.debug("<< didn't match os(%s)", from.getImageLocation());
|
||||
} catch (NoSuchElementException e) {
|
||||
logger.debug("<< didn't match at all(%s)", from.getImageLocation());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
org.jclouds.epc.EucalyptusPartnerCloudEC2ProviderMetadata
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
* 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.epc;
|
||||
|
||||
import org.jclouds.eucalyptus.EucalyptusApiMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadataTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* The EucalyptusPartnerCloudEC2ProviderTest tests the {@link EucalyptusPartnerCloudEC2ProviderMetadata} class.
|
||||
*
|
||||
* @author Jeremy Whitlock <jwhitlock@apache.org>
|
||||
*/
|
||||
@Test(groups = "unit", testName = "EucalyptusPartnerCloudEC2ProviderTest")
|
||||
public class EucalyptusPartnerCloudEC2ProviderTest extends BaseProviderMetadataTest {
|
||||
|
||||
public EucalyptusPartnerCloudEC2ProviderTest() {
|
||||
super(new EucalyptusPartnerCloudEC2ProviderMetadata(), new EucalyptusApiMetadata());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* 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.epc.compute;
|
||||
|
||||
import org.jclouds.eucalyptus.compute.EucalyptusComputeServiceLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudEucalyptusComputeServiceLiveTest")
|
||||
public class EucalyptusPartnerCloudEucalyptusComputeServiceLiveTest extends EucalyptusComputeServiceLiveTest {
|
||||
|
||||
public EucalyptusPartnerCloudEucalyptusComputeServiceLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
// security groups must be <30 characters
|
||||
group = "eu";
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
/**
|
||||
* 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.epc.compute;
|
||||
|
||||
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.aws.util.AWSUtils;
|
||||
import org.jclouds.compute.domain.OsFamily;
|
||||
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
|
||||
import org.jclouds.compute.domain.Template;
|
||||
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
|
||||
import org.jclouds.domain.LocationScope;
|
||||
import org.jclouds.ec2.compute.util.EC2ComputeUtils;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live")
|
||||
public class EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
||||
|
||||
public EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
|
||||
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
|
||||
|
||||
@Override
|
||||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return (input.version.equals("") || input.version.equals("10.04")) && input.is64Bit;
|
||||
case DEBIAN:
|
||||
return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit;
|
||||
case CENTOS:
|
||||
return (input.version.equals("") || input.version.equals("5.0") || input.version.equals("5.5"))
|
||||
&& input.is64Bit;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultTemplateBuilder() throws IOException {
|
||||
Template defaultTemplate = view.getComputeService().templateBuilder().build();
|
||||
assert (defaultTemplate.getImage().getProviderId().startsWith("emi-")) : defaultTemplate;
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(defaultTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
||||
assertEquals(defaultTemplate.getHardware().getId(), "m1.small");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "kvm-cluster");
|
||||
assertEquals(defaultTemplate.getLocation().getScope(), LocationScope.ZONE);
|
||||
assertEquals(AWSUtils.getRegionFromLocationOrNull(defaultTemplate.getLocation()), "Eucalyptus");
|
||||
assertEquals(EC2ComputeUtils.getZoneFromLocationOrNull(defaultTemplate.getLocation()), "kvm-cluster");
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-CA");
|
||||
}
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
/**
|
||||
* 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.epc.compute.strategy;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.compute.config.BaseComputeServiceContextModule;
|
||||
import org.jclouds.compute.domain.ImageBuilder;
|
||||
import org.jclouds.compute.domain.OperatingSystem;
|
||||
import org.jclouds.compute.domain.OsFamily;
|
||||
import org.jclouds.compute.reference.ComputeServiceConstants;
|
||||
import org.jclouds.domain.Location;
|
||||
import org.jclouds.domain.LocationBuilder;
|
||||
import org.jclouds.domain.LocationScope;
|
||||
import org.jclouds.domain.LoginCredentials;
|
||||
import org.jclouds.ec2.compute.config.EC2ComputeServiceDependenciesModule;
|
||||
import org.jclouds.ec2.compute.functions.EC2ImageParser;
|
||||
import org.jclouds.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy;
|
||||
import org.jclouds.ec2.domain.Image;
|
||||
import org.jclouds.ec2.xml.DescribeImagesResponseHandlerTest;
|
||||
import org.jclouds.epc.strategy.EucalyptusPartnerCloudReviseParsedImage;
|
||||
import org.jclouds.json.Json;
|
||||
import org.jclouds.json.config.GsonModule;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.inject.Guice;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "EucalyptusPartnerCloudReviseParsedImageTest")
|
||||
public class EucalyptusPartnerCloudReviseParsedImageTest {
|
||||
|
||||
public void testParseEucalyptusImage() {
|
||||
|
||||
Set<org.jclouds.compute.domain.Image> result = convertImages("/eucalyptus_images.xml");
|
||||
assertEquals(result.size(), 3);
|
||||
|
||||
assertEquals(
|
||||
Iterables.get(result, 0).toString(),
|
||||
new ImageBuilder()
|
||||
.operatingSystem(
|
||||
OperatingSystem.builder().family(OsFamily.DEBIAN).arch("paravirtual").version("6.0")
|
||||
.description("debian-6.0-x86_64/debian.6-0.x86-64.img.manifest.xml").is64Bit(true)
|
||||
.build())
|
||||
.description("debian-6.0-x86_64/debian.6-0.x86-64.img.manifest.xml")
|
||||
.defaultCredentials(new LoginCredentials("root", false))
|
||||
.id("us-east-1/emi-892C130F")
|
||||
.providerId("emi-892C130F")
|
||||
.location(defaultLocation)
|
||||
.userMetadata(
|
||||
ImmutableMap.of("owner", "admin", "rootDeviceType", "instance-store", "virtualizationType",
|
||||
"paravirtual", "hypervisor", "xen"))
|
||||
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
|
||||
assertEquals(Iterables.get(result, 0).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
|
||||
|
||||
assertEquals(
|
||||
Iterables.get(result, 1).toString(),
|
||||
new ImageBuilder()
|
||||
.operatingSystem(
|
||||
OperatingSystem.builder().family(OsFamily.CENTOS).arch("paravirtual").version("5.5")
|
||||
.description("centos-5.5-x86_64/centos.5-5.x86-64.img.manifest.xml").is64Bit(true)
|
||||
.build())
|
||||
.description("centos-5.5-x86_64/centos.5-5.x86-64.img.manifest.xml")
|
||||
.defaultCredentials(new LoginCredentials("root", false))
|
||||
.id("us-east-1/emi-9B751369")
|
||||
.providerId("emi-9B751369")
|
||||
.location(defaultLocation)
|
||||
.userMetadata(
|
||||
ImmutableMap.of("owner", "admin", "rootDeviceType", "instance-store", "virtualizationType",
|
||||
"paravirtual", "hypervisor", "xen"))
|
||||
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
|
||||
assertEquals(Iterables.get(result, 1).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
|
||||
|
||||
assertEquals(
|
||||
Iterables.get(result, 2).toString(),
|
||||
new ImageBuilder()
|
||||
.operatingSystem(
|
||||
OperatingSystem.builder().family(OsFamily.UBUNTU).arch("paravirtual").version("10.04")
|
||||
.description("ubuntu-10.04-x86_64/ubuntu.10-04.x86-64.img.manifest.xml").is64Bit(true)
|
||||
.build())
|
||||
.description("ubuntu-10.04-x86_64/ubuntu.10-04.x86-64.img.manifest.xml")
|
||||
.defaultCredentials(new LoginCredentials("root", false))
|
||||
.id("us-east-1/emi-E0641459")
|
||||
.providerId("emi-E0641459")
|
||||
.location(defaultLocation)
|
||||
.userMetadata(
|
||||
ImmutableMap.of("owner", "admin", "rootDeviceType", "instance-store", "virtualizationType",
|
||||
"paravirtual", "hypervisor", "xen"))
|
||||
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
|
||||
assertEquals(Iterables.get(result, 2).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
|
||||
|
||||
}
|
||||
|
||||
static Location defaultLocation = new LocationBuilder().scope(LocationScope.REGION).id("us-east-1").description(
|
||||
"us-east-1").build();
|
||||
|
||||
public static Set<org.jclouds.compute.domain.Image> convertImages(String resource) {
|
||||
|
||||
Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
|
||||
}.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
|
||||
.getInstance(Json.class));
|
||||
|
||||
Set<Image> result = DescribeImagesResponseHandlerTest.parseImages(resource);
|
||||
EC2ImageParser parser = new EC2ImageParser(EC2ComputeServiceDependenciesModule.toPortableImageStatus,
|
||||
new EC2PopulateDefaultLoginCredentialsForImageStrategy(), map, Suppliers
|
||||
.<Set<? extends Location>> ofInstance(ImmutableSet.<Location> of(defaultLocation)), Suppliers
|
||||
.ofInstance(defaultLocation), new EucalyptusPartnerCloudReviseParsedImage(map));
|
||||
return Sets.newLinkedHashSet(Iterables.filter(Iterables.transform(result, parser), Predicates.notNull()));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusAMIClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudAMIClientLiveTest")
|
||||
public class EucalyptusPartnerCloudAMIClientLiveTest extends EucalyptusAMIClientLiveTest {
|
||||
public EucalyptusPartnerCloudAMIClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusAvailabilityZoneAndRegionClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudAvailabilityZoneAndRegionClientLiveTest")
|
||||
public class EucalyptusPartnerCloudAvailabilityZoneAndRegionClientLiveTest extends EucalyptusAvailabilityZoneAndRegionClientLiveTest {
|
||||
public EucalyptusPartnerCloudAvailabilityZoneAndRegionClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusElasticBlockStoreClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudElasticBlockStoreClientLiveTest")
|
||||
public class EucalyptusPartnerCloudElasticBlockStoreClientLiveTest extends EucalyptusElasticBlockStoreClientLiveTest {
|
||||
public EucalyptusPartnerCloudElasticBlockStoreClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusElasticIPAddressClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudElasticIPAddressClientLiveTest")
|
||||
public class EucalyptusPartnerCloudElasticIPAddressClientLiveTest extends EucalyptusElasticIPAddressClientLiveTest {
|
||||
public EucalyptusPartnerCloudElasticIPAddressClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusInstanceClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudInstanceClientLiveTest")
|
||||
public class EucalyptusPartnerCloudInstanceClientLiveTest extends EucalyptusInstanceClientLiveTest {
|
||||
public EucalyptusPartnerCloudInstanceClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusKeyPairClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudKeyPairClientLiveTest")
|
||||
public class EucalyptusPartnerCloudKeyPairClientLiveTest extends EucalyptusKeyPairClientLiveTest {
|
||||
public EucalyptusPartnerCloudKeyPairClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* 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.epc.services;
|
||||
|
||||
import org.jclouds.eucalyptus.services.EucalyptusSecurityGroupClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "EucalyptusPartnerCloudSecurityGroupClientLiveTest")
|
||||
public class EucalyptusPartnerCloudSecurityGroupClientLiveTest extends EucalyptusSecurityGroupClientLiveTest {
|
||||
public EucalyptusPartnerCloudSecurityGroupClientLiveTest() {
|
||||
provider = "eucalyptus-partnercloud-ec2";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2010-06-15/">
|
||||
<requestId>a70893be-64cb-4cee-a6ef-ab1fcea75266</requestId>
|
||||
<imagesSet>
|
||||
<item>
|
||||
<imageId>eki-23CD15B0</imageId>
|
||||
<imageLocation>kvm-kernel-x86_64/vmlinuz-2.6.28-11-generic.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>kernel</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>eri-849A1703</imageId>
|
||||
<imageLocation>kvm-ramdisk-x86_64/initrd.img-2.6.28-11-generic.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>ramdisk</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>emi-892C130F</imageId>
|
||||
<imageLocation>debian-6.0-x86_64/debian.6-0.x86-64.img.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>machine</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>emi-9B751369</imageId>
|
||||
<imageLocation>centos-5.5-x86_64/centos.5-5.x86-64.img.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>machine</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>eri-042914D2</imageId>
|
||||
<imageLocation>xen-ramdisk-x86_64/initrd-2.6.27.21-0.1-xen.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>ramdisk</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>emi-E0641459</imageId>
|
||||
<imageLocation>ubuntu-10.04-x86_64/ubuntu.10-04.x86-64.img.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>machine</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
<item>
|
||||
<imageId>eki-08A714DD</imageId>
|
||||
<imageLocation>xen-kernel-x86_64/vmlinuz-2.6.27.21-0.1-xen.manifest.xml
|
||||
</imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId>admin</imageOwnerId>
|
||||
<isPublic>true</isPublic>
|
||||
<productCodes />
|
||||
<architecture>x86_64</architecture>
|
||||
<imageType>kernel</imageType>
|
||||
<platform>linux</platform>
|
||||
</item>
|
||||
</imagesSet>
|
||||
</DescribeImagesResponse>
|
|
@ -43,7 +43,6 @@
|
|||
<module>synaptic-storage</module>
|
||||
<module>ninefold-storage</module>
|
||||
<module>cloudonestorage</module>
|
||||
<module>eucalyptus-partnercloud-ec2</module>
|
||||
<module>bluelock-vcloud-zone01</module>
|
||||
<module>stratogen-vcloud-mycloud</module>
|
||||
<module>trmk-ecloud</module>
|
||||
|
|
Loading…
Reference in New Issue