You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/11/18 18:53:24 UTC
[05/17] jclouds git commit: JCLOUDS-692 Remove the CloudSigma v1
provider.
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSetTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSetTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSetTest.java
deleted file mode 100644
index 4959f4d..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSetTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.jclouds.cloudsigma.domain.DriveInfo;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Guice;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSetTest {
-
- private static final ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSet FN = Guice.createInjector().getInstance(
- ListOfKeyValuesDelimitedByBlankLinesToDriveInfoSet.class);
-
- public void testNone() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("").build()), ImmutableSet.<DriveInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("\n\n").build()), ImmutableSet.<DriveInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").build()), ImmutableSet.<DriveInfo> of());
- }
-
- public void testOne() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload(MapToDriveInfoTest.class
- .getResourceAsStream("/drive.txt")).build()), ImmutableSet.<DriveInfo> of(MapToDriveInfoTest.ONE));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToListOfMapsTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToListOfMapsTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToListOfMapsTest.java
deleted file mode 100644
index 7b7f0cf..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToListOfMapsTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ListOfKeyValuesDelimitedByBlankLinesToListOfMapsTest {
-
- private static final ListOfKeyValuesDelimitedByBlankLinesToListOfMaps FN = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps();
-
- public void testNone() {
- assertEquals(FN.apply(""), Lists.newArrayList());
- assertEquals(FN.apply("\n\n\n"), Lists.newArrayList());
- }
-
- public void testOneMap() {
- assertEquals(FN.apply("key1 value1\nkey2 value2"),
- ImmutableList.of(ImmutableMap.of("key1", "value1", "key2", "value2")));
- assertEquals(FN.apply("key1 value1\nkey2 value2\n\n"),
- ImmutableList.of(ImmutableMap.of("key1", "value1", "key2", "value2")));
- }
-
- public void testValueEncodesNewlines() {
- assertEquals(FN.apply("key1 value1\\n\nkey2 value2"),
- ImmutableList.of(ImmutableMap.of("key1", "value1\n", "key2", "value2")));
- }
-
- public void testTwoMaps() {
- assertEquals(
- FN.apply("key1 value1\nkey2 value2\n\nkey1 v1\nkey2 v2"),
- ImmutableList.of(ImmutableMap.of("key1", "value1", "key2", "value2"),
- ImmutableMap.of("key1", "v1", "key2", "v2")));
- assertEquals(
- FN.apply("key1 value1\nkey2 value2\n\nkey1 v1\nkey2 v2\n\n"),
- ImmutableList.of(ImmutableMap.of("key1", "value1", "key2", "value2"),
- ImmutableMap.of("key1", "v1", "key2", "v2")));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest.java
deleted file mode 100644
index 31f8fe0..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.List;
-import java.util.Map;
-
-import org.jclouds.cloudsigma.domain.Device;
-import org.jclouds.cloudsigma.domain.DriveMetrics;
-import org.jclouds.cloudsigma.domain.NIC;
-import org.jclouds.cloudsigma.domain.ServerInfo;
-import org.jclouds.cloudsigma.domain.ServerMetrics;
-import org.jclouds.cloudsigma.functions.MapToDevices.DeviceToId;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.TypeLiteral;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ListOfKeyValuesDelimitedByBlankLinesToServerInfoSetTest {
-
- private static final ListOfKeyValuesDelimitedByBlankLinesToServerInfoSet FN = Guice.createInjector(
- new AbstractModule() {
-
- @Override
- protected void configure() {
- bind(new TypeLiteral<Function<Map<String, String>, List<NIC>>>() {
- }).to(MapToNICs.class);
- bind(new TypeLiteral<Function<Map<String, String>, Map<String, ? extends Device>>>() {
- }).to(MapToDevices.class);
- bind(new TypeLiteral<Function<Map<String, String>, Map<String, ? extends DriveMetrics>>>() {
- }).to(MapToDriveMetrics.class);
- bind(new TypeLiteral<Function<Map<String, String>, ServerMetrics>>() {
- }).to(MapToServerMetrics.class);
- bind(new TypeLiteral<Function<Device, String>>() {
- }).to(DeviceToId.class);
- }
-
- }).getInstance(ListOfKeyValuesDelimitedByBlankLinesToServerInfoSet.class);
-
- public void testNone() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("").build()), ImmutableSet.<ServerInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("\n\n").build()),
- ImmutableSet.<ServerInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").build()), ImmutableSet.<ServerInfo> of());
- }
-
- public void testOne() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload(MapToServerInfoTest.class
- .getResourceAsStream("/servers.txt")).build()), ImmutableSet.<ServerInfo> of(MapToServerInfoTest.ONE,
- MapToServerInfoTest.TWO));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSetTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSetTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSetTest.java
deleted file mode 100644
index 8fe5a51..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSetTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.jclouds.cloudsigma.domain.VLANInfo;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Guice;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSetTest {
-
- private static final ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSet FN = Guice.createInjector().getInstance(
- ListOfKeyValuesDelimitedByBlankLinesToVLANInfoSet.class);
-
- public void testNone() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("").build()), ImmutableSet.<VLANInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("\n\n").build()), ImmutableSet.<VLANInfo> of());
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").build()), ImmutableSet.<VLANInfo> of());
- }
-
- public void testOne() {
- assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload(MapToVLANInfoTest.class
- .getResourceAsStream("/vlan.txt")).build()), ImmutableSet.<VLANInfo> of(MapToVLANInfoTest.ONE));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfMapsToListOfKeyValuesDelimitedByBlankLinesTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfMapsToListOfKeyValuesDelimitedByBlankLinesTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfMapsToListOfKeyValuesDelimitedByBlankLinesTest.java
deleted file mode 100644
index 7302f20..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ListOfMapsToListOfKeyValuesDelimitedByBlankLinesTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Map;
-
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ListOfMapsToListOfKeyValuesDelimitedByBlankLinesTest {
-
- private static final ListOfMapsToListOfKeyValuesDelimitedByBlankLines FN = new ListOfMapsToListOfKeyValuesDelimitedByBlankLines();
-
- public void testNone() {
- assertEquals(FN.apply(ImmutableList.<Map<String, String>> of()), "");
- }
-
- public void testOneMap() {
- assertEquals(
- FN.apply(ImmutableList.<Map<String, String>> of(ImmutableMap.of("key1", "value1", "key2", "value2"))),
- "key1 value1\nkey2 value2");
- }
-
- public void testValueEncodesNewlines() {
- assertEquals(
- FN.apply(ImmutableList.<Map<String, String>> of(ImmutableMap.of("key1", "value1\n", "key2", "value2"))),
- "key1 value1\\n\nkey2 value2");
- }
-
- public void testTwoMaps() {
- assertEquals(FN.apply(ImmutableList.<Map<String, String>> of(ImmutableMap.of("key1", "value1", "key2", "value2"),
- ImmutableMap.of("key1", "v1", "key2", "v2"))), "key1 value1\nkey2 value2\n\nkey1 v1\nkey2 v2");
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToDriveInfoTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToDriveInfoTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToDriveInfoTest.java
deleted file mode 100644
index d55af5e..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToDriveInfoTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.jclouds.cloudsigma.domain.ClaimType;
-import org.jclouds.cloudsigma.domain.DriveInfo;
-import org.jclouds.cloudsigma.domain.DriveMetrics;
-import org.jclouds.cloudsigma.domain.DriveStatus;
-import org.jclouds.cloudsigma.domain.DriveType;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class MapToDriveInfoTest {
- public static DriveInfo ONE = new DriveInfo.Builder()
- .status(DriveStatus.ACTIVE)
- .use(ImmutableSet.of("networking", "security", "gateway"))
- .name("Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System")
- .bits(64)
- .url(URI.create("http://www.ubuntu.com"))
- .metrics(
- new DriveMetrics.Builder().readBytes(4096l).writeBytes(8589938688l).readRequests(1l)
- .writeRequests(2097153l).build())
- .user("58ca3c1f-7629-4771-9b71-863f40153ba4")
- .encryptionCipher("aes-xts-plain")
- .encryptionKey("ba6c2a4897072e9f25920ed73bd522e9c10d89f30a215158cccf8d0f654ac643")
- .description("The Ubuntu Linux distribution brings the spirit of Ubuntu to the software world.")
- .tags(ImmutableSet.of("foo", "bar", "baz"))
- .uuid("b8171d28-755a-4271-b891-7998871a160e")
- .installNotes("first line\n\n")
- .os("linux")
- .claimType(ClaimType.SHARED)
- .claimed(
- ImmutableSet.of(
- "00109617-2c6b-424b-9cfa-5b572c17bafe:guest:692cd1c7-a863-4a22-8170-fc6e6feb68af:ide:0:0",
- "00031836-a624-4b22-bc7d-41ff8977087b:guest:a1414360-7c24-4730-8c97-180bf7775a71:ide:0:0",
- "0002c6df-a1d2-4d1d-96f0-f95405a28183:guest:386f1cc7-affc-49c1-82a5-2f8e412170e4:ide:0:0",
- "00031836-a624-4b22-bc7d-41ff8977087b:guest:17b076be-430d-4a76-9df3-b9896fec82a5:ide:0:0",
- "000663ee-9fb6-4461-90f6-01327a4aff07:guest:f83b519f-feab-42cf-859c-f61495681ada:ide:0:1"))//
- .driveType(ImmutableSet.of("installcd", "livecd"))//
- .autoexpanding(false).readers(ImmutableSet.of("ffffffff-ffff-ffff-ffff-ffffffffffff"))//
- .free(true)//
- .type(DriveType.DISK)//
- .size(8589934592l)//
- .build();
-
- private static final MapToDriveInfo MAP_TO_DRIVE = new MapToDriveInfo();
-
- public void testEmptyMapReturnsNull() {
- assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.<String, String> of()), null);
- }
-
- public void testBasics() {
- DriveInfo expects = new DriveInfo.Builder().name("foo").size(100l).metrics(new DriveMetrics.Builder().build())
- .build();
- assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.of("name", "foo", "size", "100")), expects);
- }
-
- public void testComplete() throws IOException {
-
- Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply(
- Strings2.toStringAndClose(MapToDriveInfoTest.class.getResourceAsStream("/drive.txt"))).get(0);
-
- assertEquals(MAP_TO_DRIVE.apply(input), ONE);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToProfileInfoTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToProfileInfoTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToProfileInfoTest.java
deleted file mode 100644
index 55ea043..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToProfileInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.jclouds.cloudsigma.domain.ProfileInfo;
-import org.jclouds.cloudsigma.domain.ProfileType;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class MapToProfileInfoTest {
- public static ProfileInfo ONE = new ProfileInfo.Builder().type(ProfileType.REGULAR)//
- .uuid("58ca3c1f-7629-4771-9b71-863f40153ba4")//
- .email("adrian@jclouds.org").firstName("Adrian").lastName("Cole").nickName("jclouds").build();
-
- private static final MapToProfileInfo MAP_TO_PROFILE = new MapToProfileInfo();
-
- public void testEmptyMapReturnsNull() {
- assertEquals(MAP_TO_PROFILE.apply(ImmutableMap.<String, String> of()), null);
- }
-
- public void test() throws IOException {
-
- Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply(
- Strings2.toStringAndClose(MapToProfileInfoTest.class.getResourceAsStream("/profile.txt"))).get(0);
-
- assertEquals(MAP_TO_PROFILE.apply(input), ONE);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java
deleted file mode 100644
index d0b46c6..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.Map;
-
-import org.jclouds.cloudsigma.domain.DriveMetrics;
-import org.jclouds.cloudsigma.domain.IDEDevice;
-import org.jclouds.cloudsigma.domain.MediaType;
-import org.jclouds.cloudsigma.domain.Model;
-import org.jclouds.cloudsigma.domain.NIC;
-import org.jclouds.cloudsigma.domain.ServerInfo;
-import org.jclouds.cloudsigma.domain.ServerMetrics;
-import org.jclouds.cloudsigma.domain.ServerStatus;
-import org.jclouds.cloudsigma.domain.VNC;
-import org.jclouds.cloudsigma.functions.MapToDevices.DeviceToId;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class MapToServerInfoTest {
- public static ServerInfo ONE = new ServerInfo.Builder()
- .persistent(true)
- .uuid("f8bee9cd-8e4b-4a05-8593-1314e3bfe49b")
- .cpu(2000)
- .bootDeviceIds(ImmutableSet.of("ide:0:0"))
- .smp(1)
- .mem(1024)
- .status(ServerStatus.ACTIVE)
- .started(new Date(1291493868l))
- .user("2f6244eb-50bc-4403-847e-f03cc3706a1f")
- .name("jo")
- .vnc(new VNC("46.20.114.124", "HfHzVmLT", false))
- .nics(ImmutableSet.of(new NIC.Builder()
- .model(Model.E1000)
- .dhcp("46.20.114.124")
- .block(
- ImmutableList.of("tcp/43594", "tcp/5902", "udp/5060", "tcp/5900", "tcp/5901", "tcp/21", "tcp/22",
- "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build()))
- .devices(
- ImmutableMap.of("ide:0:0",
- new IDEDevice.Builder(0, 0).uuid("4af85ed3-0caa-4736-8a26-a33d7de0a122").build()
-
- ))
- .metrics(
- new ServerMetrics.Builder()
- .tx(2550)
- .txPackets(31)
- .rx(455530)
- .rxPackets(7583)
- .driveMetrics(
- ImmutableMap.of("ide:0:0", new DriveMetrics.Builder().readRequests(11154)
- .readBytes(45686784).writeRequests(3698).writeBytes(15147008).build())).build())
- .build();
-
- public static ServerInfo TWO = new ServerInfo.Builder()
- .status(ServerStatus.STOPPED)
- .name("Demo")
- .mem(1024)
- .cpu(2000)
- .persistent(true)
- .uuid("0f962616-2071-4173-be79-7dd084271edf")
- .bootDeviceIds(ImmutableSet.of("ide:0:0"))
- .user("2f6244eb-50bc-4403-847e-f03cc3706a1f")
- .vnc(new VNC("auto", "HWbjvrg2", false))
- .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
- .devices(
- ImmutableMap.of(
- "ide:0:0",
- new IDEDevice.Builder(0, 0).uuid("853bb98a-4fff-4c2f-a265-97c363f19ea5")
- .mediaType(MediaType.CDROM).build()))
- .metrics(
- new ServerMetrics.Builder().driveMetrics(ImmutableMap.of("ide:0:0", new DriveMetrics.Builder().build()))
- .build()).build();
-
- private static final MapToServerInfo MAP_TO_DRIVE = new MapToServerInfo(new MapToDevices(new DeviceToId()),
- new MapToServerMetrics(new MapToDriveMetrics()), new MapToNICs());
-
- public void testEmptyMapReturnsNull() {
- assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.<String, String> of()), null);
- }
-
- public void testBasics() {
- ServerInfo expects = new ServerInfo.Builder().name("foo").uuid("hello").vnc(new VNC("auto", null, false))
- .cpu(1000).mem(2048).metrics(new ServerMetrics.Builder().build()).build();
- assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.of("name", "foo", "server", "hello", "vnc:ip", "auto", "cpu",
- "1000", "mem", "2048")), expects);
- }
-
- public void testComplete() throws IOException {
-
- Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply(
- Strings2.toStringAndClose(MapToServerInfoTest.class.getResourceAsStream("/servers.txt"))).get(0);
-
- assertEquals(MAP_TO_DRIVE.apply(input), ONE);
-
- }
-
- public static ServerInfo NEW = new ServerInfo.Builder()
- .persistent(true)
- .uuid("bd98615a-6f74-4d63-ad1e-b13338b9356a")
- .cpu(1000)
- .bootDeviceIds(ImmutableSet.of("ide:0:0"))
- .smp(1)
- .mem(512)
- .status(ServerStatus.ACTIVE)
- .started(new Date(1292695612))
- .user("2f6244eb-50bc-4403-847e-f03cc3706a1f")
- .name("adriancole.test")
- .vnc(new VNC("83.222.249.221", "XXXXXXXX", false))
- .nics(ImmutableSet.of(new NIC.Builder()
- .model(Model.E1000)
- .block(
- ImmutableList.of("tcp/43594", "tcp/5902", "udp/5060", "tcp/5900", "tcp/5901", "tcp/21", "tcp/22",
- "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build()))
- .devices(
- ImmutableMap.of("ide:0:0",
- new IDEDevice.Builder(0, 0).uuid("403c9a86-0aab-4e47-aa95-e9768021c4c1").build()
-
- ))
- .metrics(
- new ServerMetrics.Builder().driveMetrics(ImmutableMap.of("ide:0:0", new DriveMetrics.Builder().build()))
- .build()).build();
-
- public void testNew() throws IOException {
-
- Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply(
- Strings2.toStringAndClose(MapToServerInfoTest.class.getResourceAsStream("/new_server.txt"))).get(0);
-
- assertEquals(MAP_TO_DRIVE.apply(input), NEW);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToVLANInfoTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToVLANInfoTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToVLANInfoTest.java
deleted file mode 100644
index 5285e0e..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToVLANInfoTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.jclouds.cloudsigma.domain.VLANInfo;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class MapToVLANInfoTest {
- public static VLANInfo ONE = new VLANInfo.Builder()//
- .uuid("6e2d1f6a-03c8-422b-bc8e-d744612cf46a")//
- .name("My VLAN1").user("f2e19d5c-eaa1-44e5-94aa-dc194594bd7b").build();
- private static final MapToVLANInfo MAP_TO_VLAN = new MapToVLANInfo();
-
- public void testEmptyMapReturnsNull() {
- assertEquals(MAP_TO_VLAN.apply(ImmutableMap.<String, String> of()), null);
- }
-
- public void test() throws IOException {
-
- Map<String, String> input = new ListOfKeyValuesDelimitedByBlankLinesToListOfMaps().apply(
- Strings2.toStringAndClose(MapToVLANInfoTest.class.getResourceAsStream("/vlan.txt"))).get(0);
-
- assertEquals(MAP_TO_VLAN.apply(input), ONE);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ParseOsFamilyVersion64BitFromImageNameTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ParseOsFamilyVersion64BitFromImageNameTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ParseOsFamilyVersion64BitFromImageNameTest.java
deleted file mode 100644
index a6a3cd5..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ParseOsFamilyVersion64BitFromImageNameTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.collect.Lists.newArrayList;
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jclouds.cloudsigma.compute.functions.ParseOsFamilyVersion64BitFromImageName;
-import org.jclouds.compute.config.BaseComputeServiceContextModule;
-import org.jclouds.compute.domain.OsFamilyVersion64Bit;
-import org.jclouds.compute.reference.ComputeServiceConstants;
-import org.jclouds.json.Json;
-import org.jclouds.json.config.GsonModule;
-import org.jclouds.json.internal.GsonWrapper;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.gson.Gson;
-import com.google.inject.Guice;
-import com.google.inject.TypeLiteral;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit")
-public class ParseOsFamilyVersion64BitFromImageNameTest {
- Json json = new GsonWrapper(new Gson());
-
- @DataProvider(name = "data")
- public Object[][] createData() throws IOException {
- InputStream is = ParseOsFamilyVersion64BitFromImageNameTest.class.getResourceAsStream("/osmatches.json");
- Map<String, OsFamilyVersion64Bit> values = json.fromJson(Strings2.toStringAndClose(is),
- new TypeLiteral<Map<String, OsFamilyVersion64Bit>>() {
- }.getType());
-
- return newArrayList(
- transform(values.entrySet(), new Function<Map.Entry<String, OsFamilyVersion64Bit>, Object[]>() {
-
- @Override
- public Object[] apply(Entry<String, OsFamilyVersion64Bit> input) {
- return new Object[] { input.getKey(), input.getValue() };
- }
-
- })).toArray(new Object[][] {});
- }
-
- ParseOsFamilyVersion64BitFromImageName parser = new ParseOsFamilyVersion64BitFromImageName(new BaseComputeServiceContextModule() {
- }.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
- .getInstance(Json.class)));
-
- @Test(dataProvider = "data")
- public void test(String input, OsFamilyVersion64Bit expected) {
- assertEquals(parser.apply(input), expected);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ServerToMapTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ServerToMapTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ServerToMapTest.java
deleted file mode 100644
index bf11c47..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/ServerToMapTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import org.jclouds.cloudsigma.domain.IDEDevice;
-import org.jclouds.cloudsigma.domain.Model;
-import org.jclouds.cloudsigma.domain.NIC;
-import org.jclouds.cloudsigma.domain.Server;
-import org.jclouds.cloudsigma.domain.VNC;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class ServerToMapTest {
-
- private static final ServerToMap SERVER_TO_MAP = new ServerToMap();
-
- public void testBasics() {
- assertEquals(
- SERVER_TO_MAP.apply(new Server.Builder()
- .name("TestServer")
- .cpu(2000)
- .mem(1024)
- .devices(
- ImmutableMap.of("ide:0:0",
- new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
- .bootDeviceIds(ImmutableSet.of("ide:0:0")).nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).
-
- build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
- ImmutableMap
- .builder()
- .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
- .putAll(
- ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
- "08c92dd5-70a0-4f51-83d2-835919d254df"))
- .putAll(
- ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto",
- "vnc:password", "XXXXXXXX")).build());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/SplitNewlinesTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/SplitNewlinesTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/SplitNewlinesTest.java
deleted file mode 100644
index cf18f19..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/SplitNewlinesTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.functions;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableSortedSet;
-import com.google.inject.Guice;
-
-/**
- * Tests behavior of {@code NewlineDelimitedStringHandler}
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit")
-public class SplitNewlinesTest {
-
- static Function<HttpResponse, Set<String>> createParser() {
- return Guice.createInjector().getInstance(SplitNewlines.class);
- }
-
- public void test() {
- InputStream is = SplitNewlinesTest.class.getResourceAsStream("/uuids.txt");
- Set<String> list = createParser().apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());
- assertEquals(list, ImmutableSortedSet.of("7e8ab721-81c9-4cb9-a651-4cafbfe1501c",
- "ea6a8fdb-dab3-4d06-86c2-41a5835e6ed9", "74744450-d338-4087-b3b8-59b505110a57"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/handlers/CloudSigmaErrorHandlerTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/handlers/CloudSigmaErrorHandlerTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/handlers/CloudSigmaErrorHandlerTest.java
deleted file mode 100644
index 8692d7e..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/handlers/CloudSigmaErrorHandlerTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.handlers;
-
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.reportMatcher;
-import static org.easymock.EasyMock.verify;
-
-import java.net.URI;
-
-import org.easymock.IArgumentMatcher;
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.ResourceNotFoundException;
-import org.testng.annotations.Test;
-
-import com.google.inject.Guice;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = { "unit" })
-public class CloudSigmaErrorHandlerTest {
-
- @Test
- public void test400MakesIllegalArgumentException() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo"), 400, "", "Bad Request",
- IllegalArgumentException.class);
- }
-
- @Test
- public void test400MakesResourceNotFoundExceptionOnInfo() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo/info"), 400, "", "",
- ResourceNotFoundException.class);
- }
-
- @Test
- public void test400MakesResourceNotFoundExceptionOnMessageNotFound() {
- assertCodeMakes(
- "GET",
- URI.create("https://cloudsigma.com/foo"),
- 400,
- "",
- "errors:system Drive 8f9b42b1-26de-49ad-a3fd-d4fa06524339 could not be found. Please re-validate your entry.",
- ResourceNotFoundException.class);
- }
-
- @Test
- public void test401MakesAuthorizationException() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo"), 401, "", "Unauthorized",
- AuthorizationException.class);
- }
-
- @Test
- public void test404MakesResourceNotFoundException() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo"), 404, "", "Not Found",
- ResourceNotFoundException.class);
- }
-
- @Test
- public void test405MakesIllegalArgumentException() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo"), 405, "", "Method Not Allowed",
- IllegalArgumentException.class);
- }
-
- @Test
- public void test409MakesIllegalStateException() {
- assertCodeMakes("GET", URI.create("https://cloudsigma.com/foo"), 409, "", "Conflict",
- IllegalStateException.class);
- }
-
- private void assertCodeMakes(String method, URI uri, int statusCode, String message, String content,
- Class<? extends Exception> expected) {
- assertCodeMakes(method, uri, statusCode, message, "text/xml", content, expected);
- }
-
- private void assertCodeMakes(String method, URI uri, int statusCode, String message, String contentType,
- String content, Class<? extends Exception> expected) {
-
- CloudSigmaErrorHandler function = Guice.createInjector().getInstance(CloudSigmaErrorHandler.class);
-
- HttpCommand command = createMock(HttpCommand.class);
- HttpRequest request = HttpRequest.builder().method(method).endpoint(uri).build();
- HttpResponse response = HttpResponse.builder().statusCode(statusCode).message(message).payload(content).build();
- response.getPayload().getContentMetadata().setContentType(contentType);
-
- expect(command.getCurrentRequest()).andReturn(request).atLeastOnce();
- command.setException(classEq(expected));
-
- replay(command);
-
- function.handleError(command, response);
-
- verify(command);
- }
-
- public static Exception classEq(final Class<? extends Exception> in) {
- reportMatcher(new IArgumentMatcher() {
-
- @Override
- public void appendTo(StringBuffer buffer) {
- buffer.append("classEq(");
- buffer.append(in);
- buffer.append(")");
- }
-
- @Override
- public boolean matches(Object arg) {
- return arg.getClass() == in;
- }
-
- });
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/options/CloneDriveOptionsTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/options/CloneDriveOptionsTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/options/CloneDriveOptionsTest.java
deleted file mode 100644
index 763d072..0000000
--- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/options/CloneDriveOptionsTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.options;
-
-import static org.jclouds.cloudsigma.options.CloneDriveOptions.Builder.affinity;
-import static org.jclouds.cloudsigma.options.CloneDriveOptions.Builder.size;
-import static org.jclouds.cloudsigma.options.CloneDriveOptions.Builder.tags;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.cloudsigma.domain.AffinityType;
-import org.testng.annotations.Test;
-
-/**
- * Tests possible uses of CloneDriveOptions and CloneDriveOptions.Builder.*
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit")
-public class CloneDriveOptionsTest {
-
- @Test
- public void testNullSize() {
- CloneDriveOptions options = new CloneDriveOptions();
- assertNull(options.getOptions().get("size"));
- }
-
- @Test
- public void testSize() {
- CloneDriveOptions options = new CloneDriveOptions().size(1024);
- assertEquals(options.getOptions().get("size"), "1024");
- }
-
- @Test
- public void testSizeStatic() {
- CloneDriveOptions options = size(1024);
- assertEquals(options.getOptions().get("size"), "1024");
- }
-
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testSizeNegative() {
- size(-1);
- }
-
- @Test
- public void testNullTags() {
- CloneDriveOptions options = new CloneDriveOptions();
- assertNull(options.getOptions().get("tags"));
- }
-
- @Test
- public void testTags() {
- CloneDriveOptions options = new CloneDriveOptions().tags("foo", "bar", "baz");
- assertEquals(options.getOptions().get("tags"), "foo bar baz");
- }
-
- @Test
- public void testTagsStatic() {
- CloneDriveOptions options = tags("foo", "bar", "baz");
- assertEquals(options.getOptions().get("tags"), "foo bar baz");
- }
-
- @Test
- public void testHddAffinity() {
- CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.HDD);
- assertNull(options.getOptions().get("tags"));
- }
-
- @Test
- public void testHddAffinityStatic() {
- CloneDriveOptions options = affinity(AffinityType.HDD);
- assertNull(options.getOptions().get("tags"));
- }
-
- @Test
- public void testSsdAffinity() {
- CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.SSD);
- assertEquals(options.getOptions().get("tags"), "affinity:ssd");
- }
-
- @Test
- public void testSsdAffinityStatic() {
- CloneDriveOptions options = affinity(AffinityType.SSD);
- assertEquals(options.getOptions().get("tags"), "affinity:ssd");
- }
-
- @Test
- public void testHddAffinityBeforeTags() {
- CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.HDD);
- options.tags("foo", "bar", "baz");
- assertEquals(options.getOptions().get("tags"), "foo bar baz");
- }
-
- @Test
- public void testSsdAffinityBeforeTags() {
- CloneDriveOptions options = new CloneDriveOptions().affinity(AffinityType.SSD);
- options.tags("foo", "bar", "baz");
- assertEquals(options.getOptions().get("tags"), "foo bar baz affinity:ssd");
- }
-
- @Test
- public void testHddAffinityAfterTags() {
- CloneDriveOptions options = new CloneDriveOptions().tags("foo", "bar", "baz");
- options.affinity(AffinityType.HDD);
- assertEquals(options.getOptions().get("tags"), "foo bar baz");
- }
-
- @Test
- public void testSsdAffinityAfterTags() {
- CloneDriveOptions options = new CloneDriveOptions().tags("foo", "bar", "baz");
- options.affinity(AffinityType.SSD);
- assertEquals(options.getOptions().get("tags"), "foo bar baz affinity:ssd");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/create_drive.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/create_drive.txt b/apis/cloudsigma/src/test/resources/create_drive.txt
deleted file mode 100644
index 44ce187..0000000
--- a/apis/cloudsigma/src/test/resources/create_drive.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-name Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System
-size 8589934592
-claim:type shared
-readers ffffffff-ffff-ffff-ffff-ffffffffffff
-use tag1 tag2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/create_server.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/create_server.txt b/apis/cloudsigma/src/test/resources/create_server.txt
deleted file mode 100644
index 474d4d7..0000000
--- a/apis/cloudsigma/src/test/resources/create_server.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-name TestServer
-cpu 2000
-smp auto
-mem 1024
-persistent false
-boot ide:0:0
-ide:0:0 08c92dd5-70a0-4f51-83d2-835919d254df
-ide:0:0:media disk
-nic:0:model e1000
-vnc:ip auto
-vnc:password XXXXXXXX
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/drive.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/drive.txt b/apis/cloudsigma/src/test/resources/drive.txt
deleted file mode 100644
index 149c823..0000000
--- a/apis/cloudsigma/src/test/resources/drive.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-status active
-use networking security gateway
-name Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System
-bits 64
-url http://www.ubuntu.com
-read:bytes 4096
-user 58ca3c1f-7629-4771-9b71-863f40153ba4
-encryption:cipher aes-xts-plain
-encryption:key ba6c2a4897072e9f25920ed73bd522e9c10d89f30a215158cccf8d0f654ac643
-description The Ubuntu Linux distribution brings the spirit of Ubuntu to the software world.
-drive b8171d28-755a-4271-b891-7998871a160e
-install_notes first line\n\n
-os linux
-write:bytes 8589938688
-claim:type shared
-claimed 00109617-2c6b-424b-9cfa-5b572c17bafe:guest:692cd1c7-a863-4a22-8170-fc6e6feb68af:ide:0:0 00031836-a624-4b22-bc7d-41ff8977087b:guest:a1414360-7c24-4730-8c97-180bf7775a71:ide:0:0 0002c6df-a1d2-4d1d-96f0-f95405a28183:guest:386f1cc7-affc-49c1-82a5-2f8e412170e4:ide:0:0 00031836-a624-4b22-bc7d-41ff8977087b:guest:17b076be-430d-4a76-9df3-b9896fec82a5:ide:0:0 000663ee-9fb6-4461-90f6-01327a4aff07:guest:f83b519f-feab-42cf-859c-f61495681ada:ide:0:1
-drive_type installcd,livecd
-autoexpanding false
-tags foo bar baz
-readers ffffffff-ffff-ffff-ffff-ffffffffffff
-read:requests 1
-free true
-type disk
-write:requests 2097153
-size 8589934592
-user:foo bar
-user:baz raz
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/drive_data.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/drive_data.txt b/apis/cloudsigma/src/test/resources/drive_data.txt
deleted file mode 100644
index 74d7679..0000000
--- a/apis/cloudsigma/src/test/resources/drive_data.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-name Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System
-size 8589934592
-claim:type shared
-tags foo bar baz
-readers ffffffff-ffff-ffff-ffff-ffffffffffff
-use tag1 tag2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/log4j.xml b/apis/cloudsigma/src/test/resources/log4j.xml
deleted file mode 100644
index 63810d3..0000000
--- a/apis/cloudsigma/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
- <!--
- For more configuration infromation and examples see the Apache
- Log4j website: http://logging.apache.org/log4j/
- -->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
- debug="false">
-
- <!-- A time/date based rolling appender -->
- <appender name="WIREFILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="target/test-data/jclouds-wire.log" />
- <param name="Append" value="true" />
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd" />
-
- <param name="Threshold" value="TRACE" />
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
-
- <!--
- The full pattern: Date MS Priority [Category]
- (Thread:NDC) Message\n <param name="ConversionPattern"
- value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="target/test-data/jclouds.log" />
- <param name="Append" value="true" />
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd" />
-
- <param name="Threshold" value="TRACE" />
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
-
- <!--
- The full pattern: Date MS Priority [Category]
- (Thread:NDC) Message\n <param name="ConversionPattern"
- value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- A time/date based rolling appender -->
- <appender name="COMPUTEFILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="target/test-data/jclouds-compute.log" />
- <param name="Append" value="true" />
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd" />
-
- <param name="Threshold" value="TRACE" />
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
-
- <!--
- The full pattern: Date MS Priority [Category]
- (Thread:NDC) Message\n <param name="ConversionPattern"
- value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- A time/date based rolling appender -->
- <appender name="SSHFILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="target/test-data/jclouds-ssh.log" />
- <param name="Append" value="true" />
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd" />
-
- <param name="Threshold" value="TRACE" />
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
-
- <!--
- The full pattern: Date MS Priority [Category]
- (Thread:NDC) Message\n <param name="ConversionPattern"
- value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <appender name="ASYNCCOMPUTE" class="org.apache.log4j.AsyncAppender">
- <appender-ref ref="COMPUTEFILE" />
- </appender>
-
- <appender name="ASYNCSSH" class="org.apache.log4j.AsyncAppender">
- <appender-ref ref="SSHFILE" />
- </appender>
-
- <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
- <appender-ref ref="FILE" />
- </appender>
-
- <appender name="ASYNCWIRE" class="org.apache.log4j.AsyncAppender">
- <appender-ref ref="WIREFILE" />
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jclouds">
- <priority value="DEBUG" />
- <appender-ref ref="ASYNC" />
- </category>
-
- <category name="jclouds.headers">
- <priority value="DEBUG" />
- <appender-ref ref="ASYNCWIRE" />
- </category>
-
- <category name="jclouds.ssh">
- <priority value="DEBUG" />
- <appender-ref ref="ASYNCSSH" />
- </category>
-
- <category name="jclouds.wire">
- <priority value="DEBUG" />
- <appender-ref ref="ASYNCWIRE" />
- </category>
-
- <category name="jclouds.compute">
- <priority value="TRACE" />
- <appender-ref ref="ASYNCCOMPUTE" />
- </category>
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <priority value="WARN" />
- </root>
-
-</log4j:configuration>
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/new_server.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/new_server.txt b/apis/cloudsigma/src/test/resources/new_server.txt
deleted file mode 100644
index 1dfbad9..0000000
--- a/apis/cloudsigma/src/test/resources/new_server.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-ide:0:0:write:requests 0
-boot ide:0:0
-vnc:password XXXXXXXX
-ide:0:0 403c9a86-0aab-4e47-aa95-e9768021c4c1
-ide:0:0:read:requests 0
-ide:0:0:read:bytes 0
-vnc:ip 83.222.249.221
-tx:packets 0
-tx 0
-rx 0
-smp 1
-mem 512
-nic:0:model e1000
-status active
-started 1292695612
-rx:packets 0
-user 2f6244eb-50bc-4403-847e-f03cc3706a1f
-ide:0:0:media disk
-name adriancole.test
-persistent true
-nic:0:block tcp/43594 tcp/5902 udp/5060 tcp/5900 tcp/5901 tcp/21 tcp/22 tcp/23 tcp/25 tcp/110 tcp/143 tcp/43595
-server bd98615a-6f74-4d63-ad1e-b13338b9356a
-ide:0:0:write:bytes 0
-cpu 1000
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/osmatches.json
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/osmatches.json b/apis/cloudsigma/src/test/resources/osmatches.json
deleted file mode 100644
index 7b0b1fa..0000000
--- a/apis/cloudsigma/src/test/resources/osmatches.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "Ubuntu-10.04-20110917 pub": {
- "family": "UBUNTU",
- "version": "10.04",
- "is64Bit": true
- },
-
- "Ubuntu-11.04-20110917 pub": {
- "family": "UBUNTU",
- "version": "11.04",
- "is64Bit": true
- },
-
- "Centos-6.0-20110917 pub": {
- "family": "CENTOS",
- "version": "6.0",
- "is64Bit": true
- },
-
- "Centos-5.6-20110917 pub": {
- "family": "CENTOS",
- "version": "5.6",
- "is64Bit": true
- },
-
- "Ubuntu 10.04.1 LTS Desktop Edition 32bit Preinstalled System": {
- "family": "UBUNTU",
- "version": "10.04",
- "is64Bit": false
- },
-
- "Ubuntu 10.04 Server Edition Linux 64bit with Plesk": {
- "family": "UBUNTU",
- "version": "10.04",
- "is64Bit": true
- },
-
- "CentOS 5.5 Linux 64bit Preinstalled System": {
- "family": "CENTOS",
- "version": "5.5",
- "is64Bit": true
- },
-
- "Windows Server Standard 2008 R2 64bit English": {
- "family": "WINDOWS",
- "version": "2008 R2",
- "is64Bit": true
- },
-
- "Ubuntu 10.04 Server Edition Linux 64bit": {
- "family": "UBUNTU",
- "version": "10.04",
- "is64Bit": true
- },
-
- "Windows Server 2008 Standard 32bit English": {
- "family": "WINDOWS",
- "version": "2008",
- "is64Bit": false
- },
-
- "Windows Server 2008 Standard 32bit English pub": {
- "family": "WINDOWS",
- "version": "2008",
- "is64Bit": false
- },
-
-
- "Fedora 14 Linux 64bit Preinstalled System": {
- "family": "FEDORA",
- "version": "",
- "is64Bit": true
- },
-
- "CentOS 5.5 Linux 64bit Preinstalled System with AppFirst Monitoring pub": {
- "family": "CENTOS",
- "version": "5.5",
- "is64Bit": true
- },
-
-
- "Ubuntu 10.10 Server Edition LAMP Linux 64bit Preinstalled System": {
- "family": "UBUNTU",
- "version": "10.10",
- "is64Bit": true
- },
-
- "Ubuntu 10.10 Server Edition Linux 64bit Preinstalled System": {
- "family": "UBUNTU",
- "version": "10.10",
- "is64Bit": true
- },
-
- "Windows Server Web 2008 R2 64bit English": {
- "family": "WINDOWS",
- "version": "2008 R2",
- "is64Bit": true
- },
-
-
- "SQL Server Standard 2008 R2 - Windows Server Standard 2008 R2 - 64bit English": {
- "family": "WINDOWS",
- "version": "2008 R2",
- "is64Bit": true
- },
-
-
- "Ubuntu 10.10 Desktop Edition 64bit Preinstalled System": {
- "family": "UBUNTU",
- "version": "10.10",
- "is64Bit": true
- },
-
- "Ubuntu 10.04 Desktop Edition Linux 64bit Preinstalled System": {
- "family": "UBUNTU",
- "version": "10.04",
- "is64Bit": true
- },
-
- "Debian 5.0 Preinstalled": {
- "family": "DEBIAN",
- "version": "5.0",
- "is64Bit": true
- },
-
- "pfSense 2.0 BETA4-20101127-031119 Preinstalled System": {
- "family": "UNRECOGNIZED",
- "version": null,
- "is64Bit": true
- },
-
- "FreeBSD 8.1 Preinstalled Base System": {
- "family": "FREEBSD",
- "version": "",
- "is64Bit": true
- },
-
- "CentOS 5.5 Linux 64bit Preinstalled System with AppFirst Monitoring": {
- "family": "CENTOS",
- "version": "5.5",
- "is64Bit": true
- },
-
- "Fedora 13 Linux 64bit Preinstalled System": {
- "family": "FEDORA",
- "version": "",
- "is64Bit": true
- },
-
- "Windows Server 2003 Standard 32bit English": {
- "family": "WINDOWS",
- "version": "2003",
- "is64Bit": false
- },
-
- "Windows Server 2003 Standard 64bit English": {
- "family": "WINDOWS",
- "version": "2003",
- "is64Bit": true
- },
-
- "Debian 5.0 Preinstalled without X": {
- "family": "DEBIAN",
- "version": "5.0",
- "is64Bit": true
- },
-
- "Debian 6.0 No X Minimal Linux 64bit Preinstalled System": {
- "family": "DEBIAN",
- "version": "6.0",
- "is64Bit": true
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/profile.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/profile.txt b/apis/cloudsigma/src/test/resources/profile.txt
deleted file mode 100644
index dd71ea4..0000000
--- a/apis/cloudsigma/src/test/resources/profile.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-uuid 58ca3c1f-7629-4771-9b71-863f40153ba4
-email adrian@jclouds.org
-salutation
-first_name Adrian
-last_name Cole
-nick_name jclouds
-title Mr
-company Cloud Conscious, LLC.
-vat
-country US
-town 1200 Fulton St. #609
-language en
-currency USD
-address 1200 Fulton St. #609
-postcode 1200 Fulton St. #609
-phone 4153180253
-job_title
-location
-facebook
-twitter
-xing
-linkedin
-website
-signature
-ftp_disabled false
-api_disabled false
-api_https_only false
-type regular
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/servers.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/servers.txt b/apis/cloudsigma/src/test/resources/servers.txt
deleted file mode 100644
index a3d1ff1..0000000
--- a/apis/cloudsigma/src/test/resources/servers.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-ide:0:0:write:requests 3698
-boot ide:0:0
-vnc:password HfHzVmLT
-ide:0:0 4af85ed3-0caa-4736-8a26-a33d7de0a122
-ide:0:0:read:requests 11154
-ide:0:0:read:bytes 45686784
-vnc:ip 46.20.114.124
-tx:packets 31
-tx 2550
-rx 455530
-smp 1
-mem 1024
-nic:0:model e1000
-status active
-started 1291493868
-rx:packets 7583
-user 2f6244eb-50bc-4403-847e-f03cc3706a1f
-name jo
-persistent true
-nic:0:block tcp/43594 tcp/5902 udp/5060 tcp/5900 tcp/5901 tcp/21 tcp/22 tcp/23 tcp/25 tcp/110 tcp/143 tcp/43595
-server f8bee9cd-8e4b-4a05-8593-1314e3bfe49b
-nic:0:dhcp 46.20.114.124
-ide:0:0:write:bytes 15147008
-cpu 2000
-
-status stopped
-name Demo
-mem 1024
-boot ide:0:0
-vnc:password HWbjvrg2
-persistent true
-server 0f962616-2071-4173-be79-7dd084271edf
-smp auto
-nic:0:dhcp auto
-user 2f6244eb-50bc-4403-847e-f03cc3706a1f
-nic:0:model e1000
-vnc:ip auto
-ide:0:0 853bb98a-4fff-4c2f-a265-97c363f19ea5
-cpu 2000
-ide:0:0:media cdrom
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/uuids.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/uuids.txt b/apis/cloudsigma/src/test/resources/uuids.txt
deleted file mode 100644
index 092a4f8..0000000
--- a/apis/cloudsigma/src/test/resources/uuids.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-7e8ab721-81c9-4cb9-a651-4cafbfe1501c
-ea6a8fdb-dab3-4d06-86c2-41a5835e6ed9
-74744450-d338-4087-b3b8-59b505110a57
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/cloudsigma/src/test/resources/vlan.txt
----------------------------------------------------------------------
diff --git a/apis/cloudsigma/src/test/resources/vlan.txt b/apis/cloudsigma/src/test/resources/vlan.txt
deleted file mode 100644
index f98a134..0000000
--- a/apis/cloudsigma/src/test/resources/vlan.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-resource 6e2d1f6a-03c8-422b-bc8e-d744612cf46a
-type vlan
-user f2e19d5c-eaa1-44e5-94aa-dc194594bd7b
-name My VLAN1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/apis/pom.xml
----------------------------------------------------------------------
diff --git a/apis/pom.xml b/apis/pom.xml
index 6ad53d6..e374d04 100644
--- a/apis/pom.xml
+++ b/apis/pom.xml
@@ -31,7 +31,6 @@
<name>jclouds apis project</name>
<modules>
<module>cloudwatch</module>
- <module>cloudsigma</module>
<module>cloudstack</module>
<module>filesystem</module>
<module>byon</module>
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/pom.xml
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/pom.xml b/providers/cloudsigma-lvs/pom.xml
deleted file mode 100644
index 7730086..0000000
--- a/providers/cloudsigma-lvs/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-project</artifactId>
- <version>1.7.4-SNAPSHOT</version>
- <relativePath>../../project/pom.xml</relativePath>
- </parent>
- <groupId>org.apache.jclouds.provider</groupId>
- <artifactId>cloudsigma-lvs</artifactId>
- <name>jclouds CloudSigma provider</name>
- <description>ComputeService binding to the CloudSigma datacenter in SuperNAP Las Vegas</description>
- <packaging>bundle</packaging>
-
- <properties>
- <test.cloudsigma-lvs.endpoint>https://api.lvs.cloudsigma.com</test.cloudsigma-lvs.endpoint>
- <test.cloudsigma-lvs.api-version>1.0</test.cloudsigma-lvs.api-version>
- <test.cloudsigma-lvs.build-version />
- <test.cloudsigma-lvs.identity>FIXME</test.cloudsigma-lvs.identity>
- <test.cloudsigma-lvs.credential>FIXME</test.cloudsigma-lvs.credential>
- <test.cloudsigma-lvs.template />
- <jclouds.osgi.export>org.jclouds.cloudsigma*;version="${project.version}"</jclouds.osgi.export>
- <jclouds.osgi.import>
- org.jclouds.compute.internal;version="${project.version}",
- org.jclouds.rest.internal;version="${project.version}",
- org.jclouds*;version="${project.version}",
- *
- </jclouds.osgi.import>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>cloudsigma</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>cloudsigma</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-compute</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-log4j</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-sshj</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>live</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>integration</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <systemPropertyVariables>
- <test.cloudsigma-lvs.endpoint>${test.cloudsigma-lvs.endpoint}</test.cloudsigma-lvs.endpoint>
- <test.cloudsigma-lvs.api-version>${test.cloudsigma-lvs.api-version}</test.cloudsigma-lvs.api-version>
- <test.cloudsigma-lvs.build-version>${test.cloudsigma-lvs.build-version}</test.cloudsigma-lvs.build-version>
- <test.cloudsigma-lvs.identity>${test.cloudsigma-lvs.identity}</test.cloudsigma-lvs.identity>
- <test.cloudsigma-lvs.credential>${test.cloudsigma-lvs.credential}</test.cloudsigma-lvs.credential>
- <test.cloudsigma-lvs.template>${test.cloudsigma-lvs.template}</test.cloudsigma-lvs.template>
- </systemPropertyVariables>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
-
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/src/main/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderMetadata.java
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/src/main/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderMetadata.java b/providers/cloudsigma-lvs/src/main/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderMetadata.java
deleted file mode 100644
index aa9b97e..0000000
--- a/providers/cloudsigma-lvs/src/main/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderMetadata.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.providers.internal.BaseProviderMetadata;
-
-/**
- * Implementation of {@link org.jclouds.types.ProviderMetadata} for CloudSigma Las Vegas.
-
- *
- * @author Adrian Cole
- */
-public class CloudSigmaLasVegasProviderMetadata extends BaseProviderMetadata {
-
- public static Builder builder() {
- return new Builder();
- }
-
- @Override
- public Builder toBuilder() {
- return builder().fromProviderMetadata(this);
- }
-
- public CloudSigmaLasVegasProviderMetadata() {
- super(builder());
- }
-
- public CloudSigmaLasVegasProviderMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- Properties properties = new Properties();
- return properties;
- }
-
- public static class Builder
- extends
- BaseProviderMetadata.Builder {
-
- protected Builder() {
- id("cloudsigma-lvs")
- .name("CloudSigma Las Vegas")
- .apiMetadata(new CloudSigmaApiMetadata())
- .homepage(URI.create("http://www.cloudsigma.com/en/our-cloud/features"))
- .console(URI.create("https://gui.lvs.cloudsigma.com/"))
- .iso3166Codes("US-NV")
- .endpoint("https://api.lvs.cloudsigma.com")
- .defaultProperties(CloudSigmaLasVegasProviderMetadata.defaultProperties());
- }
-
- @Override
- public CloudSigmaLasVegasProviderMetadata build() {
- return new CloudSigmaLasVegasProviderMetadata(this);
- }
-
- @Override
- public Builder fromProviderMetadata(
- ProviderMetadata in) {
- super.fromProviderMetadata(in);
- return this;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/cloudsigma-lvs/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
deleted file mode 100644
index 8f7f34d..0000000
--- a/providers/cloudsigma-lvs/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
+++ /dev/null
@@ -1 +0,0 @@
-org.jclouds.cloudsigma.CloudSigmaLasVegasProviderMetadata
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasLondonClientLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasLondonClientLiveTest.java b/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasLondonClientLiveTest.java
deleted file mode 100644
index aeefaf5..0000000
--- a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasLondonClientLiveTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma;
-
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "live", singleThreaded = true)
-public class CloudSigmaLasVegasLondonClientLiveTest extends CloudSigmaClientLiveTest {
- public CloudSigmaLasVegasLondonClientLiveTest() {
- provider = "cloudsigma-lvs";
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderTest.java
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderTest.java b/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderTest.java
deleted file mode 100644
index 22adc5d..0000000
--- a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/CloudSigmaLasVegasProviderTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma;
-
-import org.jclouds.providers.internal.BaseProviderMetadataTest;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "CloudSigmaLasVegasProviderTest")
-public class CloudSigmaLasVegasProviderTest extends BaseProviderMetadataTest {
-
- public CloudSigmaLasVegasProviderTest() {
- super(new CloudSigmaLasVegasProviderMetadata(), new CloudSigmaApiMetadata());
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/d07cf7fa/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasComputeServiceLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasComputeServiceLiveTest.java b/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasComputeServiceLiveTest.java
deleted file mode 100644
index affe922..0000000
--- a/providers/cloudsigma-lvs/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaLasVegasComputeServiceLiveTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudsigma.compute;
-
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "live", singleThreaded = true, testName = "CloudSigmaLasVegasComputeServiceLiveTest")
-public class CloudSigmaLasVegasComputeServiceLiveTest extends CloudSigmaComputeServiceLiveTest {
-
- public CloudSigmaLasVegasComputeServiceLiveTest() {
- provider = "cloudsigma-lvs";
- }
-
-}