mirror of
https://github.com/apache/jclouds.git
synced 2025-02-16 06:56:45 +00:00
attempt to clear fuzz from cloudservers
This commit is contained in:
parent
5c56e0b9c8
commit
d7cbb2da8d
@ -18,10 +18,8 @@
|
||||
*/
|
||||
package org.jclouds.cloudservers_nova.us;
|
||||
|
||||
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
|
||||
import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
|
||||
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
|
||||
import static org.jclouds.openstack.nova.v1_1.config.NovaProperties.AUTO_ALLOCATE_FLOATING_IPS;
|
||||
import static org.jclouds.openstack.nova.v1_1.config.NovaProperties.AUTO_GENERATE_KEYPAIRS;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
@ -67,11 +65,8 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
|
||||
public static Properties defaultProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
|
||||
properties.setProperty(TEMPLATE, "imageId=DFW/3afe97b2-26dc-49c5-a2cc-a2fc8d80c001");
|
||||
|
||||
// deallocating ip addresses can take a while
|
||||
properties.setProperty(TIMEOUT_NODE_TERMINATED, 60 * 1000 + "");
|
||||
properties.setProperty(AUTO_ALLOCATE_FLOATING_IPS, "true");
|
||||
properties.setProperty(AUTO_GENERATE_KEYPAIRS, "true");
|
||||
return properties;
|
||||
}
|
||||
|
||||
@ -90,7 +85,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
|
||||
.homepage(URI.create("http://www.rackspace.com/cloud/nextgen"))
|
||||
.console(URI.create("https://mycloud.rackspace.com"))
|
||||
.linkedServices("cloudservers-nova-us", "cloudfiles-swift-us")
|
||||
.iso3166Codes("US-IL", "US-TX")
|
||||
.iso3166Codes("US-TX")
|
||||
.endpoint("https://identity.api.rackspacecloud.com")
|
||||
.defaultProperties(CloudServersUSProviderMetadata.defaultProperties());
|
||||
}
|
||||
|
@ -53,7 +53,9 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
||||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return (input.version.equals("") || input.version.equals("12.04") || input.version.matches("^1[01].*")) && input.is64Bit;
|
||||
return (input.version.equals("") || (input.version.matches("^1[01].*") && !input.version
|
||||
.equals("10.10")))
|
||||
&& input.is64Bit;
|
||||
case DEBIAN:
|
||||
return input.is64Bit && !input.version.equals("5.0");
|
||||
case CENTOS:
|
||||
@ -71,19 +73,19 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
||||
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().getVersion(), "11.10");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu Precise 12.04 LTS Server 64-bit 20120424");
|
||||
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu 11.10");
|
||||
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "ubuntu");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "az-2.region-a.geo-1");
|
||||
assertEquals(defaultTemplate.getImage().getLocation().getId(), "az-2.region-a.geo-1");
|
||||
assertEquals(defaultTemplate.getHardware().getLocation().getId(), "az-2.region-a.geo-1");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "DFW");
|
||||
assertEquals(defaultTemplate.getImage().getLocation().getId(), "DFW");
|
||||
assertEquals(defaultTemplate.getHardware().getLocation().getId(), "DFW");
|
||||
assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), true);
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 4.0d);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-NV");
|
||||
return ImmutableSet.<String> of("US-TX");
|
||||
}
|
||||
}
|
||||
|
@ -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.cloudservers_nova.us.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v1_1.extensions.FloatingIPClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUSFloatingIPClientLiveTest")
|
||||
public class CloudServersUSFloatingIPClientLiveTest extends FloatingIPClientLiveTest {
|
||||
public CloudServersUSFloatingIPClientLiveTest() {
|
||||
provider = "cloudservers-nova-us";
|
||||
}
|
||||
|
||||
}
|
@ -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.cloudservers_nova.us.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v1_1.extensions.KeyPairClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUSKeyPairClientLiveTest")
|
||||
public class CloudServersUSKeyPairClientLiveTest extends KeyPairClientLiveTest {
|
||||
public CloudServersUSKeyPairClientLiveTest() {
|
||||
provider = "cloudservers-nova-us";
|
||||
}
|
||||
|
||||
}
|
@ -1,33 +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.cloudservers_nova.us.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v1_1.extensions.SecurityGroupClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUSSecurityGroupClientLiveTest")
|
||||
public class CloudServersUSSecurityGroupClientLiveTest extends SecurityGroupClientLiveTest {
|
||||
public CloudServersUSSecurityGroupClientLiveTest() {
|
||||
provider = "cloudservers-nova-us";
|
||||
}
|
||||
}
|
@ -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.cloudservers_nova.us.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v1_1.extensions.VolumeClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "CloudServersUSVolumeClientLiveTest")
|
||||
public class CloudServersUSVolumeClientLiveTest extends VolumeClientLiveTest {
|
||||
public CloudServersUSVolumeClientLiveTest() {
|
||||
provider = "cloudservers-nova-us";
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user