mirror of https://github.com/apache/jclouds.git
Issue 1054:add rackspace-cloudservers-uk provider
This commit is contained in:
parent
391c61c852
commit
c6a02a6a57
|
@ -24,7 +24,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), de
|
|||
greenhousedata-element-vcloud, softlayer, cloudsigma (generic),
|
||||
cloudstack (generic), ninefold-compute, openstack-nov (keystone),
|
||||
hpcloud-compute, trystack-nova, openstack-nova-ec2,
|
||||
rackspace-cloudservers-us (next gen)
|
||||
rackspace-cloudservers-us (next gen), rackspace-cloudservers-uk (next gen)
|
||||
|
||||
* note * the pom dependency org.jclouds/jclouds-allcompute gives you access to
|
||||
to all of these providers
|
||||
|
|
|
@ -72,5 +72,6 @@
|
|||
<module>hpcloud-objectstorage</module>
|
||||
<module>trystack-nova</module>
|
||||
<module>rackspace-cloudservers-us</module>
|
||||
<module>rackspace-cloudservers-uk</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
<?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.5.0-SNAPSHOT</version>
|
||||
<relativePath>../../project/pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>rackspace-cloudservers-uk</artifactId>
|
||||
<name>jclouds Rackspace Next Generation Cloud Servers provider</name>
|
||||
<description>OpenStack Nova implementation targeted to Rackspace Next Generation Cloud Servers</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<properties>
|
||||
<test.rackspace-cloudservers-uk.endpoint>https://lon.identity.api.rackspacecloud.com/v2.0/</test.rackspace-cloudservers-uk.endpoint>
|
||||
<test.rackspace-cloudservers-uk.api-version>2</test.rackspace-cloudservers-uk.api-version>
|
||||
<test.rackspace-cloudservers-uk.build-version></test.rackspace-cloudservers-uk.build-version>
|
||||
<test.rackspace-cloudservers-uk.identity>${test.rackspace-uk.identity}</test.rackspace-cloudservers-uk.identity>
|
||||
<test.rackspace-cloudservers-uk.credential>${test.rackspace-uk.credential}</test.rackspace-cloudservers-uk.credential>
|
||||
<test.rackspace-cloudservers-uk.template></test.rackspace-cloudservers-uk.template>
|
||||
<jclouds.osgi.export>org.jclouds.rackspace.cloudservers.us*;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>rackspace-cloudidentity</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>openstack-nova</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</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.api</groupId>
|
||||
<artifactId>rackspace-cloudidentity</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>openstack-nova</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-slf4j</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>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.0.0</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.rackspace-cloudservers-uk.endpoint>${test.rackspace-cloudservers-uk.endpoint}</test.rackspace-cloudservers-uk.endpoint>
|
||||
<test.rackspace-cloudservers-uk.api-version>${test.rackspace-cloudservers-uk.api-version}</test.rackspace-cloudservers-uk.api-version>
|
||||
<test.rackspace-cloudservers-uk.build-version>${test.rackspace-cloudservers-uk.build-version}</test.rackspace-cloudservers-uk.build-version>
|
||||
<test.rackspace-cloudservers-uk.identity>${test.rackspace-cloudservers-uk.identity}</test.rackspace-cloudservers-uk.identity>
|
||||
<test.rackspace-cloudservers-uk.credential>${test.rackspace-cloudservers-uk.credential}</test.rackspace-cloudservers-uk.credential>
|
||||
<test.rackspace-cloudservers-uk.template>${test.rackspace-cloudservers-uk.template}</test.rackspace-cloudservers-uk.template>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,113 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk;
|
||||
|
||||
import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONE;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONES;
|
||||
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApiMetadata;
|
||||
import org.jclouds.openstack.nova.v2_0.config.NovaRestClientModule;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadata;
|
||||
import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationModule;
|
||||
import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
|
||||
import org.jclouds.rackspace.cloudservers.uk.config.CloudServersUKComputeServiceContextModule;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Module;
|
||||
|
||||
/**
|
||||
* Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Next Generation Cloud Servers.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class CloudServersUKProviderMetadata extends BaseProviderMetadata {
|
||||
|
||||
/** The serialVersionUID */
|
||||
private static final long serialVersionUID = -300987074165012648L;
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return builder().fromProviderMetadata(this);
|
||||
}
|
||||
|
||||
public CloudServersUKProviderMetadata() {
|
||||
super(builder());
|
||||
}
|
||||
|
||||
public CloudServersUKProviderMetadata(Builder builder) {
|
||||
super(builder);
|
||||
}
|
||||
|
||||
public static Properties defaultProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
|
||||
properties.setProperty(PROPERTY_ZONES, "LON");
|
||||
properties.setProperty(PROPERTY_ZONE + ".LON." + ISO3166_CODES, "GB-SLG");
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static class Builder extends BaseProviderMetadata.Builder {
|
||||
|
||||
protected Builder(){
|
||||
id("rackspace-cloudservers-uk")
|
||||
.name("Rackspace Next Generation Cloud Servers UK")
|
||||
.apiMetadata(new NovaApiMetadata().toBuilder()
|
||||
.identityName("${userName}")
|
||||
.credentialName("${apiKey}")
|
||||
.version("2")
|
||||
.defaultEndpoint("https://lon.identity.api.rackspacecloud.com/v2.0/")
|
||||
.endpointName("identity service url ending in /v2.0/")
|
||||
.documentation(URI.create("http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_preface.html#webhelp-currentid"))
|
||||
.defaultModules(ImmutableSet.<Class<? extends Module>>builder()
|
||||
.add(CloudIdentityAuthenticationModule.class)
|
||||
.add(ZoneModule.class)
|
||||
.add(NovaRestClientModule.class)
|
||||
.add(CloudServersUKComputeServiceContextModule.class).build())
|
||||
.build())
|
||||
.homepage(URI.create("http://www.rackspace.co.uk/opencloud"))
|
||||
.console(URI.create("https://mycloud.rackspace.co.uk/"))
|
||||
.linkedServices("rackspace-cloudservers-uk", "cloudfiles-swift-uk")
|
||||
.iso3166Codes("GB-SLG")
|
||||
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/")
|
||||
.defaultProperties(CloudServersUKProviderMetadata.defaultProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudServersUKProviderMetadata build() {
|
||||
return new CloudServersUKProviderMetadata(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromProviderMetadata(ProviderMetadata in) {
|
||||
super.fromProviderMetadata(in);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk.config;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.jclouds.compute.domain.OsFamily;
|
||||
import org.jclouds.domain.LoginCredentials;
|
||||
import org.jclouds.openstack.nova.v2_0.compute.config.NovaComputeServiceContextModule;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class CloudServersUKComputeServiceContextModule extends NovaComputeServiceContextModule {
|
||||
|
||||
/**
|
||||
* CloudServers images are accessible via the root user, not ubuntu
|
||||
*/
|
||||
@Override
|
||||
protected Map<OsFamily, LoginCredentials> osFamilyToCredentials(Injector injector) {
|
||||
return ImmutableMap.of(OsFamily.WINDOWS, LoginCredentials.builder().user("Administrator").build(),
|
||||
OsFamily.UBUNTU, LoginCredentials.builder().user("root").build());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
org.jclouds.rackspace.cloudservers.uk.CloudServersUKProviderMetadata
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* 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 computee 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.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not computee 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.rackspace.cloudservers.uk;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApiMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadataTest;
|
||||
import org.jclouds.rackspace.cloudservers.uk.CloudServersUKProviderMetadata;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "CloudServersUKProviderTest")
|
||||
public class CloudServersUKProviderTest extends BaseProviderMetadataTest {
|
||||
|
||||
public CloudServersUKProviderTest() {
|
||||
super(new CloudServersUKProviderMetadata(), new NovaApiMetadata());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* 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 computee 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.rackspace.cloudservers.uk.compute;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUKComputeServiceLiveTest")
|
||||
public class CloudServersUKComputeServiceLiveTest extends NovaComputeServiceLiveTest {
|
||||
|
||||
public CloudServersUKComputeServiceLiveTest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/**
|
||||
* 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 computee 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.rackspace.cloudservers.uk.compute;
|
||||
|
||||
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
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.openstack.nova.v2_0.compute.options.NovaTemplateOptions;
|
||||
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", singleThreaded = true, testName = "CloudServersUKTemplateBuilderLiveTest")
|
||||
public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
||||
|
||||
public CloudServersUKTemplateBuilderLiveTest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
|
||||
@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.matches("^1[012].*") && !input.version
|
||||
.equals("10.10")))
|
||||
&& input.is64Bit;
|
||||
case DEBIAN:
|
||||
return input.is64Bit && !input.version.equals("5.0");
|
||||
case CENTOS:
|
||||
return (input.version.equals("") || input.version.equals("5.6") || input.version.equals("6.0"))
|
||||
&& input.is64Bit;
|
||||
case WINDOWS:
|
||||
return input.is64Bit && input.version.equals("");
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTemplateBuilder() {
|
||||
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu 12.04 LTS (Precise Pangolin)");
|
||||
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "root");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "LON");
|
||||
assertEquals(defaultTemplate.getImage().getLocation().getId(), "LON");
|
||||
assertEquals(defaultTemplate.getHardware().getLocation().getId(), "LON");
|
||||
assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), false);
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("GB-SLG");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk.compute.extensions;
|
||||
|
||||
import org.jclouds.compute.extensions.internal.BaseImageExtensionLiveTest;
|
||||
import org.jclouds.sshj.config.SshjSshClientModule;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.inject.Module;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUKImageExtensionLivetest")
|
||||
public class CloudServersUKImageExtensionLivetest extends BaseImageExtensionLiveTest {
|
||||
|
||||
public CloudServersUKImageExtensionLivetest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Module getSshModule() {
|
||||
return new SshjSshClientModule();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.FlavorApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUKFlavorApiLiveTest")
|
||||
public class CloudServersUKFlavorApiLiveTest extends FlavorApiLiveTest {
|
||||
public CloudServersUKFlavorApiLiveTest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.ImageApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUKImageApiLiveTest")
|
||||
public class CloudServersUKImageApiLiveTest extends ImageApiLiveTest {
|
||||
public CloudServersUKImageApiLiveTest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* 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.rackspace.cloudservers.uk.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.ServerApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUKServerApiLiveTest")
|
||||
public class CloudServersUKServerApiLiveTest extends ServerApiLiveTest {
|
||||
public CloudServersUKServerApiLiveTest() {
|
||||
provider = "rackspace-cloudservers-uk";
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -29,8 +29,8 @@
|
|||
</parent>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>rackspace-cloudservers-us</artifactId>
|
||||
<name>jclouds Rackspace Next Generation Cloud Servers provider</name>
|
||||
<description>OpenStack Nova implementation targeted to Rackspace Next Generation Cloud Servers</description>
|
||||
<name>jclouds Rackspace Next Generation Cloud Servers US provider</name>
|
||||
<description>OpenStack Nova implementation targeted to Rackspace Next Generation Cloud Servers US</description>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -78,7 +78,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
|
|||
|
||||
protected Builder(){
|
||||
id("rackspace-cloudservers-us")
|
||||
.name("Rackspace Next Generation Cloud Servers")
|
||||
.name("Rackspace Next Generation Cloud Servers US")
|
||||
.apiMetadata(new NovaApiMetadata().toBuilder()
|
||||
.identityName("${userName}")
|
||||
.credentialName("${apiKey}")
|
||||
|
|
Loading…
Reference in New Issue