Repository: jclouds-labs
Updated Branches:
  refs/heads/master b28fe7c6d -> ff73c4e22


JCLOUDS-1140 oneandone-sharedstorages-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/ff73c4e2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs/tree/ff73c4e2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs/diff/ff73c4e2

Branch: refs/heads/master
Commit: ff73c4e22953bc6ab14bbbab371ed2cdbcc9230c
Parents: b28fe7c
Author: Ali Bazlamit <[email protected]>
Authored: Mon Aug 1 13:42:57 2016 +0200
Committer: Ignasi Barrera <[email protected]>
Committed: Mon Aug 1 15:10:17 2016 +0200

----------------------------------------------------------------------
 .../jclouds/oneandone/rest/OneAndOneApi.java    |   3 +
 .../oneandone/rest/domain/DataCenter.java       |  15 +-
 .../jclouds/oneandone/rest/domain/Dvd.java      |  13 +-
 .../jclouds/oneandone/rest/domain/Server.java   |  15 +
 .../oneandone/rest/domain/SharedStorage.java    | 162 ++++++++++
 .../rest/domain/SharedStorageAccess.java        |  52 ++++
 .../jclouds/oneandone/rest/domain/Types.java    |   9 +
 .../oneandone/rest/domain/WarningAlert.java     |  36 ---
 .../rest/features/SharedStorageApi.java         | 113 +++++++
 .../rest/features/SharedStorageApiLiveTest.java | 152 ++++++++++
 .../rest/features/SharedStorageApiMockTest.java | 295 +++++++++++++++++++
 .../rest/internal/BaseOneAndOneApiMockTest.java |   2 -
 .../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 +
 18 files changed, 1005 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/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 dd9b3b2..be5f0d9 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
@@ -19,6 +19,7 @@ package org.apache.jclouds.oneandone.rest;
 import java.io.Closeable;
 import org.apache.jclouds.oneandone.rest.features.ImageApi;
 import org.apache.jclouds.oneandone.rest.features.ServerApi;
+import org.apache.jclouds.oneandone.rest.features.SharedStorageApi;
 import org.jclouds.rest.annotations.Delegate;
 
 public interface OneAndOneApi extends Closeable {
@@ -29,4 +30,6 @@ public interface OneAndOneApi extends Closeable {
    @Delegate
    ImageApi imageApi();
 
+   @Delegate
+   SharedStorageApi sharedStorageApi();
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java
 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java
index 95e2bf3..c2d129f 100644
--- 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java
+++ 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java
@@ -21,14 +21,15 @@ import org.jclouds.json.SerializedNames;
 
 @AutoValue
 public abstract class DataCenter {
-    public abstract String id();
 
-    public abstract String countryCode();
+   public abstract String id();
 
-    public abstract String location();
+   public abstract String countryCode();
 
-    @SerializedNames({"id", "country_code", "location"})
-    public static DataCenter create(String id, String countryCode, String 
location) {
-        return new AutoValue_DataCenter(id, countryCode, location);
-    }
+   public abstract String location();
+
+   @SerializedNames({"id", "country_code", "location"})
+   public static DataCenter create(String id, String countryCode, String 
location) {
+      return new AutoValue_DataCenter(id, countryCode, location);
+   }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java
index dd778be..865eb48 100644
--- a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java
+++ b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java
@@ -21,12 +21,13 @@ import org.jclouds.json.SerializedNames;
 
 @AutoValue
 public abstract class Dvd {
-    public abstract String id();
 
-    public abstract String name();
+   public abstract String id();
 
-    @SerializedNames({"id", "name"})
-    public static Dvd create(String id, String name) {
-        return new AutoValue_Dvd(id, name);
-    }
+   public abstract String name();
+
+   @SerializedNames({"id", "name"})
+   public static Dvd create(String id, String name) {
+      return new AutoValue_Dvd(id, name);
+   }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Server.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Server.java 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Server.java
index f83c4de..b044776 100644
--- 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Server.java
+++ 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Server.java
@@ -107,6 +107,21 @@ public abstract class Server {
    }
 
    @AutoValue
+   public abstract static class WarningAlert {
+
+      public abstract String type();
+
+      public abstract String description();
+
+      public abstract Date date();
+
+      @SerializedNames({"type", "description", "date"})
+      public static WarningAlert create(String type, String description, Date 
date) {
+         return new AutoValue_Server_WarningAlert(type, description, date);
+      }
+   }
+
+   @AutoValue
    public abstract static class UpdateServerResponse {
 
       public abstract String id();

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorage.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorage.java
 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorage.java
new file mode 100644
index 0000000..f8009c4
--- /dev/null
+++ 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorage.java
@@ -0,0 +1,162 @@
+/*
+ * 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 com.google.common.collect.ImmutableList;
+import java.util.List;
+import org.apache.jclouds.oneandone.rest.domain.Types.StorageServerRights;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+@AutoValue
+public abstract class SharedStorage {
+
+   public abstract String id();
+
+   public abstract int size();
+
+   @Nullable
+   public abstract String state();
+
+   @Nullable
+   public abstract String description();
+
+   @Nullable
+   public abstract String cloudpanelId();
+
+   public abstract int sizeUsed();
+
+   @Nullable
+   public abstract String cifsPath();
+
+   @Nullable
+   public abstract String nfsPath();
+
+   public abstract String name();
+
+   @Nullable
+
+   public abstract String creationDate();
+
+   @Nullable
+   public abstract List<Server> servers();
+
+   @SerializedNames({"id", "size", "state", "description", "cloudpanel_id", 
"size_used", "cifs_path", "nfs_path", "name", "creation_date", "servers"})
+   public static SharedStorage create(String id, int size, String state, 
String description, String cloudpanelId, int sizeUsed, String cifsPath, String 
nfsPath, String name, String creationDate, List<Server> servers) {
+      return new AutoValue_SharedStorage(id, size, state, description, 
cloudpanelId, sizeUsed, cifsPath, nfsPath, name, creationDate, servers == null 
? ImmutableList.<Server>of() : ImmutableList.copyOf(servers));
+   }
+
+   @AutoValue
+   public abstract static class CreateSharedStorage {
+
+      public abstract String name();
+
+      @Nullable
+      public abstract String description();
+
+      public abstract int size();
+
+      @Nullable
+      public abstract String datacenterId();
+
+      @SerializedNames({"name", "description", "size", "datacenter_id"})
+      public static CreateSharedStorage create(final String name, final String 
description, final int size, final String dataCenterId) {
+         return builder()
+                 .name(name)
+                 .description(description)
+                 .datacenterId(dataCenterId)
+                 .size(size)
+                 .build();
+      }
+
+      public static Builder builder() {
+         return new AutoValue_SharedStorage_CreateSharedStorage.Builder();
+      }
+
+      @AutoValue.Builder
+      public abstract static class Builder {
+
+         public abstract Builder name(String name);
+
+         public abstract Builder description(String description);
+
+         public abstract Builder size(int size);
+
+         public abstract Builder datacenterId(String datacenterId);
+
+         public abstract CreateSharedStorage build();
+      }
+   }
+
+   @AutoValue
+   public abstract static class UpdateSharedStorage {
+
+      @Nullable
+      public abstract String name();
+
+      @Nullable
+      public abstract String description();
+
+      @Nullable
+      public abstract Integer size();
+
+      @SerializedNames({"name", "description", "size"})
+      public static UpdateSharedStorage create(final String name, final String 
description, final Integer size) {
+         return new AutoValue_SharedStorage_UpdateSharedStorage(name, 
description, size);
+      }
+   }
+
+   @AutoValue
+   public abstract static class Server {
+
+      public abstract String id();
+
+      public abstract String name();
+
+      public abstract StorageServerRights rights();
+
+      @SerializedNames({"id", "name", "rights"})
+      public static Server create(String id, String name, StorageServerRights 
rights) {
+         return new AutoValue_SharedStorage_Server(id, name, rights);
+      }
+
+      @AutoValue
+      public abstract static class CreateServer {
+
+         public abstract List<ServerPayload> servers();
+
+         @SerializedNames({"servers"})
+         public static CreateServer create(final List<ServerPayload> servers) {
+            return new AutoValue_SharedStorage_Server_CreateServer(servers);
+         }
+
+         @AutoValue
+         public abstract static class ServerPayload {
+
+            public abstract String id();
+
+            public abstract StorageServerRights rights();
+
+            @SerializedNames({"id", "rights"})
+            public static ServerPayload create(final String id, 
StorageServerRights rights) {
+               return new 
AutoValue_SharedStorage_Server_CreateServer_ServerPayload(id, rights);
+            }
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorageAccess.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorageAccess.java
 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorageAccess.java
new file mode 100644
index 0000000..5d89833
--- /dev/null
+++ 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SharedStorageAccess.java
@@ -0,0 +1,52 @@
+/*
+ * 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.jclouds.javax.annotation.Nullable;
+import org.jclouds.json.SerializedNames;
+
+@AutoValue
+public abstract class SharedStorageAccess {
+
+   @Nullable
+   public abstract DataCenter datacenter();
+
+   public abstract String state();
+
+   public abstract String kerberosContentFile();
+
+   public abstract int needsPasswordReset();
+
+   public abstract String userDomain();
+
+   @SerializedNames({"datacenter", "state", "kerberos_content_file", 
"needs_password_reset", "user_domain"})
+   public static SharedStorageAccess create(DataCenter datacenter, String 
state, String kerberosContentFile, int needsPasswordReset, String user_domain) {
+      return new AutoValue_SharedStorageAccess(datacenter, state, 
kerberosContentFile, needsPasswordReset, user_domain);
+   }
+
+   @AutoValue
+   public abstract static class UpdateSharedStorageAccess {
+
+      public abstract String password();
+
+      @SerializedNames({"password"})
+      public static UpdateSharedStorageAccess create(final String password) {
+         return new 
AutoValue_SharedStorageAccess_UpdateSharedStorageAccess(password);
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/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 1587803..a69a599 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
@@ -136,6 +136,15 @@ public class Types {
       public static IPType fromValue(String v) {
          return Enums.getIfPresent(IPType.class, v).or(UNRECOGNIZED);
       }
+   }
+
+   public enum StorageServerRights {
+      R,
+      RW,
+      UNRECOGNIZED;
 
+      public static StorageServerRights fromValue(String v) {
+         return Enums.getIfPresent(StorageServerRights.class, 
v).or(UNRECOGNIZED);
+      }
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/WarningAlert.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/WarningAlert.java
 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/WarningAlert.java
deleted file mode 100644
index 05303dd..0000000
--- 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/WarningAlert.java
+++ /dev/null
@@ -1,36 +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.apache.jclouds.oneandone.rest.domain;
-
-import com.google.auto.value.AutoValue;
-import java.util.Date;
-import org.jclouds.json.SerializedNames;
-
-@AutoValue
-public abstract class WarningAlert {
-
-   public abstract String type();
-
-   public abstract String description();
-
-   public abstract Date date();
-
-   @SerializedNames({"type", "description", "date"})
-   public static WarningAlert create(String type, String description, Date 
date) {
-      return new AutoValue_WarningAlert(type, description, date);
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApi.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApi.java
 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApi.java
new file mode 100644
index 0000000..eba9f8c
--- /dev/null
+++ 
b/oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApi.java
@@ -0,0 +1,113 @@
+/*
+ * 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.io.Closeable;
+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.SharedStorage;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorage.Server;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorageAccess;
+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("/shared_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface SharedStorageApi extends Closeable {
+
+   @Named("sharedstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<SharedStorage> list();
+
+   @Named("sharedstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<SharedStorage> list(GenericQueryOptions options);
+
+   @Named("sharedstorages:get")
+   @GET
+   @Path("/{sharedStorageId}")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   SharedStorage get(@PathParam("sharedStorageId") String sharedStorageId);
+
+   @Named("sharedstorages:create")
+   @POST
+   SharedStorage create(@BinderParam(BindToJsonPayload.class) 
SharedStorage.CreateSharedStorage sharedStorage);
+
+   @Named("sharedstorages:update")
+   @PUT
+   @Path("/{sharedStorageId}")
+   SharedStorage update(@PathParam("sharedStorageId") String sharedStorageId, 
@BinderParam(BindToJsonPayload.class) SharedStorage.UpdateSharedStorage 
sharedStorage);
+
+   @Named("sharedstorages:delete")
+   @DELETE
+   @Path("/{sharedStorageId}")
+   @MapBinder(BindToJsonPayload.class)
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   SharedStorage delete(@PathParam("sharedStorageId") String sharedStorageId);
+
+   @Named("sharedstorages:servers:list")
+   @GET
+   @Path("/{sharedStorageId}/servers")
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<Server> listServers(@PathParam("sharedStorageId") String 
sharedStorageId);
+
+   @Named("sharedstorages:servers:create")
+   @POST
+   @Path("/{sharedStorageId}/servers")
+   SharedStorage attachServer(@PathParam("sharedStorageId") String 
sharedStorageId, @BinderParam(BindToJsonPayload.class) Server.CreateServer 
server);
+
+   @Named("sharedstorages:servers:get")
+   @GET
+   @Path("/{sharedStorageId}/servers/{serverId}")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   Server getServer(@PathParam("sharedStorageId") String sharedStorageId, 
@PathParam("serverId") String serverId);
+
+   @Named("sharedstorages:servers:delete")
+   @DELETE
+   @Path("/{sharedStorageId}/servers/{serverId}")
+   @MapBinder(BindToJsonPayload.class)
+   SharedStorage detachServer(@PathParam("sharedStorageId") String 
sharedStorageId, @PathParam("serverId") String serverId);
+
+   @Named("sharedstorages:access:list")
+   @GET
+   @Path("/access")
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<SharedStorageAccess> getAccessCredentials();
+
+   @Named("sharedstorages:access:update")
+   @PUT
+   @Path("/access")
+   List<SharedStorageAccess> 
changePassword(@BinderParam(BindToJsonPayload.class) 
SharedStorageAccess.UpdateSharedStorageAccess access);
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiLiveTest.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiLiveTest.java
 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiLiveTest.java
new file mode 100644
index 0000000..1cfd982
--- /dev/null
+++ 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiLiveTest.java
@@ -0,0 +1,152 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import org.apache.jclouds.oneandone.rest.domain.Server;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorage;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorageAccess;
+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 static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", testName = "SharedStorageApiLiveTest")
+public class SharedStorageApiLiveTest extends BaseOneAndOneLiveTest {
+
+   private SharedStorage currentSharedStorage;
+   private Server currentServer;
+   private List<SharedStorage> sharedStorages;
+
+   private SharedStorageApi sharedStorageApi() {
+
+      return api.sharedStorageApi();
+   }
+
+   @BeforeClass
+   public void setupTest() {
+      currentServer = createServer("sharestorage jclouds server");
+      assertNodeAvailable(currentServer);
+      currentSharedStorage = 
sharedStorageApi().create(SharedStorage.CreateSharedStorage.builder()
+              .name("jcloudsStorage")
+              .description("desc")
+              .size(50)
+              .build());
+      assertNotNull(currentSharedStorage);
+   }
+
+   @Test
+   public void testList() {
+      sharedStorages = sharedStorageApi().list();
+
+      assertNotNull(sharedStorages);
+      Assert.assertTrue(sharedStorages.size() > 0);
+   }
+
+   public void testListWithOption() {
+      GenericQueryOptions options = new GenericQueryOptions();
+      options.options(0, 0, null, "jcloudsStorage", null);
+      List<SharedStorage> imageWithQuery = sharedStorageApi().list(options);
+
+      assertNotNull(imageWithQuery);
+      Assert.assertTrue(imageWithQuery.size() > 0);
+   }
+
+   public void testGet() {
+      SharedStorage result = sharedStorageApi().get(currentSharedStorage.id());
+
+      assertNotNull(result);
+      assertEquals(result.id(), currentSharedStorage.id());
+   }
+
+   @Test
+   public void testUpdate() throws InterruptedException {
+      String updatedName = "Updatedjava";
+
+      SharedStorage updateResult = 
sharedStorageApi().update(currentSharedStorage.id(), 
SharedStorage.UpdateSharedStorage.create(updatedName, "desc", null));
+
+      assertNotNull(updateResult);
+      assertEquals(updateResult.name(), updatedName);
+
+   }
+
+   @Test(dependsOnMethods = "testUpdate")
+   public void testAttachServer() throws InterruptedException {
+
+      List<SharedStorage.Server.CreateServer.ServerPayload> servers = new 
ArrayList<SharedStorage.Server.CreateServer.ServerPayload>();
+      SharedStorage.Server.CreateServer.ServerPayload toAdd = 
SharedStorage.Server.CreateServer.ServerPayload.create(currentServer.id(), 
Types.StorageServerRights.R);
+      servers.add(toAdd);
+      SharedStorage updateResult = 
sharedStorageApi().attachServer(currentSharedStorage.id(), 
SharedStorage.Server.CreateServer.create(servers));
+
+      assertNotNull(updateResult);
+
+   }
+
+   @Test(dependsOnMethods = "testAttachServer")
+   public void testListServers() {
+      List<SharedStorage.Server> servers = 
sharedStorageApi().listServers(currentSharedStorage.id());
+
+      assertNotNull(servers);
+      Assert.assertTrue(servers.size() > 0);
+   }
+
+   @Test(dependsOnMethods = "testAttachServer")
+   public void testServerGet() {
+      SharedStorage.Server result = 
sharedStorageApi().getServer(currentSharedStorage.id(), currentServer.id());
+
+      assertNotNull(result);
+      assertEquals(result.id(), currentServer.id());
+   }
+
+   @Test(dependsOnMethods = "testServerGet")
+   public void testDetachServer() {
+      SharedStorage result = 
sharedStorageApi().detachServer(currentSharedStorage.id(), currentServer.id());
+
+      assertNotNull(result);
+      assertEquals(result.id(), currentSharedStorage.id());
+   }
+
+   @Test
+   public void testListAccessCredentials() {
+
+      List<SharedStorageAccess> access = 
sharedStorageApi().getAccessCredentials();
+
+      assertNotNull(access);
+      assertTrue(access.size() > 0);
+   }
+
+   public void testChangePassword() {
+      List<SharedStorageAccess> response = 
sharedStorageApi().changePassword(SharedStorageAccess.UpdateSharedStorageAccess.create("Test123!"));
+
+      assertNotNull(response);
+   }
+
+   @AfterClass(alwaysRun = true)
+   public void teardownTest() {
+      sharedStorageApi().delete(currentSharedStorage.id());
+      assertNodeAvailable(currentServer);
+      deleteServer(currentServer.id());
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiMockTest.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiMockTest.java
 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiMockTest.java
new file mode 100644
index 0000000..d54476c
--- /dev/null
+++ 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SharedStorageApiMockTest.java
@@ -0,0 +1,295 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorage;
+import org.apache.jclouds.oneandone.rest.domain.SharedStorageAccess;
+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 = "SharedStorageApiMockTest", singleThreaded = 
true)
+public class SharedStorageApiMockTest extends BaseOneAndOneApiMockTest {
+
+   private SharedStorageApi sharedStorageApi() {
+      return api.sharedStorageApi();
+   }
+
+   @Test
+   public void testList() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/list.json"))
+      );
+
+      List<SharedStorage> sharedStorages = sharedStorageApi().list();
+
+      assertNotNull(sharedStorages);
+      assertEquals(sharedStorages.size(), 3);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages");
+   }
+
+   @Test
+   public void testList404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404));
+
+      List<SharedStorage> sharedStorages = sharedStorageApi().list();
+
+      assertNotNull(sharedStorages);
+      assertEquals(sharedStorages.size(), 0);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages");
+   }
+
+   @Test
+   public void testListWithOption() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/list.options.json"))
+      );
+      GenericQueryOptions options = new GenericQueryOptions();
+      options.options(0, 0, null, "New", null);
+      List<SharedStorage> sharedStorages = sharedStorageApi().list(options);
+
+      assertNotNull(sharedStorages);
+      assertEquals(sharedStorages.size(), 3);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages?q=New");
+   }
+
+   @Test
+   public void testListWithOption404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404)
+      );
+      GenericQueryOptions options = new GenericQueryOptions();
+      options.options(0, 0, null, "test", null);
+      List<SharedStorage> sharedStorages = sharedStorageApi().list(options);
+
+      assertNotNull(sharedStorages);
+      assertEquals(sharedStorages.size(), 0);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages?q=test");
+   }
+
+   public void testGet() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+      SharedStorage result = sharedStorageApi().get("sharedStorageId");
+
+      assertNotNull(result);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/sharedStorageId");
+   }
+
+   @Test
+   public void testGet404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404)
+      );
+      SharedStorage result = sharedStorageApi().get("sharedStorageId");
+
+      assertEquals(result, null);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/sharedStorageId");
+   }
+
+   @Test
+   public void testCreate() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+      SharedStorage response = 
sharedStorageApi().create(SharedStorage.CreateSharedStorage.builder()
+              .name("name")
+              .description("desc")
+              .size(20)
+              .build());
+
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "POST", "/shared_storages", 
"{\"name\":\"name\",\"description\":\"desc\",\"size\":20}");
+   }
+
+   @Test
+   public void testUpdate() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+      SharedStorage response = sharedStorageApi().update("sharedStorageId", 
SharedStorage.UpdateSharedStorage.create("name", "desc", null));
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "PUT", "/shared_storages/sharedStorageId", 
"{\"name\":\"name\",\"description\":\"desc\"}");
+   }
+
+   @Test
+   public void testDelete() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+      SharedStorage response = sharedStorageApi().delete("sharedStorageId");
+
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "DELETE", "/shared_storages/sharedStorageId");
+   }
+
+   @Test
+   public void testDelete404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404));
+      SharedStorage storage = sharedStorageApi().delete("sharedStorageId");
+
+      assertEquals(storage, null);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "DELETE", "/shared_storages/sharedStorageId");
+   }
+
+   @Test
+   public void testListServers() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/servers.list.json"))
+      );
+
+      List<SharedStorage.Server> servers = 
sharedStorageApi().listServers("sharedStorageId");
+
+      assertNotNull(servers);
+      assertEquals(servers.size(), 2);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/sharedStorageId/servers");
+   }
+
+   @Test
+   public void testListServers404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404)
+      );
+
+      List<SharedStorage.Server> servers = 
sharedStorageApi().listServers("sharedStorageId");
+
+      assertNotNull(servers);
+      assertEquals(servers.size(), 0);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/sharedStorageId/servers");
+   }
+
+   @Test
+   public void testGetServer() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/server.get.json"))
+      );
+      SharedStorage.Server result = 
sharedStorageApi().getServer("sharedStorageId", "serverId");
+
+      assertNotNull(result);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", 
"/shared_storages/sharedStorageId/servers/serverId");
+   }
+
+   @Test
+   public void testGetServer404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404)
+      );
+      SharedStorage.Server result = 
sharedStorageApi().getServer("sharedStorageId", "serverId");
+
+      assertEquals(result, null);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", 
"/shared_storages/sharedStorageId/servers/serverId");
+   }
+
+   @Test
+   public void testAttachServer() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+
+      List<SharedStorage.Server.CreateServer.ServerPayload> servers = new 
ArrayList<SharedStorage.Server.CreateServer.ServerPayload>();
+      SharedStorage.Server.CreateServer.ServerPayload toAdd = 
SharedStorage.Server.CreateServer.ServerPayload.create("server_id", 
Types.StorageServerRights.R);
+      servers.add(toAdd);
+      SharedStorage response = 
sharedStorageApi().attachServer("sharedStorageId", 
SharedStorage.Server.CreateServer.create(servers));
+
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "POST", "/shared_storages/sharedStorageId/servers", 
"{\"servers\":[{\"id\":\"server_id\",\"rights\":\"R\"}]}");
+   }
+
+   @Test
+   public void testDetachServer() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/get.json"))
+      );
+      SharedStorage response = 
sharedStorageApi().detachServer("sharedStorageId", "serverId");
+
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "DELETE", 
"/shared_storages/sharedStorageId/servers/serverId");
+   }
+
+   @Test
+   public void testListAccessCredentials() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/list.access.json"))
+      );
+
+      List<SharedStorageAccess> servers = 
sharedStorageApi().getAccessCredentials();
+
+      assertNotNull(servers);
+      assertEquals(servers.size(), 2);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/access");
+   }
+
+   @Test
+   public void testListAccessCredentials404() throws InterruptedException {
+      server.enqueue(
+              new MockResponse().setResponseCode(404)
+      );
+
+      List<SharedStorageAccess> servers = 
sharedStorageApi().getAccessCredentials();
+
+      assertEquals(servers.size(), 0);
+
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "GET", "/shared_storages/access");
+   }
+
+   @Test
+   public void testChangePassword() throws InterruptedException {
+      server.enqueue(
+              new 
MockResponse().setBody(stringFromResource("/sharedstorage/list.access.json"))
+      );
+      List<SharedStorageAccess> response = 
sharedStorageApi().changePassword(SharedStorageAccess.UpdateSharedStorageAccess.create("password"));
+
+      assertNotNull(response);
+      assertEquals(server.getRequestCount(), 1);
+      assertSent(server, "PUT", "/shared_storages/access", 
"{\"password\":\"password\"}");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneApiMockTest.java
----------------------------------------------------------------------
diff --git 
a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneApiMockTest.java
 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneApiMockTest.java
index 72e70f2..f9bb74c 100644
--- 
a/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneApiMockTest.java
+++ 
b/oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneApiMockTest.java
@@ -44,9 +44,7 @@ public class BaseOneAndOneApiMockTest {
    protected static final String AUTH_HEADER = "token";
 
    private static final String DEFAULT_ENDPOINT = METADATA.getEndpoint();
-
    private final Set<Module> modules = ImmutableSet.<Module>of(new 
ExecutorServiceModule(sameThreadExecutor()));
-
    protected MockWebServer server;
    protected OneAndOneApi api;
    private Json json;

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/ff73c4e2/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
new file mode 100644
index 0000000..7f3d370
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/get.json
@@ -0,0 +1,24 @@
+{
+    "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/ff73c4e2/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
new file mode 100644
index 0000000..6b72404
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/list.access.json
@@ -0,0 +1,24 @@
+[
+    {
+        "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/ff73c4e2/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
new file mode 100644
index 0000000..d9c8c93
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/list.json
@@ -0,0 +1,62 @@
+[
+    {
+        "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/ff73c4e2/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
new file mode 100644
index 0000000..d9c8c93
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/list.options.json
@@ -0,0 +1,62 @@
+[
+    {
+        "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/ff73c4e2/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
new file mode 100644
index 0000000..d68f370
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/server.get.json
@@ -0,0 +1,5 @@
+{
+    "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/ff73c4e2/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
new file mode 100644
index 0000000..e46295d
--- /dev/null
+++ b/oneandone/src/test/resources/sharedstorage/servers.list.json
@@ -0,0 +1,12 @@
+[
+    {
+        "id": "C72CF0A681B0CCE7EC624DD194D585C6",
+        "name": "My Server",
+        "rights": "RW"
+    },
+    {
+        "id": "4ECD9D188EB457317B2CF8F07885E7B4",
+        "name": "My Server 2",
+        "rights": "R"
+    }
+]
\ No newline at end of file

Reply via email to