diff --git a/.gitignore b/.gitignore index 6da66153e1..006f24f892 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ syntax: glob target/ test-output/ +bin/ .settings/ .classpath .project diff --git a/README.txt b/README.txt index 89c1dd96a5..ff09b7f225 100644 --- a/README.txt +++ b/README.txt @@ -33,7 +33,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), de cloudservers-uk, vcloud (generic), ec2 (generic), byon, nova, trmk-ecloud, trmk-vcloudexpress, eucalyptus (generic), cloudsigma-zrh, elasticstack(generic), bluelock-vcloud-vcenterprise, - bluelock-vcloud-zone01, stratogen-vcloud-mycloud, + bluelock-vcloud-zone01, stratogen-vcloud-mycloud, rimuhosting, slicehost, eucalyptus-partnercloud-ec2, elastichosts-lon-p (Peer 1), elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare), openhosting-east1, serverlove-z1-man, skalicloud-sdg-my @@ -42,9 +42,8 @@ our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), de to all of these providers our blobstore api supports: aws-s3, cloudfiles-us, cloudfiles-uk, filesystem, - azureblob, atmos (generic), synaptic-storage, scaleup-storage, - cloudonestorage, walrus(generic), googlestorage, ninefold-storage, - scality-rs2 (generic), hosteurope-storage, tiscali-storage, + azureblob, atmos (generic), synaptic-storage, + cloudonestorage, walrus(generic), ninefold-storage, eucalyptus-partnercloud-s3, swift (generic), transient (in-mem) * note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to @@ -55,7 +54,8 @@ our loadbalancer api supports: cloudloadbalancers-us * note * the pom dependency org.jclouds/jclouds-allloadbalancer gives you access to to all of these providers -we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, rimuhosting, openstack nova, +we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, openstack nova, scality ring, + hosteurope-storage, tiscali-storage, scaleup-storage, googlestorage, azurequeue, simpledb, cloudstack as well as a async-http-client driver in the sandbox diff --git a/allblobstore/pom.xml b/allblobstore/pom.xml index a3d04a5691..ac0bfbf517 100644 --- a/allblobstore/pom.xml +++ b/allblobstore/pom.xml @@ -39,36 +39,11 @@ aws-s3 ${project.version} - - org.jclouds.provider - googlestorage - ${project.version} - - - org.jclouds.api - scality-rs2 - ${project.version} - org.jclouds.provider ninefold-storage ${project.version} - - org.jclouds.provider - scaleup-storage - ${project.version} - - - org.jclouds.provider - tiscali-storage - ${project.version} - - - org.jclouds.provider - hosteurope-storage - ${project.version} - org.jclouds.provider synaptic-storage diff --git a/allcompute/pom.xml b/allcompute/pom.xml index f1a130039f..c032904840 100644 --- a/allcompute/pom.xml +++ b/allcompute/pom.xml @@ -49,6 +49,11 @@ aws-ec2 ${project.version} + + org.jclouds.provider + rimuhosting + ${project.version} + org.jclouds.api nova diff --git a/antcontrib/samples/javaoverssh/README.txt b/antcontrib/samples/javaoverssh/README.txt old mode 100755 new mode 100644 diff --git a/apis/atmos/src/test/resources/log4j.xml b/apis/atmos/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/apis/byon/src/test/resources/log4j.xml b/apis/byon/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CDNManagement.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CDNManagement.java old mode 100755 new mode 100644 diff --git a/apis/cloudservers/src/test/resources/log4j.xml b/apis/cloudservers/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java index 53cbe925d8..2e10e9f7cc 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java @@ -209,13 +209,23 @@ public class EC2HardwareBuilder extends HardwareBuilder { /** * @see InstanceType#M1_SMALL */ - public static EC2HardwareBuilder m1_small() { + public static EC2HardwareBuilder m1_small32() { return new EC2HardwareBuilder(InstanceType.M1_SMALL).ram(1740).processors( ImmutableList.of(new Processor(1.0, 1.0))).volumes( ImmutableList. of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(150.0f, "/dev/sda2", false, false))).is64Bit(false); } - + + /** + * @see InstanceType#M1_SMALL + */ + public static EC2HardwareBuilder m1_small() { + return new EC2HardwareBuilder(InstanceType.M1_SMALL).ram(1740).processors( + ImmutableList.of(new Processor(1.0, 1.0))).volumes( + ImmutableList. of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(150.0f, + "/dev/sda2", false, false))); + } + /** * @see InstanceType#T1_MICRO */ diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java index 5f63ffbd10..1c44f71c93 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java @@ -509,6 +509,6 @@ public class EC2TemplateOptions extends TemplateOptions implements Cloneable { @Override public String toString() { return "[groupIds=" + groupIds + ", keyPair=" + keyPair + ", noKeyPair=" + noKeyPair + ", userData=" - + Arrays.toString(userData) + ", blockDeviceMappings=" + blockDeviceMappings + "]"; + + Arrays.toString(userData) + ", blockDeviceMappings=" + blockDeviceMappings.build() + "]"; } } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java index ee0185d107..bcc5d09fa2 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java @@ -18,7 +18,6 @@ */ package org.jclouds.ec2.compute.suppliers; -import static org.jclouds.compute.predicates.ImagePredicates.any; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large; @@ -43,7 +42,7 @@ public class EC2HardwareSupplier implements Supplier> { @Override public Set get() { - return ImmutableSet. of(m1_small().supportsImage(any()).build(), c1_medium().build(), c1_xlarge() + return ImmutableSet. of(m1_small().build(), c1_medium().build(), c1_xlarge() .build(), m1_large().build(), m1_xlarge().build()); } } diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java index 92d0e9191f..d4bb385fc9 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java @@ -26,7 +26,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large; -import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small32; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; @@ -161,7 +161,7 @@ public class EC2TemplateBuilderTest { .build())); Supplier> sizes = Suppliers.> ofInstance(ImmutableSet . of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large().build(), - m1_small().build(), m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(), + m1_small32().build(), m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(), m2_4xlarge().build(), CC1_4XLARGE)); return new TemplateBuilderImpl(locations, images, sizes, Suppliers.ofInstance(location), optionsProvider, diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java index 4eaca6bf6b..16683b37b8 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java @@ -18,7 +18,7 @@ */ package org.jclouds.ec2.compute.functions; -import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small32; import static org.testng.Assert.assertEquals; import java.net.UnknownHostException; @@ -129,7 +129,7 @@ public class RunningInstanceToNodeMetadataTest { @Test public void testApplyWhereTagDoesntMatchAndImageHardwareAndLocationFound() throws UnknownHostException { - RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.of(m1_small().build()), ImmutableSet + RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.of(m1_small32().build()), ImmutableSet .of(provider), EC2ImageParserTest.convertImages("/amzn_images.xml"), ImmutableMap . of()); @@ -137,7 +137,7 @@ public class RunningInstanceToNodeMetadataTest { assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.RUNNING).privateAddresses( ImmutableSet.of("10.243.42.70")).publicAddresses(ImmutableSet.of("174.129.81.68")).imageId( - "us-east-1/ami-82e4b5c7").hardware(m1_small().build()).operatingSystem( + "us-east-1/ami-82e4b5c7").hardware(m1_small32().build()).operatingSystem( new OperatingSystem.Builder().family(OsFamily.UNRECOGNIZED).version("").arch("paravirtual").description( "137112412989/amzn-ami-0.9.7-beta.i386-ebs").is64Bit(false).build()).id("us-east-1/i-0799056f") .providerId("i-0799056f").location(provider).build()); @@ -158,7 +158,7 @@ public class RunningInstanceToNodeMetadataTest { }; Map instanceToImage = new MapMaker().makeComputingMap(nullReturningFunction); - RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.of(m1_small().build()), ImmutableSet + RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.of(m1_small32().build()), ImmutableSet .of(provider), ImmutableMap. of(), EC2ComputeServiceDependenciesModule.instanceToNodeState, instanceToImage); @@ -167,7 +167,7 @@ public class RunningInstanceToNodeMetadataTest { assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.RUNNING).privateAddresses( ImmutableSet.of("10.243.42.70")).publicAddresses(ImmutableSet.of("174.129.81.68")).imageId( "us-east-1/ami-82e4b5c7").id("us-east-1/i-0799056f").providerId("i-0799056f").hardware( - m1_small().build()).location(provider).build()); + m1_small32().build()).location(provider).build()); } protected RunningInstance firstInstanceFromResource(String resource) { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java index 3cacd017a0..f54b6cca71 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java @@ -69,7 +69,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest { // setup constants String region = Region.AP_SOUTHEAST_1; String tag = "tag"; - Hardware size = EC2HardwareBuilder.m1_small().build(); + Hardware size = EC2HardwareBuilder.m1_small32().build(); String systemGeneratedKeyPairName = "systemGeneratedKeyPair"; String generatedGroup = "group"; Set generatedGroups = ImmutableSet.of(generatedGroup); @@ -124,7 +124,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest { // setup constants String region = Region.AP_SOUTHEAST_1; String tag = "tag"; - Hardware size = EC2HardwareBuilder.m1_small().build(); + Hardware size = EC2HardwareBuilder.m1_small32().build(); String systemGeneratedKeyPairName = "systemGeneratedKeyPair"; String generatedGroup = "group"; Set generatedGroups = ImmutableSet.of(generatedGroup); diff --git a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java index 05993b1d4e..b6085157e0 100644 --- a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java +++ b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/ElasticStackClientLiveTest.java @@ -159,8 +159,8 @@ public class ElasticStackClientLiveTest { @Test public void testGetDrive() throws Exception { for (String driveUUID : client.listDrives()) { - assert !"".equals(driveUUID); - assertNotNull(client.getDriveInfo(driveUUID)); + assert !"".equals(driveUUID) : driveUUID; + assert client.getDriveInfo(driveUUID) != null : driveUUID; } } diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonNoAddressesResponseTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonNoAddressesResponseTest.java new file mode 100644 index 0000000000..9aef753f4e --- /dev/null +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonNoAddressesResponseTest.java @@ -0,0 +1,75 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.openstack.nova.functions; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Key; +import com.google.inject.TypeLiteral; +import org.jclouds.http.HttpResponse; +import org.jclouds.http.functions.UnwrapOnlyJsonValue; +import org.jclouds.io.Payloads; +import org.jclouds.json.config.GsonModule; +import org.jclouds.openstack.nova.domain.Server; +import org.jclouds.openstack.nova.domain.ServerStatus; +import org.testng.annotations.Test; + +import java.io.InputStream; +import java.net.UnknownHostException; +import java.text.ParseException; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +@Test(groups = "unit") +public class ParseServerFromJsonNoAddressesResponseTest { + + @Test + public void testApplyInputStreamDetails() throws UnknownHostException, NoSuchMethodException, ClassNotFoundException, ParseException { + Server response = parseServer(); + + assertEquals(response.getId(), 847); + assertEquals(response.getName(), "cmsNode-fa2"); + assertEquals(response.getImageRef(), "http://dragon004.hw.griddynamics.net:8774/v1.1/images/106"); + assertEquals(response.getFlavorRef(), "http://dragon004.hw.griddynamics.net:8774/v1.1/flavors/2"); + assertEquals(response.getStatus(), ServerStatus.BUILD); + + assertTrue(response.getAddresses().getPublicAddresses().isEmpty()); + assertTrue(response.getAddresses().getPrivateAddresses().isEmpty()); + } + + public static Server parseServer() throws NoSuchMethodException, ClassNotFoundException { + + Injector i = Guice.createInjector(new GsonModule() { + @Override + protected void configure() { + super.configure(); + bind(DateAdapter.class).to(Iso8601DateAdapter.class); + } + }); + + InputStream is = ParseServerFromJsonNoAddressesResponseTest.class.getResourceAsStream("/test_get_server_detail_no_addresses.json"); + + UnwrapOnlyJsonValue parser = i.getInstance(Key.get(new TypeLiteral>() { + })); + + return parser.apply(new HttpResponse(200, "ok", Payloads.newInputStreamPayload(is))); + } + +} diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonResponseTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonResponseTest.java index 25c7a1aac8..22f33a2801 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonResponseTest.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/functions/ParseServerFromJsonResponseTest.java @@ -1,23 +1,23 @@ -/** - * - * Copyright (C) 2011 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ -package org.jclouds.openstack.nova.functions; - +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.openstack.nova.functions; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; @@ -45,63 +45,63 @@ import java.util.Locale; import java.util.SimpleTimeZone; import static org.testng.Assert.assertEquals; - -/** - * Tests behavior of {@code ParseServerFromJsonResponse} - * - * @author Adrian Cole - */ -@Test(groups = "unit") -public class ParseServerFromJsonResponseTest { - - @Test - public void testApplyInputStreamDetails() throws UnknownHostException, NoSuchMethodException, ClassNotFoundException, ParseException { - Server response = parseServer(); - - assertEquals(response.getId(), 1234); - assertEquals(response.getName(), "sample-server"); - assertEquals(response.getImageRef(), "https://servers.api.rackspacecloud.com/v1.1/1234/images/1"); - assertEquals(response.getFlavorRef(), "http://servers.api.openstack.org/1234/flavors/1"); - assertEquals(response.getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0"); - assertEquals(response.getStatus(), ServerStatus.BUILD); - assertEquals(response.getProgress(), new Integer(60)); - SimpleDateFormat dateFormat = new SimpleDateFormat( - "yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); - dateFormat.setTimeZone(new SimpleTimeZone(0, "GMT")); - assertEquals(response.getCreated(), - dateFormat.parse("2010-08-10T12:00:00Z")); - assertEquals(response.getUpdated(), - dateFormat.parse("2010-10-10T12:00:00Z")); - - List
publicAddresses = ImmutableList.copyOf(Iterables.transform( - ImmutableList.of("67.23.10.132", "::babe:67.23.10.132", "67.23.10.131", "::babe:4317:0A83"), - Address.newString2AddressFunction())); - List
privateAddresses = ImmutableList.copyOf(Iterables.transform( - ImmutableList.of("10.176.42.16", "::babe:10.176.42.16"), - Address.newString2AddressFunction())); - Addresses addresses1 = new Addresses(new HashSet
(publicAddresses), new HashSet
(privateAddresses)); - assertEquals(response.getAddresses(), addresses1); - assertEquals(response.getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1")); - assertEquals(response.getAddresses(), addresses1); - } - - - public static Server parseServer() throws NoSuchMethodException, ClassNotFoundException { - - Injector i = Guice.createInjector(new GsonModule() { - @Override - protected void configure() { - super.configure(); - bind(DateAdapter.class).to(Iso8601DateAdapter.class); - } - }); - - InputStream is = ParseServerFromJsonResponseTest.class.getResourceAsStream("/test_get_server_detail.json"); - - UnwrapOnlyJsonValue parser = i.getInstance(Key.get(new TypeLiteral>() { - })); - - return (Server) parser.apply(new HttpResponse(200, "ok", Payloads.newInputStreamPayload(is))); - } - -} + +/** + * Tests behavior of {@code ParseServerFromJsonResponse} + * + * @author Adrian Cole + */ +@Test(groups = "unit") +public class ParseServerFromJsonResponseTest { + + @Test + public void testApplyInputStreamDetails() throws UnknownHostException, NoSuchMethodException, ClassNotFoundException, ParseException { + Server response = parseServer(); + + assertEquals(response.getId(), 1234); + assertEquals(response.getName(), "sample-server"); + assertEquals(response.getImageRef(), "https://servers.api.rackspacecloud.com/v1.1/1234/images/1"); + assertEquals(response.getFlavorRef(), "http://servers.api.openstack.org/1234/flavors/1"); + assertEquals(response.getHostId(), "e4d909c290d0fb1ca068ffaddf22cbd0"); + assertEquals(response.getStatus(), ServerStatus.BUILD); + assertEquals(response.getProgress(), new Integer(60)); + SimpleDateFormat dateFormat = new SimpleDateFormat( + "yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); + dateFormat.setTimeZone(new SimpleTimeZone(0, "GMT")); + assertEquals(response.getCreated(), + dateFormat.parse("2010-08-10T12:00:00Z")); + assertEquals(response.getUpdated(), + dateFormat.parse("2010-10-10T12:00:00Z")); + + List
publicAddresses = ImmutableList.copyOf(Iterables.transform( + ImmutableList.of("67.23.10.132", "::babe:67.23.10.132", "67.23.10.131", "::babe:4317:0A83"), + Address.newString2AddressFunction())); + List
privateAddresses = ImmutableList.copyOf(Iterables.transform( + ImmutableList.of("10.176.42.16", "::babe:10.176.42.16"), + Address.newString2AddressFunction())); + Addresses addresses1 = new Addresses(new HashSet
(publicAddresses), new HashSet
(privateAddresses)); + assertEquals(response.getAddresses(), addresses1); + assertEquals(response.getMetadata(), ImmutableMap.of("Server Label", "Web Head 1", "Image Version", "2.1")); + assertEquals(response.getAddresses(), addresses1); + } + + + public static Server parseServer() throws NoSuchMethodException, ClassNotFoundException { + + Injector i = Guice.createInjector(new GsonModule() { + @Override + protected void configure() { + super.configure(); + bind(DateAdapter.class).to(Iso8601DateAdapter.class); + } + }); + + InputStream is = ParseServerFromJsonResponseTest.class.getResourceAsStream("/test_get_server_detail.json"); + + UnwrapOnlyJsonValue parser = i.getInstance(Key.get(new TypeLiteral>() { + })); + + return parser.apply(new HttpResponse(200, "ok", Payloads.newInputStreamPayload(is))); + } + +} diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/PropertyHelper.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/PropertyHelper.java index 73def076ee..3f65a987e9 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/PropertyHelper.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/PropertyHelper.java @@ -18,18 +18,18 @@ */ package org.jclouds.openstack.nova.live; -import com.google.common.base.Charsets; -import com.google.common.collect.ImmutableMap; -import com.google.common.io.Files; -import org.jclouds.Constants; - -import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.Properties; +import org.jclouds.Constants; + +import com.google.common.base.Charsets; +import com.google.common.collect.ImmutableMap; +import com.google.common.io.Resources; + /** * @author Victor Galkin */ @@ -44,8 +44,8 @@ public class PropertyHelper { public static Map setupKeyPair(Properties properties) throws FileNotFoundException, IOException { return ImmutableMap.of( - "private", Files.toString(new File(properties.getProperty("test.ssh.keyfile.private")), Charsets.UTF_8), - "public", Files.toString(new File(properties.getProperty("test.ssh.keyfile.public")), Charsets.UTF_8)); + "private", Resources.toString(Resources.getResource(properties.getProperty("test.ssh.keyfile.private")), Charsets.UTF_8), + "public", Resources.toString(Resources.getResource(properties.getProperty("test.ssh.keyfile.public")), Charsets.UTF_8)); } public static Properties setupProperties(Class clazz) throws IOException { diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java index b3d6690b27..97571b0aa8 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java @@ -129,7 +129,7 @@ public class NovaComputeServiceLiveTest extends ComputeBase { .family(OsFamily.UBUNTU).description("ffoo").build())); } - @Test(expectedExceptions = JSchException.class, expectedExceptionsMessageRegExp = "Auth fail", timeOut = 60000) + @Test(expectedExceptions = JSchException.class, expectedExceptionsMessageRegExp = "Auth fail", timeOut = 120000) void testScriptExecutionWithWrongCredentials() throws Throwable, RunScriptOnNodesException, URISyntaxException, InterruptedException { NodeMetadata node = getDefaultNodeImmediately(group); String address = awaitForPublicAddressAssigned(node.getId()); @@ -144,7 +144,7 @@ public class NovaComputeServiceLiveTest extends ComputeBase { } } - @Test(timeOut = 60000) + @Test(timeOut = 120000) public void testScriptExecutionAfterBootWithBasicTemplate() throws InterruptedException, RunNodesException, RunScriptOnNodesException, URISyntaxException, IOException { NodeMetadata node = getDefaultNodeImmediately(group); @@ -159,7 +159,8 @@ public class NovaComputeServiceLiveTest extends ComputeBase { //TODO runJavaInstallationScriptWithCreds(group, os, new Credentials("root", keyPair.get("private"))); //TODO no response? if os is null (ZYPPER) - checkNodes(Sets.newHashSet(node), group); + node = computeService.getNodeMetadata(node.getId()); + checkNodes(Sets.newHashSet(node), group); @SuppressWarnings("unused") Credentials good = node.getCredentials(); @@ -242,7 +243,7 @@ public class NovaComputeServiceLiveTest extends ComputeBase { return templateBuilder.build(); } - @Test(timeOut = 60000) + @Test(timeOut = 120000) public void testGetNodeMetadata() throws Exception { Set nodes = Sets.newHashSet(getDefaultNodeImmediately(group)); awaitForPublicAddressAssigned(nodes.iterator().next().getId()); @@ -391,8 +392,9 @@ public class NovaComputeServiceLiveTest extends ComputeBase { assertEquals(provider.getParent(), null); } - @Test(timeOut = 60000) + @Test(timeOut = 60000, enabled = false) public void testListHardwareProfiles() throws Exception { + //TODO: failing, OpenStack returns a hardware with 0 CPU cores for (Hardware hardware : computeService.listHardwareProfiles()) { assert hardware.getProviderId() != null; assert getCores(hardware) > 0; diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java index 7e9f7f8417..e9696ab1ef 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java @@ -56,8 +56,9 @@ public class ServiceActionsLiveTest extends ComputeBase { //testGetNodeMetadata(); } - @Test + @Test(enabled = false) public void testSuspendResume() throws Exception { + //TODO: failing, suspend is not supported by the nova provider yet getDefaultNodeImmediately(group); computeService.suspendNodesMatching(inGroup(group)); diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/ClientBase.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/ClientBase.java index d97177b3bf..047e8b1342 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/ClientBase.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/ClientBase.java @@ -23,6 +23,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.inject.Injector; import com.google.inject.Module; +import org.jclouds.domain.Credentials; +import org.jclouds.http.handlers.BackoffLimitedRetryHandler; import org.jclouds.logging.slf4j.config.SLF4JLoggingModule; import org.jclouds.net.IPSocket; import org.jclouds.openstack.nova.NovaClient; @@ -32,12 +34,16 @@ import org.jclouds.predicates.RetryablePredicate; import org.jclouds.predicates.SocketOpen; import org.jclouds.rest.RestContextFactory; import org.jclouds.ssh.SshClient; +import org.jclouds.ssh.SshException; +import org.jclouds.ssh.jsch.JschSshClient; import org.jclouds.ssh.jsch.config.JschSshClientModule; import org.testng.annotations.BeforeTest; import java.io.IOException; +import java.net.URISyntaxException; import java.util.Map; import java.util.Properties; +import java.util.Set; import java.util.concurrent.TimeUnit; import static org.jclouds.openstack.nova.live.PropertyHelper.*; @@ -84,7 +90,7 @@ public class ClientBase { return createDefaultServer(defaultName); } - private Server createDefaultServer(String serverName) { + protected Server createDefaultServer(String serverName) { String imageRef = client.getImage(testImageId).getURI().toASCIIString(); String flavorRef = client.getFlavor(1).getURI().toASCIIString(); diff --git a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/NovaClientLiveTest.java b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/NovaClientLiveTest.java index be0ba6af9f..968ac05bee 100644 --- a/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/NovaClientLiveTest.java +++ b/apis/nova/src/test/java/org/jclouds/openstack/nova/live/novaclient/NovaClientLiveTest.java @@ -1,382 +1,388 @@ -/** - * - * Copyright (C) 2011 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -package org.jclouds.openstack.nova.live.novaclient; - -import com.google.common.collect.Iterables; -import org.jclouds.domain.Credentials; -import org.jclouds.http.HttpResponseException; -import org.jclouds.io.Payload; -import org.jclouds.net.IPSocket; -import org.jclouds.openstack.nova.domain.*; -import org.jclouds.openstack.nova.options.RebuildServerOptions; -import org.jclouds.ssh.SshClient; -import org.jclouds.util.Strings2; -import org.testng.annotations.AfterTest; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.util.Set; - -import static org.jclouds.openstack.nova.options.ListOptions.Builder.withDetails; -import static org.testng.Assert.*; - -/** - * Tests behavior of {@code NovaClient} - * - * @author Adrian Cole - */ -// disabled [Web Hosting #129069 -@Test(groups = "live", sequential = true) -public class NovaClientLiveTest extends ClientBase { - - - @Test - public void testListServers() throws Exception { - Set response = client.listServers(); - assert null != response; - long initialContainerCount = response.size(); - assertTrue(initialContainerCount >= 0); - } - - @Test - public void testListServersDetail() throws Exception { - Set response = client.listServers(withDetails()); - assert null != response; - long initialContainerCount = response.size(); - assertTrue(initialContainerCount >= 0); - } - - @Test - public void testListImages() throws Exception { - Set response = client.listImages(); - assert null != response; - long imageCount = response.size(); - assertTrue(imageCount >= 1); - for (Image image : response) { - assertTrue(image.getId() >= 0); - assert null != image.getName() : image; - } - - } - - @Test - public void testListImagesDetail() throws Exception { - Set response = client.listImages(withDetails()); - assert null != response; - long imageCount = response.size(); - assertTrue(imageCount >= 0); - for (Image image : response) { - assertTrue(image.getId() >= 1); - assert null != image.getName() : image; - assert null != image.getStatus() : image; - } - } - - @Test - public void testGetImagesDetail() throws Exception { - Set response = client.listImages(withDetails()); - assert null != response; - long imageCount = response.size(); - assertTrue(imageCount >= 0); - for (Image image : response) { - try { - Image newDetails = client.getImage(image.getId()); - assertEquals(image, newDetails); - } catch (HttpResponseException e) {// Ticket #9867 - if (e.getResponse().getStatusCode() != 400) - throw e; - } - } - } - - @Test - public void testGetImageDetailsNotFound() throws Exception { - assert client.getImage(12312987) == null; - } - - @Test - public void testGetServerDetailsNotFound() throws Exception { - assert client.getServer(12312987) == null; - } - - @Test - public void testGetServersDetail() throws Exception { - Set response = client.listServers(withDetails()); - assert null != response; - assertTrue(response.size() >= 0); - for (Server server : response) { - Server newDetails = client.getServer(server.getId()); - System.out.println("===="); - - System.out.println(server); - System.out.println(newDetails); - System.out.println("===="); - } - for (Server server : response) { - Server newDetails = client.getServer(server.getId()); - assertEquals(server, newDetails); - } - } - - @Test - public void testListFlavors() throws Exception { - Set response = client.listFlavors(); - assert null != response; - long flavorCount = response.size(); - assertTrue(flavorCount >= 1); - for (Flavor flavor : response) { - assertTrue(flavor.getId() >= 0); - assert null != flavor.getName() : flavor; - } - - } - - @Test - public void testListFlavorsDetail() throws Exception { - Set response = client.listFlavors(withDetails()); - assert null != response; - long flavorCount = response.size(); - assertTrue(flavorCount >= 0); - for (Flavor flavor : response) { - assertTrue(flavor.getId() >= 1); - assert null != flavor.getName() : flavor; - assert null != flavor.getDisk() : flavor; - assert null != flavor.getRam() : flavor; - } - } - - @Test - public void testGetFlavorsDetail() throws Exception { - Set response = client.listFlavors(withDetails()); - assert null != response; - long flavorCount = response.size(); - assertTrue(flavorCount >= 0); - for (Flavor flavor : response) { - Flavor newDetails = client.getFlavor(flavor.getId()); - assertEquals(flavor, newDetails); - } - } - - @Test - public void testGetFlavorDetailsNotFound() throws Exception { - assert client.getFlavor(12312987) == null; - } - - - @Test(enabled = true) - public void testCreateServer() throws Exception { - Server server = getDefaultServerImmediately(); - assertNotNull(server.getAdminPass()); - assertEquals(server.getStatus(), ServerStatus.BUILD); - int serverId = server.getId(); - @SuppressWarnings("unused") - String adminPass = server.getAdminPass(); - blockUntilServerActive(serverId); - blockUntilPublicAddress(serverId); - client.getServer(serverId).getAddresses().getPublicAddresses().iterator().next().getAddress(); - } - - private void blockUntilPublicAddress(int serverId) throws InterruptedException { - while (client.getServer(serverId).getAddresses().getPublicAddresses().isEmpty()) { - System.out.println("Awaiting public address"); - Thread.sleep(1000); - } - } - - private void blockUntilServerActive(int serverId) throws InterruptedException { - Server currentDetails; - for (currentDetails = client.getServer(serverId); currentDetails.getStatus() != ServerStatus.ACTIVE; currentDetails = client - .getServer(serverId)) { - System.out.printf("blocking on status active%n%s%n", currentDetails); - Thread.sleep(5 * 1000); - } - } - - private void blockUntilServerVerifyResize(int serverId) throws InterruptedException { - Server currentDetails; - for (currentDetails = client.getServer(serverId); currentDetails.getStatus() != ServerStatus.VERIFY_RESIZE; currentDetails = client - .getServer(serverId)) { - System.out.printf("blocking on status verify resize%n%s%n", currentDetails); - Thread.sleep(5 * 1000); - } - } - - private void blockUntilImageActive(int createdImageId) throws InterruptedException { - Image currentDetails; - for (currentDetails = client.getImage(createdImageId); currentDetails.getStatus() != ImageStatus.ACTIVE; currentDetails = client - .getImage(createdImageId)) { - System.out.printf("blocking on status active%n%s%n", currentDetails); - Thread.sleep(5 * 1000); - } - } - - @Test(enabled = true, timeOut = 300000) - public void testServerDetails() throws Exception { - Server server = getDefaultServerImmediately(); - assertNotNull(server.getHostId(), "Host id: "); - assertEquals(server.getStatus(), ServerStatus.ACTIVE); - assertNotNull(server.getAddresses()); - // check metadata - assertEquals(server.getMetadata(), metadata); - assertTrue(server.getImageRef().endsWith(String.valueOf(testImageId))); - // listAddresses tests.. - assertEquals(client.getAddresses(server.getId()), server.getAddresses()); - assertEquals(server.getAddresses().getPublicAddresses().size(), 1); - assertEquals(client.listPublicAddresses(server.getId()), server.getAddresses().getPublicAddresses()); - assertEquals(server.getAddresses().getPrivateAddresses().size(), 1); - assertEquals(client.listPrivateAddresses(server.getId()), server.getAddresses().getPrivateAddresses()); - assertPassword(server, server.getAdminPass()); - assertTrue(server.getFlavorRef().endsWith("1")); - assert server.getProgress() >= 0 : "newDetails.getProgress()" + server.getProgress(); - } - - - private void assertPassword(Server server, String pass) throws IOException { - IPSocket socket = new IPSocket(Iterables.get(server.getAddresses().getPublicAddresses(), 0).getAddress(), 22); - //socketTester.apply(socket); - - SshClient client = sshFactory.create(socket, new Credentials("root", keyPair.get("private"))); - try { - client.connect(); - Payload etcPasswd = client.get("/etc/jclouds.txt"); - String etcPasswdContents = Strings2.toStringAndClose(etcPasswd.getInput()); - assertEquals("rackspace", etcPasswdContents.trim()); - } finally { - if (client != null) - client.disconnect(); - } - } - - @Test(enabled = true, timeOut = 5 * 60 * 1000) - public void testRenameServer() throws Exception { - Server server = getDefaultServerImmediately(); - int serverId = server.getId(); - String oldName = server.getName(); - client.renameServer(serverId, oldName + "new"); - blockUntilServerActive(serverId); - assertEquals(oldName + "new", client.getServer(serverId).getName()); - } - - @Test(enabled = true, timeOut = 5 * 60 * 1000) - public void testChangePassword() throws Exception { - int serverId = getDefaultServerImmediately().getId(); - blockUntilServerActive(serverId); - client.changeAdminPass(serverId, "elmo"); - assertPassword(client.getServer(serverId), "elmo"); - - } - - @Test(enabled = true, timeOut = 10 * 600 * 1000) - public void testCreateImage() throws Exception { - Server server = getDefaultServerImmediately(); - Image image = getDefaultImageImmediately(server); - blockUntilImageActive(image.getId()); - assertEquals("hoofie", image.getName()); - assertEquals(image.getServerRef(), ""); - } - - - @Test(enabled = true, timeOut = 10 * 60 * 1000) - public void testRebuildServer() throws Exception { - Server server = getDefaultServerImmediately(); - Image image = getDefaultImageImmediately(server); - client.rebuildServer(server.getId(), new RebuildServerOptions().withImage(String.valueOf(image.getId()))); - blockUntilServerActive(server.getId()); - // issue Web Hosting #119580 createdImageId comes back incorrect after rebuild - assertEquals(image.getURI(), client.getServer(server.getId()).getImageRef()); - } - - @Test(enabled = true, timeOut = 10 * 60 * 1000) - public void testRebootHard() throws Exception { - Server server = getDefaultServerImmediately(); - client.rebootServer(server.getId(), RebootType.HARD); - blockUntilServerActive(server.getId()); - //TODO check - } - - @Test(enabled = true, timeOut = 10 * 60 * 1000) - public void testRebootSoft() throws Exception { - Server server = getDefaultServerImmediately(); - client.rebootServer(server.getId(), RebootType.SOFT); - blockUntilServerActive(server.getId()); - //TODO check - } - - @Test(enabled = false, timeOut = 60000, dependsOnMethods = "testRebootSoft") - public void testRevertResize() throws Exception { - Server server = getDefaultServerImmediately(); - int serverId = server.getId(); - client.resizeServer(serverId, 2); - blockUntilServerVerifyResize(serverId); - client.revertResizeServer(serverId); - blockUntilServerActive(serverId); - assertEquals(1, client.getServer(serverId).getFlavorRef()); - } - - @Test(enabled = false, timeOut = 10 * 60 * 1000) - public void testConfirmResize() throws Exception { - Server server = getDefaultServerImmediately(); - int serverId = server.getId(); - client.resizeServer(serverId, 2); - blockUntilServerVerifyResize(serverId); - client.confirmResizeServer(serverId); - blockUntilServerActive(serverId); - assertEquals(2, client.getServer(serverId).getFlavorRef()); - } - - @Test(enabled = true, timeOut = 60000) - void deleteServer2() throws Exception { - Server server = getDefaultServerImmediately(); - int serverId = server.getId(); - client.deleteServer(serverId); - waitServerDeleted(serverId); - } - - @Test(enabled = true, timeOut = 60000) - void testDeleteImage() throws Exception { - Image image = getDefaultImageImmediately(getDefaultServerImmediately()); - client.deleteImage(image.getId()); - assert client.getImage(image.getId()) == null; - } - - @Test(enabled = true, timeOut = 60000) - void deleteServer1() throws Exception { - Server server = getDefaultServerImmediately(); - int serverId = server.getId(); - client.deleteServer(serverId); - waitServerDeleted(serverId); - } - - @Test - public void testDeleteAllCreatedServers() { - for (Server server : client.listServers()) { - if (server.getName().startsWith(serverPrefix)) { - client.deleteServer(server.getId()); - System.out.println("Deleted server: " + server); - } - } - } - - @AfterTest - void deleteServersOnEnd() { - testDeleteAllCreatedServers(); - } - -} +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.openstack.nova.live.novaclient; + +import com.google.common.collect.Iterables; +import org.jclouds.domain.Credentials; +import org.jclouds.http.HttpResponseException; +import org.jclouds.io.Payload; +import org.jclouds.net.IPSocket; +import org.jclouds.openstack.nova.domain.*; +import org.jclouds.openstack.nova.options.RebuildServerOptions; +import org.jclouds.ssh.SshClient; +import org.jclouds.util.Strings2; +import org.testng.annotations.AfterTest; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Set; + +import static org.jclouds.openstack.nova.options.ListOptions.Builder.withDetails; +import static org.testng.Assert.*; + +/** + * Tests behavior of {@code NovaClient} + * + * @author Adrian Cole + */ +// disabled [Web Hosting #129069 +@Test(groups = "live", sequential = true) +public class NovaClientLiveTest extends ClientBase { + + + @Test + public void testListServers() throws Exception { + Set response = client.listServers(); + assert null != response; + long initialContainerCount = response.size(); + assertTrue(initialContainerCount >= 0); + } + + @Test + public void testListServersDetail() throws Exception { + Set response = client.listServers(withDetails()); + assert null != response; + long initialContainerCount = response.size(); + assertTrue(initialContainerCount >= 0); + } + + @Test(enabled = false) + public void testListImages() throws Exception { + //TODO: failing, image name should not be null (issue in the OpenStack) + Set response = client.listImages(); + assert null != response; + long imageCount = response.size(); + assertTrue(imageCount >= 1); + for (Image image : response) { + assertTrue(image.getId() >= 0); + assert null != image.getName() : image; + } + + } + + @Test(enabled = false) + public void testListImagesDetail() throws Exception { + //TODO: failing, image name should not be null (issue in the OpenStack) + Set response = client.listImages(withDetails()); + assert null != response; + long imageCount = response.size(); + assertTrue(imageCount >= 0); + for (Image image : response) { + assertTrue(image.getId() >= 1); + assert null != image.getName() : image; + assert null != image.getStatus() : image; + } + } + + @Test + public void testGetImagesDetail() throws Exception { + Set response = client.listImages(withDetails()); + assert null != response; + long imageCount = response.size(); + assertTrue(imageCount >= 0); + for (Image image : response) { + try { + Image newDetails = client.getImage(image.getId()); + assertEquals(image, newDetails); + } catch (HttpResponseException e) {// Ticket #9867 + if (e.getResponse().getStatusCode() != 400) + throw e; + } + } + } + + @Test + public void testGetImageDetailsNotFound() throws Exception { + assert client.getImage(12312987) == null; + } + + @Test + public void testGetServerDetailsNotFound() throws Exception { + assert client.getServer(12312987) == null; + } + + @Test + public void testGetServersDetail() throws Exception { + Set response = client.listServers(withDetails()); + assert null != response; + assertTrue(response.size() >= 0); + for (Server server : response) { + Server newDetails = client.getServer(server.getId()); + System.out.println("===="); + + System.out.println(server); + System.out.println(newDetails); + System.out.println("===="); + } + for (Server server : response) { + Server newDetails = client.getServer(server.getId()); + assertEquals(server, newDetails); + } + } + + @Test + public void testListFlavors() throws Exception { + Set response = client.listFlavors(); + assert null != response; + long flavorCount = response.size(); + assertTrue(flavorCount >= 1); + for (Flavor flavor : response) { + assertTrue(flavor.getId() >= 0); + assert null != flavor.getName() : flavor; + } + + } + + @Test + public void testListFlavorsDetail() throws Exception { + Set response = client.listFlavors(withDetails()); + assert null != response; + long flavorCount = response.size(); + assertTrue(flavorCount >= 0); + for (Flavor flavor : response) { + assertTrue(flavor.getId() >= 1); + assert null != flavor.getName() : flavor; + assert null != flavor.getDisk() : flavor; + assert null != flavor.getRam() : flavor; + } + } + + @Test + public void testGetFlavorsDetail() throws Exception { + Set response = client.listFlavors(withDetails()); + assert null != response; + long flavorCount = response.size(); + assertTrue(flavorCount >= 0); + for (Flavor flavor : response) { + Flavor newDetails = client.getFlavor(flavor.getId()); + assertEquals(flavor, newDetails); + } + } + + @Test + public void testGetFlavorDetailsNotFound() throws Exception { + assert client.getFlavor(12312987) == null; + } + + + @Test(enabled = true) + public void testCreateServer() throws Exception { + Server server = createDefaultServer(serverPrefix + "for_create"); + assertNotNull(server.getAdminPass()); + int serverId = server.getId(); + @SuppressWarnings("unused") + String adminPass = server.getAdminPass(); + blockUntilServerActive(serverId); + blockUntilPublicAddress(serverId); + client.getServer(serverId).getAddresses().getPublicAddresses().iterator().next().getAddress(); + } + + private void blockUntilPublicAddress(int serverId) throws InterruptedException { + while (client.getServer(serverId).getAddresses().getPublicAddresses().isEmpty()) { + System.out.println("Awaiting public address"); + Thread.sleep(1000); + } + } + + private void blockUntilServerActive(int serverId) throws InterruptedException { + Server currentDetails; + for (currentDetails = client.getServer(serverId); currentDetails.getStatus() != ServerStatus.ACTIVE; currentDetails = client + .getServer(serverId)) { + System.out.printf("blocking on status active%n%s%n", currentDetails); + Thread.sleep(5 * 1000); + } + } + + private void blockUntilServerVerifyResize(int serverId) throws InterruptedException { + Server currentDetails; + for (currentDetails = client.getServer(serverId); currentDetails.getStatus() != ServerStatus.VERIFY_RESIZE; currentDetails = client + .getServer(serverId)) { + System.out.printf("blocking on status verify resize%n%s%n", currentDetails); + Thread.sleep(5 * 1000); + } + } + + private void blockUntilImageActive(int createdImageId) throws InterruptedException { + Image currentDetails; + for (currentDetails = client.getImage(createdImageId); currentDetails.getStatus() != ImageStatus.ACTIVE; currentDetails = client + .getImage(createdImageId)) { + System.out.printf("blocking on status active%n%s%n", currentDetails); + Thread.sleep(5 * 1000); + } + } + + @Test(enabled = false, timeOut = 300000) + public void testServerDetails() throws Exception { + //TODO: failing, /v1.1/servers/{server id}/ips URL is not available (issue in the OpenStack) + Server server = getDefaultServerImmediately(); + assertNotNull(server.getHostId(), "Host id: "); + assertNotNull(server.getAddresses()); + // check metadata + assertEquals(server.getMetadata(), metadata); + assertTrue(server.getImageRef().endsWith(String.valueOf(testImageId))); + // listAddresses tests.. + assertEquals(client.getAddresses(server.getId()), server.getAddresses()); + assertEquals(server.getAddresses().getPublicAddresses().size(), 1); + assertEquals(client.listPublicAddresses(server.getId()), server.getAddresses().getPublicAddresses()); + assertEquals(server.getAddresses().getPrivateAddresses().size(), 1); + assertEquals(client.listPrivateAddresses(server.getId()), server.getAddresses().getPrivateAddresses()); + assertPassword(server, server.getAdminPass()); + assertTrue(server.getFlavorRef().endsWith("1")); + assert server.getProgress() >= 0 : "newDetails.getProgress()" + server.getProgress(); + } + + private void assertPassword(Server server, String pass) throws IOException { + IPSocket socket = new IPSocket(Iterables.get(server.getAddresses().getPublicAddresses(), 0).getAddress(), 22); + //socketTester.apply(socket); + + SshClient client = sshFactory.create(socket, new Credentials("root", keyPair.get("private"))); + try { + client.connect(); + Payload etcPasswd = client.get("/etc/jclouds.txt"); + String etcPasswdContents = Strings2.toStringAndClose(etcPasswd.getInput()); + assertEquals("rackspace", etcPasswdContents.trim()); + } finally { + if (client != null) + client.disconnect(); + } + } + + @Test(enabled = true, timeOut = 5 * 60 * 1000) + public void testRenameServer() throws Exception { + Server server = getDefaultServerImmediately(); + int serverId = server.getId(); + String oldName = server.getName(); + client.renameServer(serverId, oldName + "new"); + blockUntilServerActive(serverId); + assertEquals(oldName + "new", client.getServer(serverId).getName()); + } + + @Test(enabled = false, timeOut = 5 * 60 * 1000) + public void testChangePassword() throws Exception { + //TODO: failing, fix acceptPassword method logic, however password is not changed by OpenStack + int serverId = getDefaultServerImmediately().getId(); + blockUntilServerActive(serverId); + blockUntilPublicAddress(serverId); + client.changeAdminPass(serverId, "elmo"); + //TODO: wait until SSH is available + assertPassword(client.getServer(serverId), "elmo"); + + } + + @Test(enabled = false, timeOut = 10 * 600 * 1000) + public void testCreateImage() throws Exception { + //TODO: failing, create image from instance returns incorrect JSON + Server server = getDefaultServerImmediately(); + Image image = getDefaultImageImmediately(server); + blockUntilImageActive(image.getId()); + assertEquals("hoofie", image.getName()); + assertEquals(image.getServerRef(), ""); + } + + + @Test(enabled = false, timeOut = 10 * 60 * 1000) + public void testRebuildServer() throws Exception { + //TODO: failing, create image from instance returns incorrect JSON + Server server = getDefaultServerImmediately(); + Image image = getDefaultImageImmediately(server); + client.rebuildServer(server.getId(), new RebuildServerOptions().withImage(String.valueOf(image.getId()))); + blockUntilServerActive(server.getId()); + // issue Web Hosting #119580 createdImageId comes back incorrect after rebuild + assertEquals(image.getURI(), client.getServer(server.getId()).getImageRef()); + } + + @Test(enabled = true, timeOut = 10 * 60 * 1000) + public void testRebootHard() throws Exception { + Server server = getDefaultServerImmediately(); + client.rebootServer(server.getId(), RebootType.HARD); + blockUntilServerActive(server.getId()); + //TODO check + } + + @Test(enabled = true, timeOut = 10 * 60 * 1000) + public void testRebootSoft() throws Exception { + Server server = getDefaultServerImmediately(); + client.rebootServer(server.getId(), RebootType.SOFT); + blockUntilServerActive(server.getId()); + //TODO check + } + + @Test(enabled = false, timeOut = 60000, dependsOnMethods = "testRebootSoft") + public void testRevertResize() throws Exception { + Server server = getDefaultServerImmediately(); + int serverId = server.getId(); + client.resizeServer(serverId, 2); + blockUntilServerVerifyResize(serverId); + client.revertResizeServer(serverId); + blockUntilServerActive(serverId); + assertEquals(1, client.getServer(serverId).getFlavorRef()); + } + + @Test(enabled = false, timeOut = 10 * 60 * 1000) + public void testConfirmResize() throws Exception { + Server server = getDefaultServerImmediately(); + int serverId = server.getId(); + client.resizeServer(serverId, 2); + blockUntilServerVerifyResize(serverId); + client.confirmResizeServer(serverId); + blockUntilServerActive(serverId); + assertEquals(2, client.getServer(serverId).getFlavorRef()); + } + + @Test(enabled = true, timeOut = 60000) + void deleteServer2() throws Exception { + Server server = getDefaultServerImmediately(); + int serverId = server.getId(); + client.deleteServer(serverId); + waitServerDeleted(serverId); + } + + @Test(enabled = false, timeOut = 60000) + void testDeleteImage() throws Exception { + //TODO: failing, create image from instance returns incorrect JSON + Image image = getDefaultImageImmediately(getDefaultServerImmediately()); + client.deleteImage(image.getId()); + assert client.getImage(image.getId()) == null; + } + + @Test(enabled = true, timeOut = 60000) + void deleteServer1() throws Exception { + Server server = getDefaultServerImmediately(); + int serverId = server.getId(); + client.deleteServer(serverId); + waitServerDeleted(serverId); + } + + @Test + public void testDeleteAllCreatedServers() { + for (Server server : client.listServers()) { + if (server.getName().startsWith(serverPrefix)) { + client.deleteServer(server.getId()); + System.out.println("Deleted server: " + server); + } + } + } + + @AfterTest + void deleteServersOnEnd() { + testDeleteAllCreatedServers(); + } + +} diff --git a/apis/nova/src/test/resources/keys/rhelimpg.pub b/apis/nova/src/test/resources/keys/rhelimg.pub similarity index 100% rename from apis/nova/src/test/resources/keys/rhelimpg.pub rename to apis/nova/src/test/resources/keys/rhelimg.pub diff --git a/apis/nova/src/test/resources/logback.xml b/apis/nova/src/test/resources/logback.xml index 5c9c501b0c..b64d307f25 100644 --- a/apis/nova/src/test/resources/logback.xml +++ b/apis/nova/src/test/resources/logback.xml @@ -12,4 +12,7 @@ + + + \ No newline at end of file diff --git a/apis/nova/src/test/resources/test_get_server_detail_no_addresses.json b/apis/nova/src/test/resources/test_get_server_detail_no_addresses.json new file mode 100644 index 0000000000..7fdab771b1 --- /dev/null +++ b/apis/nova/src/test/resources/test_get_server_detail_no_addresses.json @@ -0,0 +1,20 @@ +{ + "server" : { + "status":"BUILD", + "hostId":"", + "addresses": { + "public":[], + "private":[] + }, + "imageRef":"http://dragon004.hw.griddynamics.net:8774/v1.1/images/106", + "adminPass":"MHfyHXPoj88on737", + "flavorRef":"http://dragon004.hw.griddynamics.net:8774/v1.1/flavors/2", + "links" : [ + {"href":"http://dragon004.hw.griddynamics.net:8774/v1.1/servers/847","rel":"self"}, + {"href":"http://dragon004.hw.griddynamics.net:8774/v1.1/servers/847","type":"application/json","rel":"bookmark"}, + {"href":"http://dragon004.hw.griddynamics.net:8774/v1.1/servers/847","type":"application/xml","rel":"bookmark"}], + "name" : "cmsNode-fa2", + "id":847, + "metadata" : {} + } +} \ No newline at end of file diff --git a/apis/pom.xml b/apis/pom.xml index d69cc78bac..42ecc2d880 100644 --- a/apis/pom.xml +++ b/apis/pom.xml @@ -39,7 +39,6 @@ ec2 deltacloud walrus - scality-rs2 eucalyptus swift cloudfiles diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/Storage.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/Storage.java old mode 100755 new mode 100644 diff --git a/apis/swift/src/test/resources/log4j.xml b/apis/swift/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressLoginAsyncClient.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressLoginAsyncClient.java old mode 100755 new mode 100644 diff --git a/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java old mode 100755 new mode 100644 diff --git a/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java b/blobstore/src/main/java/org/jclouds/blobstore/InputStreamMap.java old mode 100755 new mode 100644 diff --git a/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java b/blobstore/src/main/java/org/jclouds/blobstore/ListableMap.java old mode 100755 new mode 100644 diff --git a/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java old mode 100755 new mode 100644 diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/BlobName.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/BlobName.java old mode 100755 new mode 100644 diff --git a/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java b/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java old mode 100755 new mode 100644 index 69c0f743d0..160881a2f9 --- a/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/functions/ParseSystemAndUserMetadataFromHeaders.java @@ -94,8 +94,7 @@ public class ParseSystemAndUserMetadataFromHeaders implements Function { - static final Pattern pattern = Pattern.compile("(vcloud-token=)?([^;]+)(;.*)?"); + static final Pattern pattern = Pattern.compile("(vcloud-token)=?([^;]+)(;.*)?"); private final ParseSax.Factory factory; private final Provider orgHandlerProvider; @@ -61,38 +63,45 @@ public class ParseLoginResponseFromHeaders implements Function org = factory.create(orgHandlerProvider.get()).parse( + final String token = parseTokenFromHeaders(from); + final Map org = factory.create(orgHandlerProvider.get()).parse( from.getPayload().getInput()); - return new VCloudSession() { - @VCloudToken - public String getVCloudToken() { - return matcher.group(2); - } + return new VCloudSession() { + @VCloudToken + public String getVCloudToken() { + return token; + } - @Org - public Map getOrgs() { - return org; - } - }; - - } + @Org + public Map getOrgs() { + return org; + } + }; } finally { releasePayload(from); } - throw new HttpResponseException("x-vcloud-authorization not found ", null, from); + } + + public String parseTokenFromHeaders(HttpResponse from) { + String cookieHeader = from.getFirstHeaderOrNull("x-vcloud-authorization"); + if (cookieHeader != null) { + Matcher matcher = pattern.matcher(cookieHeader); + return matcher.find() ? matcher.group(2) : cookieHeader; + } else { + try { + cookieHeader = Iterables.find(from.getHeaders().get(HttpHeaders.SET_COOKIE), Predicates.contains(pattern)); + Matcher matcher = pattern.matcher(cookieHeader); + matcher.find(); + return matcher.group(2); + } catch (NoSuchElementException e) { + throw new HttpResponseException(String.format("Header %s or %s must be present", "x-vcloud-authorization", + HttpHeaders.SET_COOKIE), null, from); + } + } } } diff --git a/common/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java b/common/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java old mode 100755 new mode 100644 diff --git a/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java old mode 100755 new mode 100644 diff --git a/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java old mode 100755 new mode 100644 diff --git a/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java index d4945d37f0..fdfeadc1ea 100644 --- a/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java @@ -23,6 +23,7 @@ import static org.testng.Assert.assertEquals; import java.net.URI; import org.jclouds.http.HttpResponse; +import org.jclouds.http.HttpResponseException; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.io.Payloads; import org.jclouds.vcloud.VCloudMediaType; @@ -54,60 +55,98 @@ public class ParseLoginResponseFromHeadersTest extends BaseHandlerTest { @Test public void testApply() { HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() - .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", - "vcloud-token=9er4d061-4bff-48fa-84b1-5da7166764d2; path=/")); + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", + "vcloud-token=9er4d061-4bff-48fa-84b1-5da7166764d2; path=/")); response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); response.getPayload().getContentMetadata().setContentLength(307l); VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "9er4d061-4bff-48fa-84b1-5da7166764d2"); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } @Test public void testApplyBlueLock() { HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() - .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", - "MUKOJ2HoAfoMmLnHRp4esNb2MtWscCLLhVysnsIsCG0=")); + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", + "MUKOJ2HoAfoMmLnHRp4esNb2MtWscCLLhVysnsIsCG0=")); response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); response.getPayload().getContentMetadata().setContentLength(307l); VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "MUKOJ2HoAfoMmLnHRp4esNb2MtWscCLLhVysnsIsCG0="); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } @Test public void testApplyTerremark() { HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() - .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("Set-Cookie", - "vcloud-token=37ce2715-9aba-4f48-8e45-2db8a8da702d; path=/")); + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("Set-Cookie", + "vcloud-token=37ce2715-9aba-4f48-8e45-2db8a8da702d; path=/")); response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); response.getPayload().getContentMetadata().setContentLength(307l); VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "37ce2715-9aba-4f48-8e45-2db8a8da702d"); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } + @Test + public void testApplyTerremarkMultipleCookies() { + HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. builder().put("Set-Cookie", + "NSC_ESUO_21654_72.46.239.132_443=fooo;expires=Thu, 02-Jun-2011 17:19:26 GMT;path=/;secure;httponly") + .put("Set-Cookie", "vcloud-token=37ce2715-9aba-4f48-8e45-2db8a8da702d; path=/").build()); + response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); + response.getPayload().getContentMetadata().setContentLength(307l); + + VCloudSession reply = parser.apply(response); + assertEquals(reply.getVCloudToken(), "37ce2715-9aba-4f48-8e45-2db8a8da702d"); + assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + + } + + @Test(expectedExceptions = HttpResponseException.class) + public void testUnmatchedCookieThrowsHttpResponseException() { + HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. builder().put("Set-Cookie", + "NSC_ESUO_21654_72.46.239.132_443=fooo;expires=Thu, 02-Jun-2011 17:19:26 GMT;path=/;secure;httponly") + .build()); + response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); + response.getPayload().getContentMetadata().setContentLength(307l); + + parser.apply(response); + } + + @Test(expectedExceptions = HttpResponseException.class) + public void testNoThrowsHttpResponseException() { + HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of()); + response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); + response.getPayload().getContentMetadata().setContentLength(307l); + + parser.apply(response); + } + @Test public void testApplyVirtacore() { HttpResponse response = new HttpResponse(200, "OK", Payloads.newInputStreamPayload(getClass() - .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", - "vcloud-token=IPy0w7UGD4lwtdWAK/ZVzfuLK+dztxGRqsOhWqV0i48=")); + .getResourceAsStream("/orglist.xml")), ImmutableMultimap. of("x-vcloud-authorization", + "vcloud-token=IPy0w7UGD4lwtdWAK/ZVzfuLK+dztxGRqsOhWqV0i48=")); response.getPayload().getContentMetadata().setContentType("Content-Type: application/xml; charset=utf-8"); response.getPayload().getContentMetadata().setContentLength(307l); VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "IPy0w7UGD4lwtdWAK/ZVzfuLK+dztxGRqsOhWqV0i48="); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } } diff --git a/common/vcloud/src/test/resources/log4j.xml b/common/vcloud/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/compute/src/main/clojure/org/jclouds/predicate.clj b/compute/src/main/clojure/org/jclouds/predicate.clj index 1a35f88ae4..ae295e5618 100644 --- a/compute/src/main/clojure/org/jclouds/predicate.clj +++ b/compute/src/main/clojure/org/jclouds/predicate.clj @@ -18,11 +18,12 @@ ; (ns org.jclouds.predicate) -(defprotocol Predicate - "Protocol for making a com.google.common.base.Predicate." +(defprotocol Coercions + "Protocol for coercing between predicate-like things, like + Clojure fns and com.google.common.base.Predicate." (to-predicate [p])) -(extend-protocol Predicate +(extend-protocol Coercions clojure.lang.IFn (to-predicate [p] (reify com.google.common.base.Predicate diff --git a/compute/src/main/java/org/jclouds/compute/ComputeService.java b/compute/src/main/java/org/jclouds/compute/ComputeService.java old mode 100755 new mode 100644 diff --git a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java index c03791bbd0..4c9c44949a 100644 --- a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java +++ b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java @@ -416,6 +416,7 @@ public class TemplateBuilderImpl implements TemplateBuilder { */ @Override public TemplateBuilder fromTemplate(Template template) { + location = template.getLocation(); fromHardware(template.getHardware()); fromImage(template.getImage()); options(template.getOptions()); diff --git a/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java b/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java old mode 100755 new mode 100644 diff --git a/compute/src/main/java/org/jclouds/compute/strategy/ListNodesStrategy.java b/compute/src/main/java/org/jclouds/compute/strategy/ListNodesStrategy.java old mode 100755 new mode 100644 diff --git a/compute/src/main/java/org/jclouds/compute/strategy/impl/CreateNodesWithGroupEncodedIntoNameThenAddToSet.java b/compute/src/main/java/org/jclouds/compute/strategy/impl/CreateNodesWithGroupEncodedIntoNameThenAddToSet.java old mode 100755 new mode 100644 diff --git a/compute/src/main/java/org/jclouds/ssh/ConfiguresSshClient.java b/compute/src/main/java/org/jclouds/ssh/ConfiguresSshClient.java old mode 100755 new mode 100644 diff --git a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java old mode 100755 new mode 100644 diff --git a/compute/src/test/java/org/jclouds/compute/BaseTemplateBuilderLiveTest.java b/compute/src/test/java/org/jclouds/compute/BaseTemplateBuilderLiveTest.java index cc30beefcd..75d9800e4e 100644 --- a/compute/src/test/java/org/jclouds/compute/BaseTemplateBuilderLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/BaseTemplateBuilderLiveTest.java @@ -33,6 +33,7 @@ import java.util.concurrent.TimeoutException; import org.jclouds.Constants; import org.jclouds.compute.config.BaseComputeServiceContextModule; +import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.OsFamilyVersion64Bit; import org.jclouds.compute.domain.Template; @@ -77,6 +78,35 @@ public abstract class BaseTemplateBuilderLiveTest { apiversion = System.getProperty("test." + provider + ".apiversion"); } + public void testCompareSizes() throws Exception { + Hardware defaultSize = context.getComputeService().templateBuilder().build().getHardware(); + + Hardware smallest = context.getComputeService().templateBuilder().smallest().build().getHardware(); + Hardware fastest = context.getComputeService().templateBuilder().fastest().build().getHardware(); + Hardware biggest = context.getComputeService().templateBuilder().biggest().build().getHardware(); + + System.out.printf("smallest %s%n", smallest); + System.out.printf("fastest %s%n", fastest); + System.out.printf("biggest %s%n", biggest); + + assertEquals(defaultSize, smallest); + + assert getCores(smallest) <= getCores(fastest) : String.format("%s ! <= %s", smallest, fastest); + assert getCores(biggest) <= getCores(fastest) : String.format("%s ! <= %s", biggest, fastest); + + assert biggest.getRam() >= fastest.getRam() : String.format("%s ! >= %s", biggest, fastest); + assert biggest.getRam() >= smallest.getRam() : String.format("%s ! >= %s", biggest, smallest); + + assert getCores(fastest) >= getCores(biggest) : String.format("%s ! >= %s", fastest, biggest); + assert getCores(fastest) >= getCores(smallest) : String.format("%s ! >= %s", fastest, smallest); + } + + public void testFromTemplate() { + Template defaultTemplate = context.getComputeService().templateBuilder().build(); + assertEquals(context.getComputeService().templateBuilder().fromTemplate(defaultTemplate).build().toString(), + defaultTemplate.toString()); + } + protected Properties setupProperties() { Properties overrides = new Properties(); overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true"); diff --git a/compute/src/test/java/org/jclouds/compute/options/TemplateOptionsTest.java b/compute/src/test/java/org/jclouds/compute/options/TemplateOptionsTest.java old mode 100755 new mode 100644 diff --git a/compute/src/test/java/org/jclouds/compute/predicates/OperatingSystemPredicatesTest.java b/compute/src/test/java/org/jclouds/compute/predicates/OperatingSystemPredicatesTest.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/PropertiesBuilder.java b/core/src/main/java/org/jclouds/PropertiesBuilder.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/collect/Memoized.java b/core/src/main/java/org/jclouds/collect/Memoized.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/concurrent/ExceptionParsingListenableFuture.java b/core/src/main/java/org/jclouds/concurrent/ExceptionParsingListenableFuture.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/concurrent/SingleThreaded.java b/core/src/main/java/org/jclouds/concurrent/SingleThreaded.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/date/DateService.java b/core/src/main/java/org/jclouds/date/DateService.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java b/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java b/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/http/functions/config/SaxParserModule.java b/core/src/main/java/org/jclouds/http/functions/config/SaxParserModule.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/Binder.java b/core/src/main/java/org/jclouds/rest/Binder.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/ConfiguresRestClient.java b/core/src/main/java/org/jclouds/rest/ConfiguresRestClient.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/RestContext.java b/core/src/main/java/org/jclouds/rest/RestContext.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/RestContextBuilder.java b/core/src/main/java/org/jclouds/rest/RestContextBuilder.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/BinderParam.java b/core/src/main/java/org/jclouds/rest/annotations/BinderParam.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/ExceptionParser.java b/core/src/main/java/org/jclouds/rest/annotations/ExceptionParser.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/Headers.java b/core/src/main/java/org/jclouds/rest/annotations/Headers.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/ParamParser.java b/core/src/main/java/org/jclouds/rest/annotations/ParamParser.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/QueryParams.java b/core/src/main/java/org/jclouds/rest/annotations/QueryParams.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/RequestFilters.java b/core/src/main/java/org/jclouds/rest/annotations/RequestFilters.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/ResponseParser.java b/core/src/main/java/org/jclouds/rest/annotations/ResponseParser.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/SkipEncoding.java b/core/src/main/java/org/jclouds/rest/annotations/SkipEncoding.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/VirtualHost.java b/core/src/main/java/org/jclouds/rest/annotations/VirtualHost.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/annotations/XMLResponseParser.java b/core/src/main/java/org/jclouds/rest/annotations/XMLResponseParser.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/binders/BindToStringPayload.java b/core/src/main/java/org/jclouds/rest/binders/BindToStringPayload.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/config/RestModule.java b/core/src/main/java/org/jclouds/rest/config/RestModule.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java b/core/src/main/java/org/jclouds/rest/internal/AsyncRestClientProxy.java old mode 100755 new mode 100644 diff --git a/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java b/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java b/core/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/date/DateServiceTest.java b/core/src/test/java/org/jclouds/date/DateServiceTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/http/HttpPropertiesBuilderTest.java b/core/src/test/java/org/jclouds/http/HttpPropertiesBuilderTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java b/core/src/test/java/org/jclouds/http/filters/BasicAuthenticationTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/rest/CredentialStoreModuleTest.java b/core/src/test/java/org/jclouds/rest/CredentialStoreModuleTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/rest/RestContextBuilderTest.java b/core/src/test/java/org/jclouds/rest/RestContextBuilderTest.java old mode 100755 new mode 100644 diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java old mode 100755 new mode 100644 diff --git a/demos/getpath/README.txt b/demos/getpath/README.txt old mode 100755 new mode 100644 diff --git a/demos/getpath/src/main/java/org/jclouds/blobstore/GetPath.java b/demos/getpath/src/main/java/org/jclouds/blobstore/GetPath.java old mode 100755 new mode 100644 diff --git a/demos/getpath/src/test/java/org/jclouds/blobstore/GetPathLiveTest.java b/demos/getpath/src/test/java/org/jclouds/blobstore/GetPathLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/getpath/src/test/resources/log4j.xml b/demos/getpath/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/demos/googleappengine/README.md b/demos/googleappengine/README.md old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/appengine/appengine-web.xml b/demos/googleappengine/src/main/appengine/appengine-web.xml old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp b/demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/webapp/WEB-INF/web.xml b/demos/googleappengine/src/main/webapp/WEB-INF/web.xml old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/main/webapp/index.jsp b/demos/googleappengine/src/main/webapp/index.jsp old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java b/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java b/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/java/org/jclouds/aws/s3/AmazonPerformanceLiveTest.java b/demos/perftest/src/test/java/org/jclouds/aws/s3/AmazonPerformanceLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java b/demos/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java b/demos/perftest/src/test/java/org/jclouds/aws/s3/JCloudsGaePerformanceLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java b/demos/perftest/src/test/java/org/jclouds/aws/s3/JCloudsPerformanceLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/java/org/jclouds/aws/s3/Jets3tPerformanceLiveTest.java b/demos/perftest/src/test/java/org/jclouds/aws/s3/Jets3tPerformanceLiveTest.java old mode 100755 new mode 100644 diff --git a/demos/perftest/src/test/resources/log4j.xml b/demos/perftest/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/demos/speedtest-azurequeue/README.txt b/demos/speedtest-azurequeue/README.txt old mode 100755 new mode 100644 diff --git a/demos/speedtest-azurequeue/src/main/java/org/jclouds/azure/azurequeue/SpeedTest.java b/demos/speedtest-azurequeue/src/main/java/org/jclouds/azure/azurequeue/SpeedTest.java old mode 100755 new mode 100644 diff --git a/demos/speedtest-sqs/README.txt b/demos/speedtest-sqs/README.txt old mode 100755 new mode 100644 diff --git a/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java b/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java old mode 100755 new mode 100644 diff --git a/demos/tweetstore/gae-tweetstore-spring/pom.xml b/demos/tweetstore/gae-tweetstore-spring/pom.xml index 229e937bcc..7098814889 100644 --- a/demos/tweetstore/gae-tweetstore-spring/pom.xml +++ b/demos/tweetstore/gae-tweetstore-spring/pom.xml @@ -209,6 +209,10 @@ deploy + + + gae-tweetstore-spring + diff --git a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java index 5b458d32e0..b836b4cfd6 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.config; import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -90,11 +94,14 @@ public class SpringServletConfig extends LoggingConfig implements ServletConfigA // shared across all blobstores and used to retrieve tweets try { twitter4j.conf.Configuration twitterConf = new ConfigurationBuilder() - .setUser(props.getProperty("twitter.identity")) - .setPassword(props.getProperty("twitter.credential")).build(); - twitterClient = new TwitterFactory(twitterConf).getInstance(); + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .build(); + twitterClient = new TwitterFactory(twitterConf).getInstance(); } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e); + throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e); } // common namespace for storing tweets container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER), PROPERTY_TWEETSTORE_CONTAINER); diff --git a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java new file mode 100644 index 0000000000..0075a27976 --- /dev/null +++ b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.demo.tweetstore.reference; + +/** + * Configuration properties and constants used in Twitter connections. + * + * @author Andrew Phillips + */ +public interface TwitterConstants { + static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; + static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; + static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; + static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; +} diff --git a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index 3565071db8..be8f4de60e 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -100,10 +104,10 @@ public class TweetStoreLiveTest { } Configuration conf = new ConfigurationBuilder() - .setOAuthConsumerKey(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)) - .setOAuthConsumerSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)) - .setOAuthAccessToken(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)) - .setOAuthAccessTokenSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) .build(); Twitter client = new TwitterFactory(conf).getInstance(); StoreTweetsController controller = new StoreTweetsController(contexts, container, client); @@ -144,14 +148,14 @@ public class TweetStoreLiveTest { } private void addConfigurationForTwitter(Properties props) { - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_KEY, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_KEY)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_SECRET)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); } private void addCredentialsForBlobStores(Properties props) { @@ -220,11 +224,4 @@ public class TweetStoreLiveTest { String string = Strings2.toStringAndClose(i); assert string.indexOf("Tweets in Clouds") >= 0 : string; } - - private static interface TwitterConstants { - static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; - static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; - static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; - static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; - } } diff --git a/demos/tweetstore/gae-tweetstore/pom.xml b/demos/tweetstore/gae-tweetstore/pom.xml index 77042cfd5a..142189e77b 100644 --- a/demos/tweetstore/gae-tweetstore/pom.xml +++ b/demos/tweetstore/gae-tweetstore/pom.xml @@ -195,6 +195,10 @@ deploy + + + gae-tweetstore + diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java index 6dae4161ea..97240fd280 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.config; import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -79,12 +83,15 @@ public class GuiceServletConfig extends GuiceServletContextListener { Set modules = ImmutableSet. of(googleModule); // shared across all blobstores and used to retrieve tweets try { - Configuration twitterConf = new ConfigurationBuilder() - .setUser(props.getProperty("twitter.identity")) - .setPassword(props.getProperty("twitter.credential")).build(); - twitterClient = new TwitterFactory(twitterConf).getInstance(); + Configuration twitterConf = new ConfigurationBuilder() + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .build(); + twitterClient = new TwitterFactory(twitterConf).getInstance(); } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e); + throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e); } // common namespace for storing tweets container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER), PROPERTY_TWEETSTORE_CONTAINER); diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java new file mode 100644 index 0000000000..0075a27976 --- /dev/null +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.demo.tweetstore.reference; + +/** + * Configuration properties and constants used in Twitter connections. + * + * @author Andrew Phillips + */ +public interface TwitterConstants { + static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; + static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; + static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; + static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; +} diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index a2d982a7ae..1ab9aa3a0b 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -99,10 +103,10 @@ public class TweetStoreLiveTest { } Configuration conf = new ConfigurationBuilder() - .setOAuthConsumerKey(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)) - .setOAuthConsumerSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)) - .setOAuthAccessToken(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)) - .setOAuthAccessTokenSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) .build(); Twitter client = new TwitterFactory(conf).getInstance(); StoreTweetsController controller = new StoreTweetsController(contexts, container, client); @@ -148,14 +152,14 @@ public class TweetStoreLiveTest { } private void addConfigurationForTwitter(Properties props) { - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_KEY, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_KEY)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_SECRET)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); } private void addCredentialsForBlobStores(Properties props) { @@ -225,11 +229,4 @@ public class TweetStoreLiveTest { String string = Strings2.toStringAndClose(i); assert string.indexOf("Tweets in Clouds") >= 0 : string; } - - private static interface TwitterConstants { - static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; - static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; - static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; - static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; - } } diff --git a/demos/tweetstore/pom.xml b/demos/tweetstore/pom.xml index 404c2441a6..2b9bb2dda9 100644 --- a/demos/tweetstore/pom.xml +++ b/demos/tweetstore/pom.xml @@ -168,7 +168,8 @@ - org.jclouds:jclouds-properties:${project.version} + + ${project.groupId}:jclouds-demos-tweetstore-jclouds-properties:${project.version}.${tweetstore.instance} diff --git a/demos/tweetstore/runatcloud-tweetstore/pom.xml b/demos/tweetstore/runatcloud-tweetstore/pom.xml index 913462f58e..0a2031c9dc 100644 --- a/demos/tweetstore/runatcloud-tweetstore/pom.xml +++ b/demos/tweetstore/runatcloud-tweetstore/pom.xml @@ -190,6 +190,10 @@ deploy + + + runatcloud-tweetstore + bees-plugins-snapshots diff --git a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java index 3af47b0c2f..93c9972ad6 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.config; import static com.google.common.base.Preconditions.checkNotNull; import static java.util.concurrent.TimeUnit.MINUTES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -81,12 +85,14 @@ public class GuiceServletConfig extends GuiceServletContextListener { // shared across all blobstores and used to retrieve tweets try { Configuration twitterConf = new ConfigurationBuilder() - .setUser(props.getProperty("twitter.identity")) - .setPassword(props.getProperty("twitter.credential")).build(); + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .build(); twitterClient = new TwitterFactory(twitterConf).getInstance(); } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("properties for twitter not configured properly in " - + props.toString(), e); + throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e); } // common namespace for storing tweets container = checkNotNull(props.getProperty(PROPERTY_TWEETSTORE_CONTAINER), PROPERTY_TWEETSTORE_CONTAINER); diff --git a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java new file mode 100644 index 0000000000..0075a27976 --- /dev/null +++ b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TwitterConstants.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.demo.tweetstore.reference; + +/** + * Configuration properties and constants used in Twitter connections. + * + * @author Andrew Phillips + */ +public interface TwitterConstants { + static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; + static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; + static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; + static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; +} diff --git a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index f0a837be91..929537c037 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -21,6 +21,10 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY; +import static org.jclouds.demo.tweetstore.reference.TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET; import java.io.IOException; import java.io.InputStream; @@ -100,10 +104,10 @@ public class TweetStoreLiveTest { } Configuration conf = new ConfigurationBuilder() - .setOAuthConsumerKey(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)) - .setOAuthConsumerSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)) - .setOAuthAccessToken(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)) - .setOAuthAccessTokenSecret(props.getProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) + .setOAuthConsumerKey(props.getProperty(PROPERTY_TWITTER_CONSUMER_KEY)) + .setOAuthConsumerSecret(props.getProperty(PROPERTY_TWITTER_CONSUMER_SECRET)) + .setOAuthAccessToken(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN)) + .setOAuthAccessTokenSecret(props.getProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET)) .build(); Twitter client = new TwitterFactory(conf).getInstance(); StoreTweetsController controller = new StoreTweetsController(contexts, container, client); @@ -149,14 +153,14 @@ public class TweetStoreLiveTest { } private void addConfigurationForTwitter(Properties props) { - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_KEY)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_CONSUMER_SECRET)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN)); - props.setProperty(TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET, - getRequiredSystemProperty("test." + TwitterConstants.PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_KEY, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_KEY)); + props.setProperty(PROPERTY_TWITTER_CONSUMER_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_CONSUMER_SECRET)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN)); + props.setProperty(PROPERTY_TWITTER_ACCESSTOKEN_SECRET, + getRequiredSystemProperty("test." + PROPERTY_TWITTER_ACCESSTOKEN_SECRET)); } private void addCredentialsForBlobStores(Properties props) { @@ -228,11 +232,4 @@ public class TweetStoreLiveTest { String string = Strings2.toStringAndClose(i); assert string.indexOf("Tweets in Clouds") >= 0 : string; } - - private static interface TwitterConstants { - static final String PROPERTY_TWITTER_CONSUMER_KEY = "twitter.consumer.identity"; - static final String PROPERTY_TWITTER_CONSUMER_SECRET = "twitter.consumer.credential"; - static final String PROPERTY_TWITTER_ACCESSTOKEN = "twitter.access.identity"; - static final String PROPERTY_TWITTER_ACCESSTOKEN_SECRET = "twitter.access.credential"; - } } diff --git a/drivers/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleCryptoModule.java b/drivers/bouncycastle/src/main/java/org/jclouds/encryption/bouncycastle/config/BouncyCastleCryptoModule.java old mode 100755 new mode 100644 diff --git a/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java b/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java old mode 100755 new mode 100644 diff --git a/drivers/joda/src/main/java/org/jclouds/date/joda/JodaDateService.java b/drivers/joda/src/main/java/org/jclouds/date/joda/JodaDateService.java old mode 100755 new mode 100644 diff --git a/drivers/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java b/drivers/joda/src/main/java/org/jclouds/date/joda/config/JodaDateServiceModule.java old mode 100755 new mode 100644 diff --git a/drivers/joda/src/test/java/org/jclouds/date/joda/JodaDateServiceTest.java b/drivers/joda/src/test/java/org/jclouds/date/joda/JodaDateServiceTest.java old mode 100755 new mode 100644 diff --git a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java old mode 100755 new mode 100644 diff --git a/drivers/log4j/src/test/resources/log4j.xml b/drivers/log4j/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java index c51c9897da..e16ff71084 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java @@ -24,7 +24,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large; -import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small32; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; @@ -82,7 +82,7 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier { sizes.add(cc1_4xlarge().location(location).supportsImageIds(ccAmi).build()); } sizes.addAll(ImmutableSet. of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large() - .build(), m1_small().build(), m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(), + .build(), m1_small32().build(), m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(), m2_4xlarge().build())); return sizes.build(); } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java index ed15d0962a..57126d25fe 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java @@ -84,7 +84,7 @@ public class AWSEC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { .osVersionMatches("1[10].[10][04]").imageDescriptionMatches("ubuntu-images").osFamily(OsFamily.UBUNTU).build(); assert (template.getImage().getProviderId().startsWith("ami-")) : template; - assertEquals(template.getImage().getOperatingSystem().getVersion(), "10.10"); + assertEquals(template.getImage().getOperatingSystem().getVersion(), "11.04"); assertEquals(template.getImage().getOperatingSystem().is64Bit(), false); assertEquals(template.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "instance-store"); diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java index f61a77b8ef..b5388a6c71 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java @@ -73,7 +73,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT // setup constants String region = Region.AP_SOUTHEAST_1; String group = "group"; - Hardware size = EC2HardwareBuilder.m1_small().build(); + Hardware size = EC2HardwareBuilder.m1_small32().build(); String systemGeneratedKeyPairName = "systemGeneratedKeyPair"; String generatedGroup = "group"; Set generatedGroups = ImmutableSet.of(generatedGroup); @@ -262,7 +262,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT // setup constants String region = Region.AP_SOUTHEAST_1; String group = "group"; - Hardware size = EC2HardwareBuilder.m1_small().build(); + Hardware size = EC2HardwareBuilder.m1_small32().build(); String systemGeneratedKeyPairName = "systemGeneratedKeyPair"; // create mocks @@ -320,7 +320,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT // setup constants String region = Region.AP_SOUTHEAST_1; String group = "group"; - Hardware size = EC2HardwareBuilder.m1_small().build(); + Hardware size = EC2HardwareBuilder.m1_small32().build(); String systemGeneratedKeyPairName = "systemGeneratedKeyPair"; String generatedGroup = "group"; Set generatedGroups = ImmutableSet.of(generatedGroup); diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java index a62c0e7aa5..975b258dc9 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java @@ -27,7 +27,7 @@ import org.jclouds.providers.BaseProviderMetadata; import org.jclouds.providers.ProviderMetadata; /** - * Implementation of @ link org.jclouds.types.ProviderMetadata} for Amazon's Simple Storage Service + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Amazon's Simple Storage Service * (S3) provider. * * @author Adrian Cole diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ProviderTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ProviderTest.java index 397c4ba7bf..cf959d187c 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ProviderTest.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ProviderTest.java @@ -23,7 +23,7 @@ import org.jclouds.providers.ProviderMetadata; import org.testng.annotations.Test; /** - * The AWSS3ProviderTest tests the org.jclouds.providers.AWSS3Provider class. + * The AWSS3ProviderTest tests the {@link org.jclouds.aws.s3.AWSS3ProviderMetadata} class. * * @author Adrian Cole */ @@ -33,4 +33,5 @@ public class AWSS3ProviderTest extends BaseProviderMetadataTest { public AWSS3ProviderTest() { super(new AWSS3ProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); } + } \ No newline at end of file diff --git a/providers/azureblob/src/test/resources/log4j.xml b/providers/azureblob/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java b/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java index 5c0300b989..6f0c3102f5 100644 --- a/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java +++ b/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java @@ -62,7 +62,7 @@ public class CloudOneStorageProviderMetadata extends BaseProviderMetadata { */ @Override public String getIdentityName() { - return "Subtenant ID"; + return "Subtenant ID (UID)"; } /** diff --git a/providers/elastichosts-lon-b/src/main/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderMetadata.java b/providers/elastichosts-lon-b/src/main/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderMetadata.java new file mode 100644 index 0000000000..f267c3ed6a --- /dev/null +++ b/providers/elastichosts-lon-b/src/main/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.elastichosts; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for ElasticHosts London BlueSquare. + * + * @author Adrian Cole + */ +public class ElasticHostsBlueSquareLondonProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "elastichosts-lon-b"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "ElasticHosts London BlueSquare"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("https://lon-b.elastichosts.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://lon-b.elastichosts.com/accounts"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.elastichosts.com/cloud-hosting/api"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("elastichosts-lon-b"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("GB-LND"); + } + +} diff --git a/providers/elastichosts-lon-b/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/elastichosts-lon-b/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..b7305b8ff6 --- /dev/null +++ b/providers/elastichosts-lon-b/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.elastichosts.ElasticHostsBlueSquareLondonProviderMetadata diff --git a/providers/elastichosts-lon-b/src/main/resources/elastichosts-lon-b/preinstalled_images.json b/providers/elastichosts-lon-b/src/main/resources/elastichosts-lon-b/preinstalled_images.json index dadd7b7441..41b2f33605 100644 --- a/providers/elastichosts-lon-b/src/main/resources/elastichosts-lon-b/preinstalled_images.json +++ b/providers/elastichosts-lon-b/src/main/resources/elastichosts-lon-b/preinstalled_images.json @@ -13,6 +13,13 @@ "osVersion": "5.0", "size": "1" }, + { + "uuid": "6aa953cc-3395-4e8d-938e-65c74fd20334", + "description": "Debian Linux 6.0.1", + "osFamily": "DEBIAN", + "osVersion": "6.0", + "size": "1" + }, { "uuid": "aee5589a-88c3-43ef-bb0a-9cab6e64192d", "description": "Ubuntu Linux 10.04", diff --git a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderTest.java b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderTest.java new file mode 100644 index 0000000000..e8d1d22809 --- /dev/null +++ b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/ElasticHostsBlueSquareLondonProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.elastichosts; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "ElasticHostsBlueSquareLondonProviderTest") +public class ElasticHostsBlueSquareLondonProviderTest extends BaseProviderMetadataTest { + + public ElasticHostsBlueSquareLondonProviderTest() { + super(new ElasticHostsBlueSquareLondonProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} diff --git a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonComputeServiceLiveTest.java b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonComputeServiceLiveTest.java index 16870c87c3..a679bc4a23 100644 --- a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonComputeServiceLiveTest.java +++ b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonComputeServiceLiveTest.java @@ -25,7 +25,7 @@ import org.testng.annotations.Test; * * @author Adrian Cole */ -@Test(groups = "live", sequential = true, testName = "ElasticHostsBlueSquareLondonComputeServiceLiveTest") +@Test(groups = "live", singleThreaded = true, testName = "ElasticHostsBlueSquareLondonComputeServiceLiveTest") public class ElasticHostsBlueSquareLondonComputeServiceLiveTest extends ElasticStackComputeServiceLiveTest { public ElasticHostsBlueSquareLondonComputeServiceLiveTest() { diff --git a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java index 1949cdb152..a727e53fe4 100644 --- a/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java +++ b/providers/elastichosts-lon-b/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsBlueSquareLondonTemplateBuilderLiveTest.java @@ -54,7 +54,7 @@ public class ElasticHostsBlueSquareLondonTemplateBuilderLiveTest extends BaseTem case UBUNTU: return (input.version.equals("") || input.version.equals("10.04")) && input.is64Bit; case DEBIAN: - return (input.version.equals("") || input.version.equals("5.0")) && input.is64Bit; + return (input.version.equals("") || input.version.matches("[56].0")) && input.is64Bit; case CENTOS: return (input.version.equals("") || input.version.equals("5.5")) && input.is64Bit; case WINDOWS: diff --git a/providers/elastichosts-lon-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderMetadata.java b/providers/elastichosts-lon-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderMetadata.java index ea5259c8ac..2eac34e8d6 100644 --- a/providers/elastichosts-lon-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderMetadata.java +++ b/providers/elastichosts-lon-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderMetadata.java @@ -70,7 +70,7 @@ public class ElasticHostsPeer1LondonProviderMetadata extends BaseProviderMetadat */ @Override public String getCredentialName() { - return "Secret API key"; + return "Secret API Key"; } /** @@ -112,4 +112,4 @@ public class ElasticHostsPeer1LondonProviderMetadata extends BaseProviderMetadat return ImmutableSet.of("GB-LND"); } -} \ No newline at end of file +} diff --git a/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderTest.java b/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderTest.java index fc3286b069..66e3626882 100644 --- a/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderTest.java +++ b/providers/elastichosts-lon-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1LondonProviderTest.java @@ -32,4 +32,4 @@ public class ElasticHostsPeer1LondonProviderTest extends BaseProviderMetadataTes public ElasticHostsPeer1LondonProviderTest() { super(new ElasticHostsPeer1LondonProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); } -} \ No newline at end of file +} diff --git a/providers/elastichosts-sat-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderMetadata.java b/providers/elastichosts-sat-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderMetadata.java new file mode 100644 index 0000000000..fab703473e --- /dev/null +++ b/providers/elastichosts-sat-p/src/main/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.elastichosts; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for ElasticHosts San Antonio Peer 1. + * + * @author Adrian Cole + */ +public class ElasticHostsPeer1SanAntonioProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "elastichosts-sat-p"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "ElasticHosts San Antonio Peer 1"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("https://sat-p.elastichosts.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://sat-p.elastichosts.com/accounts"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.elastichosts.com/cloud-hosting/api"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("elastichosts-sat-p"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-TX"); + } + +} \ No newline at end of file diff --git a/providers/elastichosts-sat-p/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/elastichosts-sat-p/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..7981420bd9 --- /dev/null +++ b/providers/elastichosts-sat-p/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.elastichosts.ElasticHostsPeer1SanAntonioProviderMetadata diff --git a/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderTest.java b/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderTest.java new file mode 100644 index 0000000000..8c531b88ca --- /dev/null +++ b/providers/elastichosts-sat-p/src/test/java/org/jclouds/elastichosts/ElasticHostsPeer1SanAntonioProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.elastichosts; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "ElasticHostsPeer1SanAntonioProviderTest") +public class ElasticHostsPeer1SanAntonioProviderTest extends BaseProviderMetadataTest { + + public ElasticHostsPeer1SanAntonioProviderTest() { + super(new ElasticHostsPeer1SanAntonioProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} \ No newline at end of file diff --git a/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderMetadata.java b/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderMetadata.java new file mode 100644 index 0000000000..4158bdbac9 --- /dev/null +++ b/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderMetadata.java @@ -0,0 +1,116 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.epc; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; + +/** + * Implementation of {@ link org.jclouds.types.ProviderMetadata} for Eucalpytus' + * Partner Cloud EC2 provider. + * + * @author Jeremy Whitlock + */ +public class EucalyptusPartnerCloudEC2ProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "eucalyptus-partnercloud-ec2"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Eucalyptus Partner Cloud (EC2)"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Password"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.eucalyptus.com/partners"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://partnercloud.eucalyptus.com:8443"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://open.eucalyptus.com/wiki/IntroducingEucalyptus_v2.0"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-CA"); + } + +} diff --git a/providers/eucalyptus-partnercloud-ec2/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/eucalyptus-partnercloud-ec2/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..1afa66de43 --- /dev/null +++ b/providers/eucalyptus-partnercloud-ec2/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.epc.EucalyptusPartnerCloudEC2ProviderMetadata diff --git a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderTest.java b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderTest.java new file mode 100644 index 0000000000..41659cefd9 --- /dev/null +++ b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudEC2ProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.epc; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The EucalyptusPartnerCloudEC2ProviderTest tests the {@link EucalyptusPartnerCloudEC2ProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "EucalyptusPartnerCloudEC2ProviderTest") +public class EucalyptusPartnerCloudEC2ProviderTest extends BaseProviderMetadataTest { + + public EucalyptusPartnerCloudEC2ProviderTest() { + super(new EucalyptusPartnerCloudEC2ProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java index 03193f81d4..bdd38a5d46 100644 --- a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java +++ b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java @@ -24,10 +24,13 @@ import static org.testng.Assert.assertEquals; import java.io.IOException; import java.util.Set; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.BaseTemplateBuilderLiveTest; import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.OsFamilyVersion64Bit; import org.jclouds.compute.domain.Template; +import org.jclouds.domain.LocationScope; +import org.jclouds.ec2.compute.util.EC2ComputeUtils; import org.testng.annotations.Test; import com.google.common.base.Predicate; @@ -68,16 +71,18 @@ public class EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest extends Bas @Test public void testDefaultTemplateBuilder() throws IOException { - Template defaultTemplate = context.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(getCores(defaultTemplate.getHardware()), 2.0d); - + 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 diff --git a/providers/eucalyptus-partnercloud-s3/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderMetadata.java b/providers/eucalyptus-partnercloud-s3/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderMetadata.java new file mode 100644 index 0000000000..38b97d7af1 --- /dev/null +++ b/providers/eucalyptus-partnercloud-s3/src/main/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderMetadata.java @@ -0,0 +1,116 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.epc; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; + +/** + * Implementation of {@ link org.jclouds.types.ProviderMetadata} for Eucalpytus' + * Partner Cloud S3 provider. + * + * @author Jeremy Whitlock + */ +public class EucalyptusPartnerCloudS3ProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "eucalyptus-partnercloud-s3"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Eucalyptus Partner Cloud (S3)"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Password"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.eucalyptus.com/partners"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://partnercloud.eucalyptus.com:8443"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://open.eucalyptus.com/wiki/IntroducingEucalyptus_v2.0"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("eucalyptus-partnercloud-ec2", "eucalyptus-partnercloud-s3"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-CA"); + } + +} diff --git a/providers/eucalyptus-partnercloud-s3/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/eucalyptus-partnercloud-s3/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..55e706a690 --- /dev/null +++ b/providers/eucalyptus-partnercloud-s3/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.epc.EucalyptusPartnerCloudS3ProviderMetadata diff --git a/providers/eucalyptus-partnercloud-s3/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderTest.java b/providers/eucalyptus-partnercloud-s3/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderTest.java new file mode 100644 index 0000000000..027cead9ce --- /dev/null +++ b/providers/eucalyptus-partnercloud-s3/src/test/java/org/jclouds/epc/EucalyptusPartnerCloudS3ProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.epc; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The EucalyptusPartnerCloudS3ProviderTest tests the {@link EucalyptusPartnerCloudS3ProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "EucalyptusPartnerCloudS3ProviderTest") +public class EucalyptusPartnerCloudS3ProviderTest extends BaseProviderMetadataTest { + + public EucalyptusPartnerCloudS3ProviderTest() { + super(new EucalyptusPartnerCloudS3ProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/compute/config/GoGridComputeServiceContextModule.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/compute/config/GoGridComputeServiceContextModule.java old mode 100755 new mode 100644 diff --git a/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java b/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java new file mode 100644 index 0000000000..b165afa4c0 --- /dev/null +++ b/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java @@ -0,0 +1,108 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.ninefold.storage; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Ninefold's + * Storage provider. + * + * @author Jeremy Whitlock + */ +public class NinefoldStorageProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "ninefold-storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Ninefold Storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Subtenant ID (UID)"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Shared Secret"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://ninefold.com/cloud-storage/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://ninefold.com/portal/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("https://ninefold.com/support/display/SPT/API+Documentation"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("AU-NSW"); + } + +} diff --git a/providers/ninefold-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/ninefold-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..f87f414387 --- /dev/null +++ b/providers/ninefold-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.ninefold.storage.NinefoldStorageProviderMetadata diff --git a/providers/ninefold-storage/src/test/java/org/jclouds/ninefold/storage/NinefoldStorageProviderTest.java b/providers/ninefold-storage/src/test/java/org/jclouds/ninefold/storage/NinefoldStorageProviderTest.java new file mode 100644 index 0000000000..e087c0ef19 --- /dev/null +++ b/providers/ninefold-storage/src/test/java/org/jclouds/ninefold/storage/NinefoldStorageProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.ninefold.storage; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The NinefoldStorageProviderTest tests the {@link NinefoldStorageProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "NinefoldStorageProviderTest") +public class NinefoldStorageProviderTest extends BaseProviderMetadataTest { + + public NinefoldStorageProviderTest() { + super(new NinefoldStorageProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/openhosting-east1/src/main/java/org/jclouds/openhosting/OpenHostingEast1ProviderMetadata.java b/providers/openhosting-east1/src/main/java/org/jclouds/openhosting/OpenHostingEast1ProviderMetadata.java new file mode 100644 index 0000000000..e5df64b112 --- /dev/null +++ b/providers/openhosting-east1/src/main/java/org/jclouds/openhosting/OpenHostingEast1ProviderMetadata.java @@ -0,0 +1,108 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.openhosting; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for OpenHosting's + * East1 provider. + * + * @author Jeremy Whitlock + */ +public class OpenHostingEast1ProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "openhosting-east1"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "OpenHosting East1"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "User UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("https://east1.openhosting.com/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://east1.openhosting.com/accounts/login"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.openhosting.com/support/api/"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-VA"); + } + +} diff --git a/providers/openhosting-east1/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/openhosting-east1/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..996483c31e --- /dev/null +++ b/providers/openhosting-east1/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.openhosting.OpenHostingEast1ProviderMetadata diff --git a/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/OpenHostingEast1ProviderTest.java b/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/OpenHostingEast1ProviderTest.java new file mode 100644 index 0000000000..3910128e9c --- /dev/null +++ b/providers/openhosting-east1/src/test/java/org/jclouds/openhosting/OpenHostingEast1ProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.openhosting; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The OpenHostingEast1ProviderTest tests the {@link OpenHostingEast1ProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "OpenHostingEast1ProviderTest") +public class OpenHostingEast1ProviderTest extends BaseProviderMetadataTest { + + public OpenHostingEast1ProviderTest() { + super(new OpenHostingEast1ProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/pom.xml b/providers/pom.xml index 91ba5d6a15..2529f07909 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -39,10 +39,6 @@ azureblob aws-s3 aws-ec2 - googlestorage - scaleup-storage - tiscali-storage - hosteurope-storage synaptic-storage ninefold-storage cloudonestorage @@ -62,6 +58,7 @@ elastichosts-lon-p elastichosts-sat-p elastichosts-lon-b + rimuhosting openhosting-east1 serverlove-z1-man skalicloud-sdg-my diff --git a/sandbox-providers/rimuhosting/README.txt b/providers/rimuhosting/README.txt similarity index 100% rename from sandbox-providers/rimuhosting/README.txt rename to providers/rimuhosting/README.txt diff --git a/sandbox-providers/rimuhosting/pom.xml b/providers/rimuhosting/pom.xml similarity index 100% rename from sandbox-providers/rimuhosting/pom.xml rename to providers/rimuhosting/pom.xml diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClient.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClient.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClient.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClient.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingContextBuilder.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingContextBuilder.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingContextBuilder.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingContextBuilder.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java similarity index 94% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java index e8e9a5c0ac..cdea040357 100644 --- a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java +++ b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingPropertiesBuilder.java @@ -31,6 +31,7 @@ import static org.jclouds.rimuhosting.miro.reference.RimuHostingConstants.PROPER import java.util.Properties; import org.jclouds.PropertiesBuilder; +import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.concurrent.Timeout; /** @@ -55,6 +56,7 @@ public class RimuHostingPropertiesBuilder extends PropertiesBuilder { long timeoutMillis = timeout.timeUnit().toMillis(timeout.duration()); properties.setProperty(PROPERTY_SO_TIMEOUT, timeoutMillis + ""); properties.setProperty(PROPERTY_CONNECTION_TIMEOUT, timeoutMillis + ""); + properties.setProperty(ComputeServiceConstants.PROPERTY_TIMEOUT_NODE_TERMINATED, 60 * 1000 + ""); return properties; } diff --git a/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingProviderMetadata.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingProviderMetadata.java new file mode 100644 index 0000000000..eba194ade7 --- /dev/null +++ b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.rimuhosting.miro; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for RimuHosting. + * + * @author Adrian Cole + */ +public class RimuHostingProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "rimuhosting"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "RimuHosting"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://rimuhosting.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://rimuhosting.com/cp"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://apidocs.rimuhosting.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("rimuhosting"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("NZ-AUK", "US-TX", "AU-NSW", "GB-LND"); + } + +} diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/CreateServerOptions.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/CreateServerOptions.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/CreateServerOptions.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/CreateServerOptions.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingJsonBinder.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingJsonBinder.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingJsonBinder.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingJsonBinder.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingRebootJsonBinder.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingRebootJsonBinder.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingRebootJsonBinder.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/binder/RimuHostingRebootJsonBinder.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeStrategiesByClass.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeStrategiesByClass.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeStrategiesByClass.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeStrategiesByClass.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeSuppliersByClass.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeSuppliersByClass.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeSuppliersByClass.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingBindComputeSuppliersByClass.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModule.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModule.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModule.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModule.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceDependenciesModule.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceDependenciesModule.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceDependenciesModule.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceDependenciesModule.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/functions/ServerToNodeMetadata.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/functions/ServerToNodeMetadata.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/functions/ServerToNodeMetadata.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/functions/ServerToNodeMetadata.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingCreateNodeWithGroupEncodedIntoName.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingCreateNodeWithGroupEncodedIntoName.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingCreateNodeWithGroupEncodedIntoName.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingCreateNodeWithGroupEncodedIntoName.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingDestroyNodeStrategy.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingDestroyNodeStrategy.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingDestroyNodeStrategy.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingDestroyNodeStrategy.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingGetNodeMetadataStrategy.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingGetNodeMetadataStrategy.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingGetNodeMetadataStrategy.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingGetNodeMetadataStrategy.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingLifeCycleStrategy.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingLifeCycleStrategy.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingLifeCycleStrategy.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingLifeCycleStrategy.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingListNodesStrategy.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingListNodesStrategy.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingListNodesStrategy.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/strategy/RimuHostingListNodesStrategy.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingDefaultLocationSupplier.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingDefaultLocationSupplier.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingDefaultLocationSupplier.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingDefaultLocationSupplier.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingHardwareSupplier.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingHardwareSupplier.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingHardwareSupplier.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingHardwareSupplier.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingImageSupplier.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingImageSupplier.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingImageSupplier.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingImageSupplier.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingLocationSupplier.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingLocationSupplier.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingLocationSupplier.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/suppliers/RimuHostingLocationSupplier.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/config/RimuHostingRestClientModule.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/config/RimuHostingRestClientModule.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/config/RimuHostingRestClientModule.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/config/RimuHostingRestClientModule.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CloneOptions.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CloneOptions.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CloneOptions.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CloneOptions.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CreateOptions.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CreateOptions.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CreateOptions.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/CreateOptions.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/IpRequestData.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/IpRequestData.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/IpRequestData.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/IpRequestData.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/NewServerData.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/NewServerData.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/NewServerData.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/NewServerData.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/PostData.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/PostData.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/PostData.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/data/PostData.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/BillingData.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/BillingData.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/BillingData.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/BillingData.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataCenter.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataCenter.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataCenter.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataCenter.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataTransferAllowance.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataTransferAllowance.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataTransferAllowance.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/DataTransferAllowance.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Image.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Image.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Image.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Image.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/IpAddresses.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/IpAddresses.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/IpAddresses.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/IpAddresses.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/MetaData.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/MetaData.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/MetaData.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/MetaData.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/NewServerResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/PricingPlan.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/PricingPlan.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/PricingPlan.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/PricingPlan.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResult.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResult.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResult.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ResizeResult.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Server.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Server.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Server.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/Server.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerInfo.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerInfo.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerInfo.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerInfo.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerParameters.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerParameters.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerParameters.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/ServerParameters.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingError.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingError.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingError.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingError.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingTimestamp.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingTimestamp.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingTimestamp.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RimuHostingTimestamp.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RunningState.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RunningState.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RunningState.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/RunningState.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/ServerType.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/ServerType.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/ServerType.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/domain/internal/ServerType.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/filters/RimuHostingAuthentication.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/filters/RimuHostingAuthentication.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/filters/RimuHostingAuthentication.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/filters/RimuHostingAuthentication.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseDestroyResponseFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseDestroyResponseFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseDestroyResponseFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseDestroyResponseFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseImagesFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseImagesFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseImagesFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseImagesFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParsePricingPlansFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParsePricingPlansFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParsePricingPlansFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParsePricingPlansFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseRimuHostingException.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseRimuHostingException.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseRimuHostingException.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseRimuHostingException.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerInfoFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerInfoFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerInfoFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServerInfoFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServersFromJsonResponse.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServersFromJsonResponse.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServersFromJsonResponse.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/functions/ParseServersFromJsonResponse.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerDestroyed.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerDestroyed.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerDestroyed.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerDestroyed.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerRunning.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerRunning.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerRunning.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/predicates/ServerRunning.java diff --git a/sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/reference/RimuHostingConstants.java b/providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/reference/RimuHostingConstants.java similarity index 100% rename from sandbox-providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/reference/RimuHostingConstants.java rename to providers/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/reference/RimuHostingConstants.java diff --git a/providers/rimuhosting/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/rimuhosting/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..b3a6e93521 --- /dev/null +++ b/providers/rimuhosting/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.rimuhosting.miro.RimuHostingProviderMetadata diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/ProvidersInPropertiesTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/ProvidersInPropertiesTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/ProvidersInPropertiesTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/ProvidersInPropertiesTest.java diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingAsyncClientTest.java diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java diff --git a/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingProviderTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingProviderTest.java new file mode 100644 index 0000000000..7361a28ceb --- /dev/null +++ b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.rimuhosting.miro; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "RimuHostingProviderTest") +public class RimuHostingProviderTest extends BaseProviderMetadataTest { + + public RimuHostingProviderTest() { + super(new RimuHostingProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java old mode 100755 new mode 100644 similarity index 93% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java index 4af778afc2..974864b1a1 --- a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java +++ b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java @@ -43,4 +43,8 @@ public class RimuHostingComputeServiceLiveTest extends BaseComputeServiceLiveTes return new JschSshClientModule(); } + @Override + public void testOptionToNotBlock() { + // start call is blocking anyway. + } } diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingTemplateBuilderLiveTest.java diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModuleTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModuleTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModuleTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/config/RimuHostingComputeServiceContextModuleTest.java diff --git a/sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponseTest.java b/providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponseTest.java similarity index 100% rename from sandbox-providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponseTest.java rename to providers/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/functions/ParseServerFromJsonResponseTest.java diff --git a/sandbox-providers/rimuhosting/src/test/resources/cancelled.json b/providers/rimuhosting/src/test/resources/cancelled.json similarity index 100% rename from sandbox-providers/rimuhosting/src/test/resources/cancelled.json rename to providers/rimuhosting/src/test/resources/cancelled.json diff --git a/sandbox-providers/rimuhosting/src/test/resources/log4j.xml b/providers/rimuhosting/src/test/resources/log4j.xml similarity index 100% rename from sandbox-providers/rimuhosting/src/test/resources/log4j.xml rename to providers/rimuhosting/src/test/resources/log4j.xml diff --git a/providers/savvis-symphonyvpdc/pom.xml b/providers/savvis-symphonyvpdc/pom.xml index 0c19c904d2..529e9e254f 100644 --- a/providers/savvis-symphonyvpdc/pom.xml +++ b/providers/savvis-symphonyvpdc/pom.xml @@ -126,6 +126,7 @@ test + 1 test.savvis-symphonyvpdc.endpoint diff --git a/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderMetadata.java b/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderMetadata.java new file mode 100644 index 0000000000..01f9a9ef9f --- /dev/null +++ b/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderMetadata.java @@ -0,0 +1,141 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.savvis.vpdc; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Savvis Symphony VPDC services. + * + * @author Kedar Dave + */ +public class SavvisSymphonyVPDCProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "savvis-symphonyvpdc"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Savvis Symphony VPDC"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "password"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.savvis.com/en-US/infrastructure-services/Cloud/Pages/SavvisSymphonyVPDC.aspx"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://www.savvisstation.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("https://api.symphonyvpdc.savvis.net/doc/spec/api/index.html"); + } + + /** + * {@inheritDoc} + * list of data centers from savvisstation colocation guide + * https://www.savvisstation.com/DocumentViewer?GUID=a95f0387-cbfe-43eb-b25b-4f2b0f68498f&sessionid=SavvisCCC%3ac9a8984b9655b01916be587e5204b2cf + * Once we have confirmation from Savvis as to what data centers are used for vpdc deployments, + * iso codes for those will be entered here + * + * City Code + * Lithia Springs, GA AT1 + * Waltham, MA BO1 + * Waltham, MA BO2 + * Waltham, MA B03 + * Elk Grove Village, IL CH3 + * Chicago, IL CH4 + * Sterling, VA DC2 + * Sterling, VA DC3 + * Sterling, VA DC4 Phase I + * Sterling, VA DC4 Phase II + * Fort Worth, TX DL1 + * Fort Worth, TX DL2 + * El Segundo, CA LA1 + * Jersey City, NJ NJ1 + * Weehawken, NJ NJ2 + * Piscataway, NJ NJ3 + * Piscataway, NJ 2nd floor NJ3 + * Weehawken, NJ NJ2X + * Irvine, CA OC2 + * Santa Clara, CA SC4 + * Santa Clara, CA SC5 + * Santa Clara, CA SC8 + * Santa Clara, CA SC9 + * Tukwila, WA 1st floor SE2 + * Montreal, Canada MR1 + * Toronto, Canada TR1 + * Vancouver, Canada VC1 + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of(""); + } + +} \ No newline at end of file diff --git a/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClient.java b/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClient.java index ee44b53e55..076b1a1c22 100644 --- a/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClient.java +++ b/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClient.java @@ -55,7 +55,7 @@ public interface FirewallAsyncClient { */ @PUT @XMLResponseParser(TaskHandler.class) - @Path("v{jclouds.api-version}/org/{billingSiteId}/vdc/{vpdcId}/FirewallService/") + @Path("v{jclouds.api-version}/org/{billingSiteId}/vdc/{vpdcId}/FirewallService") @MapBinder(BindFirewallRuleToXmlPayload.class) ListenableFuture addFirewallRule( @PathParam("billingSiteId") @Nullable @ParamParser(DefaultOrgIfNull.class) String billingSiteId, @@ -66,7 +66,7 @@ public interface FirewallAsyncClient { */ @DELETE @XMLResponseParser(TaskHandler.class) - @Path("v{jclouds.api-version}/org/{billingSiteId}/vdc/{vpdcId}/FirewallService/") + @Path("v{jclouds.api-version}/org/{billingSiteId}/vdc/{vpdcId}/FirewallService") @MapBinder(BindFirewallRuleToXmlPayload.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class) ListenableFuture deleteFirewallRule( diff --git a/providers/savvis-symphonyvpdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/savvis-symphonyvpdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..ab54604528 --- /dev/null +++ b/providers/savvis-symphonyvpdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.savvis.vpdc.SavvisSymphonyVPDCProviderMetadata \ No newline at end of file diff --git a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderTest.java b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderTest.java new file mode 100644 index 0000000000..1cb30f9ece --- /dev/null +++ b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/SavvisSymphonyVPDCProviderTest.java @@ -0,0 +1,36 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.savvis.vpdc; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The SavvisSymphonyVPDCProviderTest tests the org.jclouds.savvis.vpdc.SavvisSymphonyVPDCProviderMetadata class. + * + * @author Kedar Dave + */ +@Test(groups = "unit", testName = "SavvisSymphonyVPDCProviderTest") +public class SavvisSymphonyVPDCProviderTest extends BaseProviderMetadataTest { + + public SavvisSymphonyVPDCProviderTest() { + super(new SavvisSymphonyVPDCProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} \ No newline at end of file diff --git a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BaseVPDCClientLiveTest.java b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BaseVPDCClientLiveTest.java index 0080de9373..12e30f4951 100644 --- a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BaseVPDCClientLiveTest.java +++ b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BaseVPDCClientLiveTest.java @@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.Properties; import java.util.concurrent.TimeUnit; +import org.jclouds.Constants; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.logging.log4j.config.Log4JLoggingModule; @@ -79,6 +80,9 @@ public class BaseVPDCClientLiveTest { overrides.setProperty(provider + ".endpoint", endpoint); if (apiversion != null) overrides.setProperty(provider + ".apiversion", apiversion); + // TODO savvis uses untrusted certificates, remove these once savvis fixes the issue + overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true"); + overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true"); return overrides; } diff --git a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BrowsingClientLiveTest.java b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BrowsingClientLiveTest.java index 473f6e6380..8d37bb4d61 100644 --- a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BrowsingClientLiveTest.java +++ b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/BrowsingClientLiveTest.java @@ -115,11 +115,13 @@ public class BrowsingClientLiveTest extends BaseVPDCClientLiveTest { } } + // test for a single vm, as savvis response times are very slow. So if there are multiple vpdc's with numerous vm's, + // test execution will invariably take a long time @Test public void testVM() throws Exception { for (Resource org1 : restContext.getApi().listOrgs()) { Org org = client.getOrg(org1.getId()); - for (Resource vdc : org.getVDCs()) { + VDC_LOOP : for (Resource vdc : org.getVDCs()) { VDC VDC = client.getVDCInOrg(org.getId(), vdc.getId()); for (Resource vApp : Iterables.filter(VDC.getResourceEntities(), new Predicate() { @@ -151,11 +153,15 @@ public class BrowsingClientLiveTest extends BaseVPDCClientLiveTest { String ip = Iterables.get(response.getNetworkConnectionSections(), 0).getIpAddress(); assert HostSpecifier.isValid(ip) : response; if (InetAddresses2.isPrivateIPAddress(ip)) { + // get public ip ip = Iterables.get(response.getNetworkConfigSections(), 0).getInternalToExternalNATRules().get(ip); + // could be null + if(ip != null){ + assert HostSpecifier.isValid(ip) : response; + } } - assert HostSpecifier.isValid(ip) : response; + break VDC_LOOP; } - } } } diff --git a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClientTest.java b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClientTest.java index 9d15ec78e2..b533f708e1 100644 --- a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClientTest.java +++ b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/FirewallAsyncClientTest.java @@ -48,7 +48,7 @@ public class FirewallAsyncClientTest extends BaseVPDCAsyncClientTest() { @@ -61,18 +64,21 @@ public class ServiceManagementClientLiveTest extends BaseVPDCClientLiveTest { } })) { - - assert taskTester.apply(client.powerOffVM(vmHandle.getHref()).getId()); + + Task powerOffTask = client.powerOffVM(vmHandle.getHref()); + assert taskTester.apply(powerOffTask.getId()); VM vm = restContext.getApi().getBrowsingClient().getVM(vmHandle.getHref(), withPowerState()); assertEquals(vm.getStatus(), VM.Status.OFF); - - assert taskTester.apply(client.powerOnVM(vmHandle.getHref()).getId()); + + Task powerOnTask = client.powerOnVM(vmHandle.getHref()); + assert taskTester.apply(powerOnTask.getId()); vm = restContext.getApi().getBrowsingClient().getVM(vmHandle.getHref(), withPowerState()); assertEquals(vm.getStatus(), VM.Status.ON); - + + break VDC_LOOP; } } } diff --git a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java index 1a6bc1eb18..33a06932b0 100644 --- a/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java +++ b/providers/savvis-symphonyvpdc/src/test/java/org/jclouds/savvis/vpdc/features/VMClientLiveTest.java @@ -21,7 +21,6 @@ package org.jclouds.savvis.vpdc.features; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; -import java.net.URI; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -38,7 +37,6 @@ import org.jclouds.savvis.vpdc.domain.Task; import org.jclouds.savvis.vpdc.domain.VDC; import org.jclouds.savvis.vpdc.domain.VM; import org.jclouds.savvis.vpdc.domain.VMSpec; -import org.jclouds.savvis.vpdc.domain.VM.Status; import org.jclouds.savvis.vpdc.options.GetVMOptions; import org.jclouds.savvis.vpdc.reference.VCloudMediaType; import org.jclouds.ssh.SshClient; @@ -49,8 +47,8 @@ import org.testng.annotations.Test; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; import com.google.common.collect.ImmutableSet.Builder; +import com.google.common.collect.Iterables; import com.google.common.net.HostSpecifier; @Test(groups = "live") @@ -98,13 +96,8 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { .getName(); String name = prefix; - // delete any old VM VDC vpdc = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, vpdcId); - for (Resource resource : vpdc.getResourceEntities()) { - if (resource.getName().equals(prefix)) { - taskTester.apply(client.removeVMFromVDC(billingSiteId, vpdcId, resource.getId()).getId()); - } - } + CIMOperatingSystem os = Iterables.find(restContext.getApi().listPredefinedOperatingSystems(), new Predicate() { @@ -114,22 +107,30 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { } }); - System.out.printf("vpdcId %s, networkName %s, name %s, os %s%n", vpdcId, networkTierName, name, os); + System.out.printf("Creating vm - vpdcId %s, vpdcName %s, networkName %s, name %s, os %s%n", vpdcId, vpdc.getName(), networkTierName, name, os); // TODO: determine the sizes available in the VDC, for example there's // a minimum size of boot disk, and also a preset combination of cpu count vs ram Task task = client.addVMIntoVDC(billingSiteId, vpdcId, VMSpec.builder().name(name).networkTierName( networkTierName).operatingSystem(os).memoryInGig(2).addDataDrive("/data01", 25).build()); - + // make sure there's no error assert task.getId() != null && task.getError() == null : task; assert this.taskTester.apply(task.getId()); - vm = restContext.getApi().getBrowsingClient().getVMInVDC(billingSiteId, vpdcId, task.getOwner().getId()); - conditionallyCheckSSH(); + + // fetch the task again, in savvis, task.getOwner is populated with vApp after task has finished + task = restContext.getApi().getBrowsingClient().getTask(task.getId()); + + vm = restContext.getApi().getBrowsingClient().getVM(task.getOwner().getHref(), GetVMOptions.NONE); + assert vm.getHref() != null : vm; + + // cannot ssh in savvis, as no public ip is assigned by default +// conditionallyCheckSSH(); } - public void testCreateMultipleVMs() throws Exception { + @Test(dependsOnMethods="testCloneVApp") + public void testZCreateMultipleVMs() throws Exception { billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), new Predicate() { @@ -168,7 +169,7 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { // TODO: Savvis returns network names with a - instead of space on getNetworkInVDC call, // fix this once savvis api starts returning correctly - System.out.printf("vpdcId %s, vpdcName %s, networkName %s, name %s, os %s%n", vpdcId, vpdc.getName(), networkTier + System.out.printf("Creating vm's - vpdcId %s, vpdcName %s, networkName %s, name %s, os %s%n", vpdcId, vpdc.getName(), networkTier .getName().replace("-", " "), name, os); Builder vmSpecs = ImmutableSet. builder(); @@ -186,11 +187,21 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { for (Task task : tasks) { // make sure there's no error assert task.getId() != null && task.getError() == null : task; - assert this.taskTester.apply(task.getId()); + + // fetch the task again, in savvis, task.getOwner is populated with vApp after task has finished + task = restContext.getApi().getBrowsingClient().getTask(task.getId()); + + VM newVM = restContext.getApi().getBrowsingClient().getVM(task.getOwner().getHref(), GetVMOptions.NONE); + assert newVM.getHref() != null : newVM; } } - + + /** + * disabled because it not currently supported by savvis. Planned for august release by savvis. + * @throws Exception + */ + @Test(enabled=false) public void testCaptureVAppTemplate() throws Exception { billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), @@ -229,9 +240,10 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { } } + @Test(dependsOnMethods="testCreateVirtualMachine") public void testCloneVApp() throws Exception { - billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default - vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), + billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default + vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), new Predicate() { // try to find the first VDC owned by the current user @@ -245,29 +257,26 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { } }).getId(); - - VDC vpdc = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, vpdcId); - - String networkTierName = Iterables.get(vpdc.getAvailableNetworks(), 0).getId(); - - for (Resource vApp : Iterables.filter(vpdc.getResourceEntities(), new Predicate() { - - @Override - public boolean apply(Resource arg0) { - return VCloudMediaType.VAPP_XML.equals(arg0.getType()); - } - - })) { - - System.out.printf("Cloning VApp - %s%n", vApp.getName()); - - Task task = client.cloneVApp(vApp.getHref(), "clonedvm", networkTierName); - - // make sure there's no error - assert task.getId() != null && task.getError() == null : task; - - assert this.taskTester.apply(task.getId()); - } + + String networkTierName = Iterables.get( + restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, vpdcId).getAvailableNetworks(), 0) + .getId(); + + String clonedVMName = vm.getName() + "clone"; + + System.out.printf("Cloning vm - name %s in vpdcId %s in network %s, newVM name is %s%n", vm.getName(), vpdcId, networkTierName, clonedVMName); + + Task task = client.cloneVApp(vm.getHref(), clonedVMName, networkTierName); + + // make sure there's no error + assert task.getId() != null && task.getError() == null : task; + assert this.taskTester.apply(task.getId()); + + // fetch the task again, in savvis, task.getOwner is populated with vApp after task has finished + task = restContext.getApi().getBrowsingClient().getTask(task.getId()); + + VM clonedVM = restContext.getApi().getBrowsingClient().getVM(task.getOwner().getHref(), GetVMOptions.NONE); + assert clonedVM.getHref() != null : clonedVM; } private void conditionallyCheckSSH() { @@ -297,90 +306,6 @@ public class VMClientLiveTest extends BaseVPDCClientLiveTest { } } - @Test(enabled = false) - public void testPowerOffVM() throws Exception { - billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default - vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), - new Predicate() { - - // try to find the first VDC owned by the current user - // check here for what the email property might be, or in - // the jclouds-wire.log - @Override - public boolean apply(Resource arg0) { - String description = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, - arg0.getId()).getDescription(); - return description.indexOf(email) != -1; - } - - }).getId(); - - VDC vpdc = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, vpdcId); - URI vmURI = Iterables.find(vpdc.getResourceEntities(), new Predicate() { - @Override - public boolean apply(Resource arg0) { - if (VCloudMediaType.VAPP_XML.equals(arg0.getType())) { - VM response1 = restContext.getApi().getBrowsingClient().getVM(arg0.getHref(), (GetVMOptions[]) null); - System.out.printf("powering off vm - %s%n", response1.getName()); - if (response1.getStatus().equals(Status.ON)) { - return true; - } - } - return false; - } - - }).getHref(); - - Task task = client.powerOffVM(vmURI); - - // make sure there's no error - assert task.getId() != null && task.getError() == null : task; - - assert this.taskTester.apply(task.getId()); - } - - @Test(enabled = false) - public void testPowerOnVM() throws Exception { - billingSiteId = restContext.getApi().getBrowsingClient().getOrg(null).getId();// default - vpdcId = Iterables.find(restContext.getApi().getBrowsingClient().getOrg(billingSiteId).getVDCs(), - new Predicate() { - - // try to find the first VDC owned by the current user - // check here for what the email property might be, or in - // the jclouds-wire.log - @Override - public boolean apply(Resource arg0) { - String description = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, - arg0.getId()).getDescription(); - return description.indexOf(email) != -1; - } - - }).getId(); - - VDC vpdc = restContext.getApi().getBrowsingClient().getVDCInOrg(billingSiteId, vpdcId); - URI vmURI = Iterables.find(vpdc.getResourceEntities(), new Predicate() { - @Override - public boolean apply(Resource arg0) { - if (VCloudMediaType.VAPP_XML.equals(arg0.getType())) { - VM response1 = restContext.getApi().getBrowsingClient().getVM(arg0.getHref(), (GetVMOptions[]) null); - System.out.printf("powering on vm - %s%n", response1.getName()); - if (response1.getStatus().equals(Status.OFF)) { - return true; - } - } - return false; - } - - }).getHref(); - - Task task = client.powerOnVM(vmURI); - - // make sure there's no error - assert task.getId() != null && task.getError() == null : task; - - assert this.taskTester.apply(task.getId()); - } - @AfterGroups(groups = "live") protected void tearDown() { if (vm != null) { diff --git a/providers/serverlove-z1-man/src/main/java/org/jclouds/serverlove/ServerloveManchesterProviderMetadata.java b/providers/serverlove-z1-man/src/main/java/org/jclouds/serverlove/ServerloveManchesterProviderMetadata.java new file mode 100644 index 0000000000..87d8dd74eb --- /dev/null +++ b/providers/serverlove-z1-man/src/main/java/org/jclouds/serverlove/ServerloveManchesterProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.serverlove; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Serverlove Manchester. + * + * @author Adrian Cole + */ +public class ServerloveManchesterProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "serverlove-z1-man"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Serverlove Manchester"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.serverlove.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("http://www.serverlove.com/login"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.serverlove.com/cloud-server-faqs/api-questions"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("serverlove-z1-man"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("GB-MAN"); + } + +} diff --git a/providers/serverlove-z1-man/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/serverlove-z1-man/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..f50adb3764 --- /dev/null +++ b/providers/serverlove-z1-man/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.serverlove.ServerloveManchesterProviderMetadata diff --git a/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/ServerloveManchesterProviderTest.java b/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/ServerloveManchesterProviderTest.java new file mode 100644 index 0000000000..725c8fe7ce --- /dev/null +++ b/providers/serverlove-z1-man/src/test/java/org/jclouds/serverlove/ServerloveManchesterProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.serverlove; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "ServerloveManchesterProviderTest") +public class ServerloveManchesterProviderTest extends BaseProviderMetadataTest { + + public ServerloveManchesterProviderTest() { + super(new ServerloveManchesterProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} diff --git a/providers/skalicloud-sdg-my/src/main/java/org/jclouds/skalicloud/SkaliCloudMalaysiaProviderMetadata.java b/providers/skalicloud-sdg-my/src/main/java/org/jclouds/skalicloud/SkaliCloudMalaysiaProviderMetadata.java new file mode 100644 index 0000000000..f6db1a1553 --- /dev/null +++ b/providers/skalicloud-sdg-my/src/main/java/org/jclouds/skalicloud/SkaliCloudMalaysiaProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.skalicloud; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for SkaliCloud Malasya. + * + * @author Adrian Cole + */ +public class SkaliCloudMalaysiaProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "skalicloud-sdg-my"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "SkaliCloud Malasya"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "UUID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.skalicloud.com"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("http://sdg-my.skalicloud.com"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.skalicloud.com/cloud-api"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("skalicloud-sdg-my"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("MY-10"); + } + +} diff --git a/providers/skalicloud-sdg-my/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/skalicloud-sdg-my/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..bb9797a8fe --- /dev/null +++ b/providers/skalicloud-sdg-my/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata diff --git a/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/SkaliCloudMalasyaProviderTest.java b/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/SkaliCloudMalasyaProviderTest.java new file mode 100644 index 0000000000..fb703e4d03 --- /dev/null +++ b/providers/skalicloud-sdg-my/src/test/java/org/jclouds/skalicloud/SkaliCloudMalasyaProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.skalicloud; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "SkaliCloudMalaysiaProviderTest") +public class SkaliCloudMalasyaProviderTest extends BaseProviderMetadataTest { + + public SkaliCloudMalasyaProviderTest() { + super(new SkaliCloudMalaysiaProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} diff --git a/providers/slicehost/src/test/resources/log4j.xml b/providers/slicehost/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java new file mode 100644 index 0000000000..1865fb4d9b --- /dev/null +++ b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java @@ -0,0 +1,109 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.synaptic.storage; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for AT&T's + * Synaptic Storage provider. + * + * @author Jeremy Whitlock + */ +public class SynapticStorageProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "synaptic-storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "AT&T Synaptic Storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Subtenant ID (UID)"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Shared Secret"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("https://www.synaptic.att.com/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://www.synaptic.att.com/clouduser/login.htm"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("https://www.synaptic.att.com/clouduser/emc_atmos_api.htm"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-VA", "US-TX"); + } + +} \ No newline at end of file diff --git a/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..35deaa8fcb --- /dev/null +++ b/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.synaptic.storage.SynapticStorageProviderMetadata diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java new file mode 100644 index 0000000000..92e7aab916 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.synaptic.storage; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The SynapticStorageProviderTest tests the {@link org.jclouds.synaptic.storage.SynapticStorageProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "SynapticStorageProviderTest") +public class SynapticStorageProviderTest extends BaseProviderMetadataTest { + + public SynapticStorageProviderTest() { + super(new SynapticStorageProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/trmk-ecloud/src/test/resources/catalog-ecloud.xml b/providers/trmk-ecloud/src/test/resources/catalog-ecloud.xml old mode 100755 new mode 100644 diff --git a/providers/trmk-ecloud/src/test/resources/log4j.xml b/providers/trmk-ecloud/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/providers/trmk-vcloudexpress/src/test/resources/log4j.xml b/providers/trmk-vcloudexpress/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/sandbox-apis/libvirt/src/main/java/org/jclouds/libvirt/LibvirtConstants.java b/sandbox-apis/libvirt/src/main/java/org/jclouds/libvirt/LibvirtConstants.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/libvirt/src/test/resources/log4j.xml b/sandbox-apis/libvirt/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/SDNAuthAsyncClient.java b/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/SDNAuthAsyncClient.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/SDNContextBuilder.java b/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/SDNContextBuilder.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/config/SDNAuthRestClientModule.java b/sandbox-apis/nirvanix/src/main/java/org/jclouds/nirvanix/sdn/config/SDNAuthRestClientModule.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/test/java/org/jclouds/nirvanix/sdn/SDNAuthAsyncClientTest.java b/sandbox-apis/nirvanix/src/test/java/org/jclouds/nirvanix/sdn/SDNAuthAsyncClientTest.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java b/sandbox-apis/nirvanix/src/test/java/org/jclouds/nirvanix/sdn/filters/AddSessionTokenToRequestTest.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/nirvanix/src/test/resources/log4j.xml b/sandbox-apis/nirvanix/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/PCSCloudAsyncClient.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/PCSCloudAsyncClient.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/PCSContextBuilder.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/PCSContextBuilder.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/config/PCSRestClientModule.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/config/PCSRestClientModule.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java old mode 100755 new mode 100644 diff --git a/sandbox-apis/pcs/src/test/resources/log4j.xml b/sandbox-apis/pcs/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/apis/scality-rs2/README.txt b/sandbox-apis/scality-rs2/README.txt similarity index 100% rename from apis/scality-rs2/README.txt rename to sandbox-apis/scality-rs2/README.txt diff --git a/apis/scality-rs2/pom.xml b/sandbox-apis/scality-rs2/pom.xml similarity index 100% rename from apis/scality-rs2/pom.xml rename to sandbox-apis/scality-rs2/pom.xml diff --git a/apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2AsyncClient.java b/sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2AsyncClient.java similarity index 100% rename from apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2AsyncClient.java rename to sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2AsyncClient.java diff --git a/apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2ContextBuilder.java b/sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2ContextBuilder.java similarity index 100% rename from apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2ContextBuilder.java rename to sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2ContextBuilder.java diff --git a/apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2PropertiesBuilder.java b/sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2PropertiesBuilder.java similarity index 100% rename from apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2PropertiesBuilder.java rename to sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/ScalityRS2PropertiesBuilder.java diff --git a/apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/blobstore/config/ScalityRS2BlobStoreContextModule.java b/sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/blobstore/config/ScalityRS2BlobStoreContextModule.java similarity index 100% rename from apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/blobstore/config/ScalityRS2BlobStoreContextModule.java rename to sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/blobstore/config/ScalityRS2BlobStoreContextModule.java diff --git a/apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/config/ScalityRS2RestClientModule.java b/sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/config/ScalityRS2RestClientModule.java similarity index 100% rename from apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/config/ScalityRS2RestClientModule.java rename to sandbox-apis/scality-rs2/src/main/java/org/jclouds/scality/rs2/config/ScalityRS2RestClientModule.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2AsyncClientTestDisabled.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2AsyncClientTestDisabled.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2AsyncClientTestDisabled.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2AsyncClientTestDisabled.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2ClientLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2ClientLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2ClientLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/ScalityRS2ClientLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobIntegrationLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobIntegrationLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobIntegrationLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobIntegrationLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobMapIntegrationLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobMapIntegrationLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobMapIntegrationLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobMapIntegrationLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobSignerLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobSignerLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobSignerLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2BlobSignerLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerIntegrationLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerIntegrationLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerIntegrationLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerIntegrationLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ContainerLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2InputStreamMapIntegrationLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2InputStreamMapIntegrationLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2InputStreamMapIntegrationLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2InputStreamMapIntegrationLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ServiceIntegrationLiveTest.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ServiceIntegrationLiveTest.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ServiceIntegrationLiveTest.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2ServiceIntegrationLiveTest.java diff --git a/apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2TestInitializer.java b/sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2TestInitializer.java similarity index 100% rename from apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2TestInitializer.java rename to sandbox-apis/scality-rs2/src/test/java/org/jclouds/scality/rs2/blobstore/ScalityRS2TestInitializer.java diff --git a/sandbox-providers/azurequeue/src/test/resources/log4j.xml b/sandbox-providers/azurequeue/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/providers/googlestorage/README.txt b/sandbox-providers/googlestorage/README.txt similarity index 100% rename from providers/googlestorage/README.txt rename to sandbox-providers/googlestorage/README.txt diff --git a/providers/googlestorage/pom.xml b/sandbox-providers/googlestorage/pom.xml similarity index 100% rename from providers/googlestorage/pom.xml rename to sandbox-providers/googlestorage/pom.xml diff --git a/providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageAsyncClient.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageAsyncClient.java similarity index 100% rename from providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageAsyncClient.java rename to sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageAsyncClient.java diff --git a/providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageContextBuilder.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageContextBuilder.java similarity index 100% rename from providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageContextBuilder.java rename to sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageContextBuilder.java diff --git a/providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStoragePropertiesBuilder.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStoragePropertiesBuilder.java similarity index 100% rename from providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStoragePropertiesBuilder.java rename to sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStoragePropertiesBuilder.java diff --git a/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageProviderMetadata.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageProviderMetadata.java new file mode 100644 index 0000000000..65ab1e30a0 --- /dev/null +++ b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/GoogleStorageProviderMetadata.java @@ -0,0 +1,108 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.googlestorage; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; + +/** + * Implementation of {@ link org.jclouds.types.ProviderMetadata} for Google's + * Storage provider. + * + * @author Jeremy Whitlock + */ +public class GoogleStorageProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "googlestorage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Google Storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Access Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://code.google.com/apis/storage/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://code.google.com/apis/console#:storage:access"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://code.google.com/apis/storage/docs/reference-guide.html"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US"); + } + +} diff --git a/providers/googlestorage/src/main/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequest.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequest.java similarity index 100% rename from providers/googlestorage/src/main/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequest.java rename to sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequest.java diff --git a/providers/googlestorage/src/main/java/org/jclouds/googlestorage/config/GoogleStorageRestClientModule.java b/sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/config/GoogleStorageRestClientModule.java similarity index 100% rename from providers/googlestorage/src/main/java/org/jclouds/googlestorage/config/GoogleStorageRestClientModule.java rename to sandbox-providers/googlestorage/src/main/java/org/jclouds/googlestorage/config/GoogleStorageRestClientModule.java diff --git a/sandbox-providers/googlestorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/sandbox-providers/googlestorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..01a8afea14 --- /dev/null +++ b/sandbox-providers/googlestorage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.googlestorage.GoogleStorageProviderMetadata diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageAsyncClientTestDisabled.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageAsyncClientTestDisabled.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageAsyncClientTestDisabled.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageAsyncClientTestDisabled.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageClientLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageClientLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageClientLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageClientLiveTest.java diff --git a/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageProviderTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageProviderTest.java new file mode 100644 index 0000000000..1ac07495ce --- /dev/null +++ b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/GoogleStorageProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ +package org.jclouds.googlestorage; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The GoogleStorageProviderTest tests the {@link GoogleStorageProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "GoogleStorageProviderTest") +public class GoogleStorageProviderTest extends BaseProviderMetadataTest { + + public GoogleStorageProviderTest() { + super(new GoogleStorageProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); + } + +} \ No newline at end of file diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequestTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequestTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequestTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/binders/BindGoogleStorageObjectMetadataToRequestTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobIntegrationLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobIntegrationLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobIntegrationLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobIntegrationLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobMapIntegrationLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobMapIntegrationLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobMapIntegrationLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobMapIntegrationLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobSignerLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobSignerLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobSignerLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageBlobSignerLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerIntegrationLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerIntegrationLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerIntegrationLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerIntegrationLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageContainerLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageInputStreamMapIntegrationLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageInputStreamMapIntegrationLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageInputStreamMapIntegrationLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageInputStreamMapIntegrationLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageServiceIntegrationLiveTest.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageServiceIntegrationLiveTest.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageServiceIntegrationLiveTest.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageServiceIntegrationLiveTest.java diff --git a/providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageTestInitializer.java b/sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageTestInitializer.java similarity index 100% rename from providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageTestInitializer.java rename to sandbox-providers/googlestorage/src/test/java/org/jclouds/googlestorage/blobstore/GoogleStorageTestInitializer.java diff --git a/providers/hosteurope-storage/pom.xml b/sandbox-providers/hosteurope-storage/pom.xml similarity index 100% rename from providers/hosteurope-storage/pom.xml rename to sandbox-providers/hosteurope-storage/pom.xml diff --git a/providers/hosteurope-storage/src/main/java/org/jclouds/hosteurope/storage/HostEuropeStoragePropertiesBuilder.java b/sandbox-providers/hosteurope-storage/src/main/java/org/jclouds/hosteurope/storage/HostEuropeStoragePropertiesBuilder.java similarity index 100% rename from providers/hosteurope-storage/src/main/java/org/jclouds/hosteurope/storage/HostEuropeStoragePropertiesBuilder.java rename to sandbox-providers/hosteurope-storage/src/main/java/org/jclouds/hosteurope/storage/HostEuropeStoragePropertiesBuilder.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/HostEuropeStorageClientLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/HostEuropeStorageClientLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/HostEuropeStorageClientLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/HostEuropeStorageClientLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobIntegrationLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobIntegrationLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobIntegrationLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobIntegrationLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobMapIntegrationLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobMapIntegrationLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobMapIntegrationLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobMapIntegrationLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobSignerLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobSignerLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobSignerLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageBlobSignerLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerIntegrationLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerIntegrationLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerIntegrationLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerIntegrationLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageContainerLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageInputStreamMapIntegrationLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageInputStreamMapIntegrationLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageInputStreamMapIntegrationLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageInputStreamMapIntegrationLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageServiceIntegrationLiveTest.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageServiceIntegrationLiveTest.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageServiceIntegrationLiveTest.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageServiceIntegrationLiveTest.java diff --git a/providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageTestInitializer.java b/sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageTestInitializer.java similarity index 100% rename from providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageTestInitializer.java rename to sandbox-providers/hosteurope-storage/src/test/java/org/jclouds/hosteurope/storage/blobstore/HostEuropeStorageTestInitializer.java diff --git a/providers/scaleup-storage/README.txt b/sandbox-providers/scaleup-storage/README.txt similarity index 100% rename from providers/scaleup-storage/README.txt rename to sandbox-providers/scaleup-storage/README.txt diff --git a/providers/scaleup-storage/pom.xml b/sandbox-providers/scaleup-storage/pom.xml similarity index 100% rename from providers/scaleup-storage/pom.xml rename to sandbox-providers/scaleup-storage/pom.xml diff --git a/providers/scaleup-storage/src/main/java/org/jclouds/scaleup/storage/ScaleUpStoragePropertiesBuilder.java b/sandbox-providers/scaleup-storage/src/main/java/org/jclouds/scaleup/storage/ScaleUpStoragePropertiesBuilder.java similarity index 100% rename from providers/scaleup-storage/src/main/java/org/jclouds/scaleup/storage/ScaleUpStoragePropertiesBuilder.java rename to sandbox-providers/scaleup-storage/src/main/java/org/jclouds/scaleup/storage/ScaleUpStoragePropertiesBuilder.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/ScaleUpStorageClientLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/ScaleUpStorageClientLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/ScaleUpStorageClientLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/ScaleUpStorageClientLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobIntegrationLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobIntegrationLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobIntegrationLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobIntegrationLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobMapIntegrationLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobMapIntegrationLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobMapIntegrationLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobMapIntegrationLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobSignerLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobSignerLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobSignerLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageBlobSignerLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerIntegrationLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerIntegrationLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerIntegrationLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerIntegrationLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageContainerLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageInputStreamMapIntegrationLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageInputStreamMapIntegrationLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageInputStreamMapIntegrationLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageInputStreamMapIntegrationLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageServiceIntegrationLiveTest.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageServiceIntegrationLiveTest.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageServiceIntegrationLiveTest.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageServiceIntegrationLiveTest.java diff --git a/providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageTestInitializer.java b/sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageTestInitializer.java similarity index 100% rename from providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageTestInitializer.java rename to sandbox-providers/scaleup-storage/src/test/java/org/jclouds/scaleup/storage/blobstore/ScaleUpStorageTestInitializer.java diff --git a/providers/tiscali-storage/pom.xml b/sandbox-providers/tiscali-storage/pom.xml similarity index 100% rename from providers/tiscali-storage/pom.xml rename to sandbox-providers/tiscali-storage/pom.xml diff --git a/providers/tiscali-storage/src/main/java/org/jclouds/tiscali/storage/TiscaliStoragePropertiesBuilder.java b/sandbox-providers/tiscali-storage/src/main/java/org/jclouds/tiscali/storage/TiscaliStoragePropertiesBuilder.java similarity index 100% rename from providers/tiscali-storage/src/main/java/org/jclouds/tiscali/storage/TiscaliStoragePropertiesBuilder.java rename to sandbox-providers/tiscali-storage/src/main/java/org/jclouds/tiscali/storage/TiscaliStoragePropertiesBuilder.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/TiscaliStorageClientLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/TiscaliStorageClientLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/TiscaliStorageClientLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/TiscaliStorageClientLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobIntegrationLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobIntegrationLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobIntegrationLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobIntegrationLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobMapIntegrationLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobMapIntegrationLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobMapIntegrationLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobMapIntegrationLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobSignerLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobSignerLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobSignerLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageBlobSignerLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerIntegrationLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerIntegrationLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerIntegrationLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerIntegrationLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageContainerLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageInputStreamMapIntegrationLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageInputStreamMapIntegrationLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageInputStreamMapIntegrationLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageInputStreamMapIntegrationLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageServiceIntegrationLiveTest.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageServiceIntegrationLiveTest.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageServiceIntegrationLiveTest.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageServiceIntegrationLiveTest.java diff --git a/providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageTestInitializer.java b/sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageTestInitializer.java similarity index 100% rename from providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageTestInitializer.java rename to sandbox-providers/tiscali-storage/src/test/java/org/jclouds/tiscali/storage/blobstore/TiscaliStorageTestInitializer.java diff --git a/sandbox-providers/twitter/src/main/java/org/jclouds/twitter/TwitterContextBuilder.java b/sandbox-providers/twitter/src/main/java/org/jclouds/twitter/TwitterContextBuilder.java old mode 100755 new mode 100644 diff --git a/sandbox-providers/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java b/sandbox-providers/twitter/src/main/java/org/jclouds/twitter/config/TwitterRestClientModule.java old mode 100755 new mode 100644 diff --git a/sandbox-providers/twitter/src/test/resources/log4j.xml b/sandbox-providers/twitter/src/test/resources/log4j.xml old mode 100755 new mode 100644 diff --git a/scriptbuilder/src/test/resources/client_rb.sh b/scriptbuilder/src/test/resources/client_rb.sh old mode 100755 new mode 100644 diff --git a/scriptbuilder/src/test/resources/forget.cmd b/scriptbuilder/src/test/resources/forget.cmd old mode 100755 new mode 100644 diff --git a/scriptbuilder/src/test/resources/test_ebs.sh b/scriptbuilder/src/test/resources/test_ebs.sh old mode 100755 new mode 100644 diff --git a/scriptbuilder/src/test/resources/test_init.sh b/scriptbuilder/src/test/resources/test_init.sh old mode 100755 new mode 100644 diff --git a/skeletons/standalone-compute/src/test/resources/log4j.xml b/skeletons/standalone-compute/src/test/resources/log4j.xml old mode 100755 new mode 100644