Repository: jclouds-labs Updated Branches: refs/heads/master 39cd6698e -> 54109d772
JCLOUDS-1154 oneandone-publicip-api Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/54109d77 Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs/tree/54109d77 Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs/diff/54109d77 Branch: refs/heads/master Commit: 54109d7720ea324af34efb4dfcbca1dbb33ea11e Parents: 39cd669 Author: alibazlamit <ali@ali-G751JT> Authored: Thu Sep 1 15:05:34 2016 +0200 Committer: Ignasi Barrera <[email protected]> Committed: Thu Sep 1 16:20:27 2016 +0200 ---------------------------------------------------------------------- .../jclouds/oneandone/rest/OneAndOneApi.java | 4 + .../jclouds/oneandone/rest/domain/PublicIp.java | 100 ++++++++++++ .../jclouds/oneandone/rest/domain/Types.java | 10 ++ .../oneandone/rest/features/PublicIpApi.java | 76 +++++++++ .../rest/features/PublicIpApiLiveTest.java | 83 ++++++++++ .../rest/features/PublicIpApiMockTest.java | 163 +++++++++++++++++++ oneandone/src/test/resources/publicip/get.json | 15 ++ oneandone/src/test/resources/publicip/list.json | 59 +++++++ .../test/resources/publicip/list.options.json | 59 +++++++ .../src/test/resources/sharedStorage/get.json | 24 --- .../resources/sharedStorage/list.access.json | 24 --- .../src/test/resources/sharedStorage/list.json | 62 ------- .../resources/sharedStorage/list.options.json | 62 ------- .../resources/sharedStorage/server.get.json | 5 - .../resources/sharedStorage/servers.list.json | 12 -- 15 files changed, 569 insertions(+), 189 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java ---------------------------------------------------------------------- diff --git a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java index da15356..cfd08a9 100644 --- a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java +++ b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java @@ -20,6 +20,7 @@ import java.io.Closeable; import org.apache.jclouds.oneandone.rest.features.FirewallPolicyApi; import org.apache.jclouds.oneandone.rest.features.ImageApi; import org.apache.jclouds.oneandone.rest.features.LoadBalancerApi; +import org.apache.jclouds.oneandone.rest.features.PublicIpApi; import org.apache.jclouds.oneandone.rest.features.ServerApi; import org.apache.jclouds.oneandone.rest.features.SharedStorageApi; import org.jclouds.rest.annotations.Delegate; @@ -40,4 +41,7 @@ public interface OneAndOneApi extends Closeable { @Delegate LoadBalancerApi loadBalancerApi(); + + @Delegate + PublicIpApi publicIpApi(); } http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/PublicIp.java ---------------------------------------------------------------------- diff --git a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/PublicIp.java b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/PublicIp.java new file mode 100644 index 0000000..1f32b69 --- /dev/null +++ b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/PublicIp.java @@ -0,0 +1,100 @@ +/* + * 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.apache.jclouds.oneandone.rest.domain; + +import com.google.auto.value.AutoValue; +import org.apache.jclouds.oneandone.rest.domain.Types.IPOwner; +import org.apache.jclouds.oneandone.rest.domain.Types.IPType; +import org.jclouds.javax.annotation.Nullable; +import org.jclouds.json.SerializedNames; + +@AutoValue +public abstract class PublicIp { + + public abstract String id(); + + public abstract String ip(); + + public abstract IPType type(); + + @Nullable + public abstract AssignedTo assignedTo(); + + @Nullable + public abstract String reverseDns(); + + public abstract boolean isDhcp(); + + @Nullable + public abstract String state(); + + @Nullable + public abstract String creationDate(); + + @Nullable + public abstract DataCenter datacenter(); + + @AutoValue + public abstract static class AssignedTo { + + public abstract String id(); + + public abstract String name(); + + public abstract IPOwner type(); + + @SerializedNames({"id", "name", "type"}) + public static AssignedTo create(String id, String name, IPOwner type) { + return new AutoValue_PublicIp_AssignedTo(id, name, type); + } + } + + @SerializedNames({"id", "ip", "type", "assigned_to", "reverse_dns", "is_dhcp", "state", "creation_date", "datacenter"}) + public static PublicIp create(String id, String ip, IPType type, AssignedTo assignedTo, String reverseDns, boolean isDhcp, String state, String creationDate, DataCenter datacenter) { + return new AutoValue_PublicIp(id, ip, type, assignedTo, reverseDns, isDhcp, state, creationDate, datacenter); + } + + @AutoValue + public abstract static class CreatePublicIp { + + @Nullable + public abstract String reverseDns(); + + @Nullable + public abstract String dataCenterId(); + + @Nullable + public abstract IPType type(); + + @SerializedNames({"reverse_dns", "datacenter_id", "type"}) + public static CreatePublicIp create(final String reverseDns, final String dataCenterId, IPType type) { + return new AutoValue_PublicIp_CreatePublicIp(reverseDns, dataCenterId, type); + } + } + + @AutoValue + public abstract static class UpdatePublicIp { + + @Nullable + public abstract String reverseDns(); + + @SerializedNames({"reverse_dns"}) + public static UpdatePublicIp create(final String reverseDns) { + return new AutoValue_PublicIp_UpdatePublicIp(reverseDns); + } + } +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Types.java ---------------------------------------------------------------------- diff --git a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Types.java b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Types.java index 695dc2e..b9dc4c1 100644 --- a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Types.java +++ b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Types.java @@ -177,4 +177,14 @@ public class Types { return Enums.getIfPresent(HealthCheckTestTypes.class, v).or(UNRECOGNIZED); } } + + public enum IPOwner { + + SERVER, LOAD_BALANCER, UNRECOGNIZED; + + public static IPOwner fromValue(String v) { + return Enums.getIfPresent(IPOwner.class, v).or(UNRECOGNIZED); + } + + } } http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/PublicIpApi.java ---------------------------------------------------------------------- diff --git a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/PublicIpApi.java b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/PublicIpApi.java new file mode 100644 index 0000000..5b9d5e0 --- /dev/null +++ b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/PublicIpApi.java @@ -0,0 +1,76 @@ +/* + * 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.apache.jclouds.oneandone.rest.features; + +import java.util.List; +import javax.inject.Named; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import org.apache.jclouds.oneandone.rest.domain.PublicIp; +import org.apache.jclouds.oneandone.rest.domain.options.GenericQueryOptions; +import org.apache.jclouds.oneandone.rest.filters.AuthenticateRequest; +import org.jclouds.Fallbacks; +import org.jclouds.rest.annotations.BinderParam; +import org.jclouds.rest.annotations.Fallback; +import org.jclouds.rest.annotations.MapBinder; +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.binders.BindToJsonPayload; + +@Path("/public_ips") +@Produces("application/json") +@Consumes("application/json") +@RequestFilters(AuthenticateRequest.class) +public interface PublicIpApi { + + @Named("publisips:list") + @GET + @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class) + List<PublicIp> list(); + + @Named("publisips:list") + @GET + @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class) + List<PublicIp> list(GenericQueryOptions options); + + @Named("publisips:get") + @GET + @Path("/{publicIpId}") + @Fallback(Fallbacks.NullOnNotFoundOr404.class) + PublicIp get(@PathParam("publicIpId") String publicIpId); + + @Named("publisips:create") + @POST + PublicIp create(@BinderParam(BindToJsonPayload.class) PublicIp.CreatePublicIp publicIp); + + @Named("publisips:update") + @PUT + @Path("/{publicIpId}") + PublicIp update(@PathParam("publicIpId") String publicIpId, @BinderParam(BindToJsonPayload.class) PublicIp.UpdatePublicIp publicIp); + + @Named("publisips:delete") + @DELETE + @Path("/{publicIpId}") + @Fallback(Fallbacks.NullOnNotFoundOr404.class) + @MapBinder(BindToJsonPayload.class) + PublicIp delete(@PathParam("publicIpId") String publicIpId); +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiLiveTest.java ---------------------------------------------------------------------- diff --git a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiLiveTest.java b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiLiveTest.java new file mode 100644 index 0000000..6f8e98e --- /dev/null +++ b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiLiveTest.java @@ -0,0 +1,83 @@ +/* + * 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.apache.jclouds.oneandone.rest.features; + +import java.util.List; +import org.apache.jclouds.oneandone.rest.domain.PublicIp; +import org.apache.jclouds.oneandone.rest.domain.Types; +import org.apache.jclouds.oneandone.rest.domain.options.GenericQueryOptions; +import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneLiveTest; +import org.testng.Assert; +import static org.testng.Assert.assertEquals; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +@Test(groups = "live", testName = "PublicIpApiLiveTest") +public class PublicIpApiLiveTest extends BaseOneAndOneLiveTest { + + private PublicIp currentPublicIp; + private List<PublicIp> publicIps; + + private PublicIpApi publicIpApi() { + return api.publicIpApi(); + } + + @BeforeClass + public void setupTest() { + currentPublicIp = publicIpApi().create(PublicIp.CreatePublicIp.create("jcloudsdns.com", null, Types.IPType.IPV4)); + } + + @Test + public void testList() { + publicIps = publicIpApi().list(); + + Assert.assertTrue(publicIps.size() > 0); + } + + @Test + public void testListWithOption() { + GenericQueryOptions options = new GenericQueryOptions(); + options.options(0, 0, null, "jclouds", null); + List<PublicIp> resultWithQuery = publicIpApi().list(options); + + Assert.assertTrue(resultWithQuery.size() > 0); + } + + @Test + public void testGet() { + PublicIp result = publicIpApi().get(currentPublicIp.id()); + + assertEquals(result.id(), currentPublicIp.id()); + } + + @Test + public void testUpdate() throws InterruptedException { + String updatedName = "updatejcloudsdns.com"; + + PublicIp updateResult = publicIpApi().update(currentPublicIp.id(), PublicIp.UpdatePublicIp.create(updatedName)); + assertEquals(updateResult.reverseDns(), updatedName); + } + + @AfterClass(alwaysRun = true) + public void teardownTest() throws InterruptedException { + if (currentPublicIp != null) { + publicIpApi().delete(currentPublicIp.id()); + } + } + +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiMockTest.java ---------------------------------------------------------------------- diff --git a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiMockTest.java b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiMockTest.java new file mode 100644 index 0000000..c833ee4 --- /dev/null +++ b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PublicIpApiMockTest.java @@ -0,0 +1,163 @@ +/* + * 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.apache.jclouds.oneandone.rest.features; + +import com.squareup.okhttp.mockwebserver.MockResponse; +import java.util.List; +import org.apache.jclouds.oneandone.rest.domain.PublicIp; +import org.apache.jclouds.oneandone.rest.domain.Types; +import org.apache.jclouds.oneandone.rest.domain.options.GenericQueryOptions; +import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneApiMockTest; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import org.testng.annotations.Test; + +@Test(groups = "unit", testName = "PublicIpApiMockTest", singleThreaded = true) +public class PublicIpApiMockTest extends BaseOneAndOneApiMockTest { + + private PublicIpApi publicIpApi() { + return api.publicIpApi(); + } + + @Test + public void testList() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/list.json")) + ); + + List<PublicIp> publicIps = publicIpApi().list(); + + assertNotNull(publicIps); + assertEquals(publicIps.size(), 3); + + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips"); + } + + @Test + public void testList404() throws InterruptedException { + server.enqueue( + new MockResponse().setResponseCode(404)); + + List<PublicIp> publicIps = publicIpApi().list(); + + assertEquals(publicIps.size(), 0); + + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips"); + } + + @Test + public void testListWithOption() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/list.options.json")) + ); + GenericQueryOptions options = new GenericQueryOptions(); + options.options(0, 0, null, "New", null); + List<PublicIp> publicIps = publicIpApi().list(options); + + assertNotNull(publicIps); + assertEquals(publicIps.size(), 3); + + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips?q=New"); + } + + @Test + public void testListWithOption404() throws InterruptedException { + server.enqueue( + new MockResponse().setResponseCode(404)); + + GenericQueryOptions options = new GenericQueryOptions(); + options.options(0, 0, null, "New", null); + List<PublicIp> publicIps = publicIpApi().list(options); + + assertEquals(publicIps.size(), 0); + + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips?q=New"); + } + + public void testGet() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/get.json")) + ); + PublicIp result = publicIpApi().get("publicipId"); + + assertNotNull(result); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips/publicipId"); + } + + public void testGet404() throws InterruptedException { + server.enqueue( + new MockResponse().setResponseCode(404)); + PublicIp result = publicIpApi().get("publicipId"); + + assertEquals(result, null); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "GET", "/public_ips/publicipId"); + } + + @Test + public void testCreate() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/get.json")) + ); + + PublicIp response = publicIpApi().create(PublicIp.CreatePublicIp.create("reverseDns", "datacentarId", Types.IPType.IPV4)); + + assertNotNull(response); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "POST", "/public_ips", "{\"reverse_dns\":\"reverseDns\",\"datacenter_id\":\"datacentarId\",\"type\":\"IPV4\"}"); + } + + @Test + public void testUpdate() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/get.json")) + ); + PublicIp response = publicIpApi().update("publicipId", PublicIp.UpdatePublicIp.create("reverseDns")); + + assertNotNull(response); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "PUT", "/public_ips/publicipId", "{\"reverse_dns\":\"reverseDns\"}"); + } + + @Test + public void testDelete() throws InterruptedException { + server.enqueue( + new MockResponse().setBody(stringFromResource("/publicip/get.json")) + ); + PublicIp response = publicIpApi().delete("publicipId"); + + assertNotNull(response); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "DELETE", "/public_ips/publicipId"); + } + + @Test + public void testDelete404() throws InterruptedException { + server.enqueue( + new MockResponse().setResponseCode(404)); + PublicIp response = publicIpApi().delete("publicipId"); + + assertEquals(response, null); + assertEquals(server.getRequestCount(), 1); + assertSent(server, "DELETE", "/public_ips/publicipId"); + } +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/publicip/get.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/publicip/get.json b/oneandone/src/test/resources/publicip/get.json new file mode 100644 index 0000000..a731661 --- /dev/null +++ b/oneandone/src/test/resources/publicip/get.json @@ -0,0 +1,15 @@ +{ + "id": "F77CC589EBC120905B4F4719217BFF6D", + "ip": "10.5.132.106", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": null, + "reverse_dns": null, + "is_dhcp": false, + "state": "ACTIVE", + "creation_date": "2015-04-30T09:44:28+00:00" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/publicip/list.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/publicip/list.json b/oneandone/src/test/resources/publicip/list.json new file mode 100644 index 0000000..30f2ec3 --- /dev/null +++ b/oneandone/src/test/resources/publicip/list.json @@ -0,0 +1,59 @@ +[ + { + "id": "569FA2EC06DD48C9E8635F3384A018DB", + "ip": "10.5.138.52", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "B23F1B4F84E983B4FEDD5459E877058A", + "name": "My load balancer", + "type": "LOAD_BALANCER" + }, + "reverse_dns": null, + "is_dhcp": false, + "state": "ACTIVE", + "creation_date": "2015-03-03T11:12:10+00:00" + }, + { + "id": "6F033A13C3EFCE0FB60783280A118D63", + "ip": "10.5.133.191", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "BDAF0EC6A36E9E554B80B7E7365821F5", + "name": "My Server 1", + "type": "SERVER" + }, + "reverse_dns": null, + "is_dhcp": true, + "state": "ACTIVE", + "creation_date": "2015-05-04T07:21:37+00:00" + }, + { + "id": "39C73A57B33DAF2F9FA1EBEA4C301FCF", + "ip": "10.5.138.81", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "B23F1B4F84E983B4FEDD5459E877058A", + "name": "My load balancer", + "type": "LOAD_BALANCER" + }, + "reverse_dns": null, + "is_dhcp": false, + "state": "ACTIVE", + "creation_date": "2015-03-03T11:13:16+00:00" + } +] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/publicip/list.options.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/publicip/list.options.json b/oneandone/src/test/resources/publicip/list.options.json new file mode 100644 index 0000000..30f2ec3 --- /dev/null +++ b/oneandone/src/test/resources/publicip/list.options.json @@ -0,0 +1,59 @@ +[ + { + "id": "569FA2EC06DD48C9E8635F3384A018DB", + "ip": "10.5.138.52", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "B23F1B4F84E983B4FEDD5459E877058A", + "name": "My load balancer", + "type": "LOAD_BALANCER" + }, + "reverse_dns": null, + "is_dhcp": false, + "state": "ACTIVE", + "creation_date": "2015-03-03T11:12:10+00:00" + }, + { + "id": "6F033A13C3EFCE0FB60783280A118D63", + "ip": "10.5.133.191", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "BDAF0EC6A36E9E554B80B7E7365821F5", + "name": "My Server 1", + "type": "SERVER" + }, + "reverse_dns": null, + "is_dhcp": true, + "state": "ACTIVE", + "creation_date": "2015-05-04T07:21:37+00:00" + }, + { + "id": "39C73A57B33DAF2F9FA1EBEA4C301FCF", + "ip": "10.5.138.81", + "type": "IPV4", + "datacenter": { + "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", + "location": "USA", + "country_code": "US" + }, + "assigned_to": { + "id": "B23F1B4F84E983B4FEDD5459E877058A", + "name": "My load balancer", + "type": "LOAD_BALANCER" + }, + "reverse_dns": null, + "is_dhcp": false, + "state": "ACTIVE", + "creation_date": "2015-03-03T11:13:16+00:00" + } +] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/get.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/get.json b/oneandone/src/test/resources/sharedStorage/get.json deleted file mode 100644 index 7f3d370..0000000 --- a/oneandone/src/test/resources/sharedStorage/get.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "6AD2F180B7B666539EF75A02FE227084", - "size": 200, - "state": "ACTIVE", - "description": "My shared storage test description", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "cloudpanel_id": "vid35780", - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage test", - "creation_date": "2015-05-06T08:33:25+00:00", - "servers": [ - { - "id": "638ED28205B1AFD7ADEF569C725DD85F", - "name": "My server 1", - "rights": "RW" - } - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/list.access.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/list.access.json b/oneandone/src/test/resources/sharedStorage/list.access.json deleted file mode 100644 index 6b72404..0000000 --- a/oneandone/src/test/resources/sharedStorage/list.access.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "state": "CONFIGURING", - "kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQAASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==", - "needs_password_reset": 0, - "user_domain": "nas2\\uid183564" - }, - { - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB789536", - "location": "Spain", - "country_code": "ES" - }, - "state": "CONFIGURING", - "kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQQASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==", - "needs_password_reset": 0, - "user_domain": "nas2\\uid183564" - } -] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/list.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/list.json b/oneandone/src/test/resources/sharedStorage/list.json deleted file mode 100644 index d9c8c93..0000000 --- a/oneandone/src/test/resources/sharedStorage/list.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "id": "6AD2F180B7B666539EF75A02FE227084", - "size": 200, - "state": "ACTIVE", - "description": "My shared storage test description", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "cloudpanel_id": "vid35780", - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage test", - "creation_date": "2015-05-06T08:33:25+00:00", - "servers": [ - { - "id": "638ED28205B1AFD7ADEF569C725DD85F", - "name": "My server 1", - "rights": "RW" - } - ] - }, - { - "id": "4406CE4723BB441C7956E25C51CE8C1B", - "size": 50, - "state": "ACTIVE", - "description": "My shared storage description", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "cloudpanel_id": "vid30534", - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage", - "creation_date": "2015-03-17T11:57:48+00:00", - "servers": [] - }, - { - "id": "1A5418172DD3BD39F8010A6633F1018A", - "size": 250, - "state": "ACTIVE", - "description": null, - "cloudpanel_id": "vid19857", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage 2", - "creation_date": "2015-05-05T09:36:31+00:00", - "servers": [] - } -] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/list.options.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/list.options.json b/oneandone/src/test/resources/sharedStorage/list.options.json deleted file mode 100644 index d9c8c93..0000000 --- a/oneandone/src/test/resources/sharedStorage/list.options.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "id": "6AD2F180B7B666539EF75A02FE227084", - "size": 200, - "state": "ACTIVE", - "description": "My shared storage test description", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "cloudpanel_id": "vid35780", - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage test", - "creation_date": "2015-05-06T08:33:25+00:00", - "servers": [ - { - "id": "638ED28205B1AFD7ADEF569C725DD85F", - "name": "My server 1", - "rights": "RW" - } - ] - }, - { - "id": "4406CE4723BB441C7956E25C51CE8C1B", - "size": 50, - "state": "ACTIVE", - "description": "My shared storage description", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "cloudpanel_id": "vid30534", - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage", - "creation_date": "2015-03-17T11:57:48+00:00", - "servers": [] - }, - { - "id": "1A5418172DD3BD39F8010A6633F1018A", - "size": 250, - "state": "ACTIVE", - "description": null, - "cloudpanel_id": "vid19857", - "datacenter": { - "id": "D0F6D8C8ED29D3036F94C27BBB7BAD36", - "location": "USA", - "country_code": "US" - }, - "size_used": "0.00", - "cifs_path": "\\vid50995.nas1.lan\\vid50995", - "nfs_path": "vid50995.nas1.lan/:vid50995", - "name": "My shared storage 2", - "creation_date": "2015-05-05T09:36:31+00:00", - "servers": [] - } -] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/server.get.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/server.get.json b/oneandone/src/test/resources/sharedStorage/server.get.json deleted file mode 100644 index d68f370..0000000 --- a/oneandone/src/test/resources/sharedStorage/server.get.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "638ED28205B1AFD7ADEF569C725DD85F", - "name": "Mi servidor 1", - "rights": "RW" -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/54109d77/oneandone/src/test/resources/sharedStorage/servers.list.json ---------------------------------------------------------------------- diff --git a/oneandone/src/test/resources/sharedStorage/servers.list.json b/oneandone/src/test/resources/sharedStorage/servers.list.json deleted file mode 100644 index e46295d..0000000 --- a/oneandone/src/test/resources/sharedStorage/servers.list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "id": "C72CF0A681B0CCE7EC624DD194D585C6", - "name": "My Server", - "rights": "RW" - }, - { - "id": "4ECD9D188EB457317B2CF8F07885E7B4", - "name": "My Server 2", - "rights": "R" - } -] \ No newline at end of file
