You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2013/09/19 00:09:34 UTC

[7/8] JCLOUDS-236: Add CloudSigma v2 API and Providers

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindFirewallPolicyToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindFirewallPolicyToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindFirewallPolicyToJsonRequest.java
new file mode 100644
index 0000000..f86d981
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindFirewallPolicyToJsonRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.FirewallPolicy;
+import org.jclouds.cloudsigma2.functions.FirewallPolicyToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindFirewallPolicyToJsonRequest implements Binder {
+
+    private final FirewallPolicyToJson policyJsonObjectFunction;
+
+    @Inject
+    public BindFirewallPolicyToJsonRequest(FirewallPolicyToJson policyJsonObjectFunction) {
+        this.policyJsonObjectFunction = policyJsonObjectFunction;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof FirewallPolicy, "this binder is only valid for FirewallPolicy!");
+        FirewallPolicy create = FirewallPolicy.class.cast(input);
+        JsonObject firewallJsonObject = policyJsonObjectFunction.apply(create);
+
+        request.setPayload(firewallJsonObject.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindIPInfoToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindIPInfoToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindIPInfoToJsonRequest.java
new file mode 100644
index 0000000..db2586d
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindIPInfoToJsonRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.IPInfo;
+import org.jclouds.cloudsigma2.functions.IPInfoToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindIPInfoToJsonRequest implements Binder {
+
+    private final IPInfoToJson ipInfoJsonObjectFunction;
+
+    @Inject
+    public BindIPInfoToJsonRequest(IPInfoToJson ipInfoJsonObjectFunction) {
+        this.ipInfoJsonObjectFunction = ipInfoJsonObjectFunction;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof IPInfo, "this binder is only valid for IPInfo!");
+        IPInfo create = IPInfo.class.cast(input);
+        JsonObject ipJsonObject = ipInfoJsonObjectFunction.apply(create);
+
+        request.setPayload(ipJsonObject.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindLibraryDriveToJson.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindLibraryDriveToJson.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindLibraryDriveToJson.java
new file mode 100644
index 0000000..bd3c8d0
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindLibraryDriveToJson.java
@@ -0,0 +1,53 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import com.google.inject.Singleton;
+import org.jclouds.cloudsigma2.domain.LibraryDrive;
+import org.jclouds.cloudsigma2.functions.LibraryDriveToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindLibraryDriveToJson implements Binder {
+
+    private final LibraryDriveToJson createDriveJsonObjectFunction;
+
+    @Inject
+    public BindLibraryDriveToJson(LibraryDriveToJson createDriveJsonObjectFunction) {
+        this.createDriveJsonObjectFunction = createDriveJsonObjectFunction;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof LibraryDrive, "this binder is only valid for LibraryDrive!");
+        LibraryDrive create = LibraryDrive.class.cast(input);
+        JsonObject profileInfoJsonObject = createDriveJsonObjectFunction.apply(create);
+        request.setPayload(profileInfoJsonObject.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindProfileInfoToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindProfileInfoToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindProfileInfoToJsonRequest.java
new file mode 100644
index 0000000..7026f15
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindProfileInfoToJsonRequest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.ProfileInfo;
+import org.jclouds.cloudsigma2.functions.ProfileInfoToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindProfileInfoToJsonRequest implements Binder {
+
+    private final ProfileInfoToJson createProfileRequestToJson;
+
+    @Inject
+    public BindProfileInfoToJsonRequest(ProfileInfoToJson createProfileRequestToJson) {
+        this.createProfileRequestToJson = createProfileRequestToJson;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof ProfileInfo, "this binder is only valid for ProfileInfo!");
+        ProfileInfo create = ProfileInfo.class.cast(input);
+        JsonObject profileInfoJsonObject = createProfileRequestToJson.apply(create);
+        request.setPayload(profileInfoJsonObject.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoListToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoListToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoListToJsonRequest.java
new file mode 100644
index 0000000..ee3fdb5
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoListToJsonRequest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.ServerInfo;
+import org.jclouds.cloudsigma2.functions.ServerInfoToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+import java.util.List;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindServerInfoListToJsonRequest implements Binder {
+    private final ServerInfoToJson createServerInfoRequestToJson;
+
+    @Inject
+    public BindServerInfoListToJsonRequest(ServerInfoToJson createServerInfoRequestToJson) {
+        this.createServerInfoRequestToJson = createServerInfoRequestToJson;
+    }
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
+        checkArgument(payload instanceof List, "this binder is only valid for List<ServerInfo>!");
+        List list = List.class.cast(payload);
+        for(Object o : list){
+            checkArgument(o instanceof ServerInfo, "this binder is only valid for List<ServerInfo>!");
+        }
+        Iterable<ServerInfo> serverInfoList = (Iterable<ServerInfo>) payload;
+        JsonArray serversJsonArray = new JsonArray();
+
+        for(ServerInfo serverInfo : serverInfoList){
+            JsonObject driveObject = createServerInfoRequestToJson.apply(serverInfo);
+            serversJsonArray.add(driveObject);
+        }
+
+        JsonObject json = new JsonObject();
+        json.add("objects", serversJsonArray);
+
+        request.setPayload(json.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoToJsonRequest.java
new file mode 100644
index 0000000..0e557f8
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindServerInfoToJsonRequest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.ServerInfo;
+import org.jclouds.cloudsigma2.functions.ServerInfoToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindServerInfoToJsonRequest implements Binder {
+    private final ServerInfoToJson createServerInfoRequestToJson;
+
+    @Inject
+    public BindServerInfoToJsonRequest(ServerInfoToJson createServerInfoRequestToJson) {
+        this.createServerInfoRequestToJson = createServerInfoRequestToJson;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof ServerInfo, "this binder is only valid for ServerInfo!");
+        ServerInfo create = ServerInfo.class.cast(input);
+
+        JsonObject serverInfoJson = createServerInfoRequestToJson.apply(create);
+        request.setPayload(serverInfoJson.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagListToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagListToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagListToJsonRequest.java
new file mode 100644
index 0000000..aff2c4b
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagListToJsonRequest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.Tag;
+import org.jclouds.cloudsigma2.functions.TagToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+import java.util.List;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindTagListToJsonRequest implements Binder {
+    private final TagToJson tagJsonObjectFunction;
+
+    @Inject
+    public BindTagListToJsonRequest(TagToJson tagJsonObjectFunction) {
+        this.tagJsonObjectFunction = tagJsonObjectFunction;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
+        checkArgument(payload instanceof List, "this binder is only valid for List<Tag>!");
+        List list = List.class.cast(payload);
+        for(Object o : list){
+            checkArgument(o instanceof Tag, "this binder is only valid for List<Tag>!");
+        }
+        Iterable<Tag> tags = (Iterable<Tag>) payload;
+        JsonArray tagJsonArray = new JsonArray();
+
+        for(Tag tag : tags){
+            JsonObject driveObject = tagJsonObjectFunction.apply(tag);
+            tagJsonArray.add(driveObject);
+        }
+
+        JsonObject json = new JsonObject();
+        json.add("objects", tagJsonArray);
+
+        request.setPayload(json.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagToJsonRequest.java
new file mode 100644
index 0000000..ac0f1db
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindTagToJsonRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.Tag;
+import org.jclouds.cloudsigma2.functions.TagToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindTagToJsonRequest implements Binder {
+    private final TagToJson createTagRequestToJson;
+
+    @Inject
+    public BindTagToJsonRequest(TagToJson createTagRequestToJson) {
+        this.createTagRequestToJson = createTagRequestToJson;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof Tag, "this binder is only valid for Tag!");
+        Tag create = Tag.class.cast(input);
+
+        JsonObject serverInfoJson = createTagRequestToJson.apply(create);
+        request.setPayload(serverInfoJson.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindUuidStringsToJsonArray.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindUuidStringsToJsonArray.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindUuidStringsToJsonArray.java
new file mode 100644
index 0000000..12991a1
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindUuidStringsToJsonArray.java
@@ -0,0 +1,58 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.ServerInfo;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+import java.util.List;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindUuidStringsToJsonArray implements Binder {
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
+        checkArgument(payload instanceof List, "this binder is only valid for List<String>!");
+        List list = List.class.cast(payload);
+        for(Object o : list){
+            checkArgument(o instanceof String, "this binder is only valid for List<String>!");
+        }
+        Iterable<String> uuids = (Iterable<String>) payload;
+        JsonArray uuidJsonArray = new JsonArray();
+        JsonObject json = new JsonObject();
+
+        for(String uuid : uuids){
+            JsonObject uuidObject = new JsonObject();
+            uuidObject.addProperty("uuid", uuid);
+            uuidJsonArray.add(uuidObject);
+        }
+
+        json.add("objects", uuidJsonArray);
+        request.setPayload(json.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindVLANToJsonRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindVLANToJsonRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindVLANToJsonRequest.java
new file mode 100644
index 0000000..a46e47c
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/binders/BindVLANToJsonRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.cloudsigma2.binders;
+
+import com.google.gson.JsonObject;
+import org.jclouds.cloudsigma2.domain.VLANInfo;
+import org.jclouds.cloudsigma2.functions.VLANInfoToJson;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.Binder;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.core.MediaType;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+@Singleton
+public class BindVLANToJsonRequest implements Binder{
+
+    private final VLANInfoToJson vlanInfoJsonObjectFunction;
+
+    @Inject
+    public BindVLANToJsonRequest(VLANInfoToJson vlanInfoJsonObjectFunction) {
+        this.vlanInfoJsonObjectFunction = vlanInfoJsonObjectFunction;
+    }
+
+    @Override
+    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+        checkArgument(input instanceof VLANInfo, "this binder is only valid for VLANInfo!");
+        VLANInfo create = VLANInfo.class.cast(input);
+        JsonObject vlanJsonObject = vlanInfoJsonObjectFunction.apply(create);
+
+        request.setPayload(vlanJsonObject.toString());
+        request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
+        return request;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2HttpApiModule.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2HttpApiModule.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2HttpApiModule.java
new file mode 100644
index 0000000..a8bcdce
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2HttpApiModule.java
@@ -0,0 +1,42 @@
+/*
+ * 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.cloudsigma2.config;
+
+import org.jclouds.cloudsigma2.CloudSigma2Api;
+import org.jclouds.cloudsigma2.handlers.CloudSigmaErrorHandler;
+import org.jclouds.http.HttpErrorHandler;
+import org.jclouds.http.annotation.ClientError;
+import org.jclouds.http.annotation.Redirection;
+import org.jclouds.http.annotation.ServerError;
+import org.jclouds.rest.ConfiguresHttpApi;
+import org.jclouds.rest.config.HttpApiModule;
+
+/**
+ * Configures the CloudSigma connection.
+ *
+ * @author Vladimir Shevchenko
+ */
+@ConfiguresHttpApi
+public class CloudSigma2HttpApiModule extends HttpApiModule<CloudSigma2Api> {
+
+    @Override
+    protected void bindErrorHandlers() {
+        bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(CloudSigmaErrorHandler.class);
+        bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(CloudSigmaErrorHandler.class);
+        bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(CloudSigmaErrorHandler.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2ParserModule.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2ParserModule.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2ParserModule.java
new file mode 100644
index 0000000..4de8dbd
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2ParserModule.java
@@ -0,0 +1,30 @@
+/*
+ * 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.cloudsigma2.config;
+
+import com.google.inject.AbstractModule;
+import org.jclouds.json.config.GsonModule;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class CloudSigma2ParserModule extends AbstractModule{
+    @Override
+    protected void configure() {
+        bind(GsonModule.DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2Properties.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2Properties.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2Properties.java
new file mode 100644
index 0000000..e552f5d
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/config/CloudSigma2Properties.java
@@ -0,0 +1,30 @@
+/*
+ * 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.cloudsigma2.config;
+
+/**
+ *
+ * @author Vladimir Shevchenko
+ */
+public class CloudSigma2Properties {
+
+    /**
+     * default VNC password used on new machines
+     */
+    public static final String PROPERTY_VNC_PASSWORD = "jclouds.cloudsigma.vnc-password";
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountBalance.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountBalance.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountBalance.java
new file mode 100644
index 0000000..3593acc
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountBalance.java
@@ -0,0 +1,81 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class AccountBalance {
+
+    private final double balance;
+    private final String currency;
+
+    @ConstructorProperties({
+            "balance", "currency"
+    })
+    public AccountBalance(double balance, String currency) {
+        this.balance = balance;
+        this.currency = currency;
+    }
+
+    /**
+     * @return Amount of money in account
+     */
+    public double getBalance() {
+        return balance;
+    }
+
+    /**
+     * @return Currency of the account
+     */
+    public String getCurrency() {
+        return currency;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof AccountBalance)) return false;
+
+        AccountBalance that = (AccountBalance) o;
+
+        if (Double.compare(that.balance, balance) != 0) return false;
+        if (currency != null ? !currency.equals(that.currency) : that.currency != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result;
+        long temp;
+        temp = Double.doubleToLongBits(balance);
+        result = (int) (temp ^ (temp >>> 32));
+        result = 31 * result + (currency != null ? currency.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "balance=" + balance +
+                ", currency='" + currency + '\'' +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountUsage.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountUsage.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountUsage.java
new file mode 100644
index 0000000..2864fd0
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/AccountUsage.java
@@ -0,0 +1,235 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import com.google.inject.name.Named;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class AccountUsage {
+
+    public static class Builder{
+        private Usage cpu;
+        private Usage dssd;
+        private Usage ip;
+        private Usage mem;
+        private Usage windowsWebServer2008;
+        private Usage windowsServer2008Standard;
+        private Usage sqlServerStandard2008;
+        private Usage sms;
+        private Usage ssd;
+        private Usage tx;
+        private Usage vlan;
+
+        public Builder cpu(Usage cpu) {
+            this.cpu = cpu;
+            return this;
+        }
+
+        public Builder dssd(Usage dssd) {
+            this.dssd = dssd;
+            return this;
+        }
+
+        public Builder ip(Usage ip) {
+            this.ip = ip;
+            return this;
+        }
+
+        public Builder mem(Usage mem) {
+            this.mem = mem;
+            return this;
+        }
+
+        public Builder windowsWebServer2008(Usage windowsWebServer2008) {
+            this.windowsWebServer2008 = windowsWebServer2008;
+            return this;
+        }
+
+        public Builder windowsServer2008Standard(Usage windowsServer2008Standard) {
+            this.windowsServer2008Standard = windowsServer2008Standard;
+            return this;
+        }
+
+        public Builder sqlServerStandard2008(Usage sqlServerStandard2008) {
+            this.sqlServerStandard2008 = sqlServerStandard2008;
+            return this;
+        }
+
+        public Builder ssd(Usage ssd) {
+            this.ssd = ssd;
+            return this;
+        }
+
+        public Builder vlan(Usage vlan) {
+            this.vlan = vlan;
+            return this;
+        }
+
+        public Builder tx(Usage tx) {
+            this.tx = tx;
+            return this;
+        }
+
+        public Builder sms(Usage sms) {
+            this.sms = sms;
+            return this;
+        }
+
+        public AccountUsage build(){
+            return new AccountUsage(cpu, dssd, ip, mem, windowsWebServer2008, windowsServer2008Standard, sqlServerStandard2008, sms, ssd, tx, vlan);
+        }
+    }
+
+    private final Usage cpu;
+    private final Usage dssd;
+    private final Usage ip;
+    private final Usage mem;
+    @Named("msft_lwa_00135")
+    private final Usage windowsWebServer2008;
+    @Named("msft_p37_04837")
+    private final Usage windowsServer2008Standard;
+    @Named("msft_tfa_00009")
+    private final Usage sqlServerStandard2008;
+    private final Usage sms;
+    private final Usage ssd;
+    private final Usage tx;
+    private final Usage vlan;
+
+    @ConstructorProperties({
+            "cpu", "dssd", "ip", "mem", "msft_lwa_00135", "msft_p37_04837", "msft_tfa_00009", "sms", "ssd", "tx", "vlan"
+    })
+    public AccountUsage(Usage cpu, Usage dssd, Usage ip, Usage mem, Usage windowsWebServer2008
+            , Usage windowsServer2008Standard, Usage sqlServerStandard2008, Usage sms, Usage ssd, Usage tx, Usage vlan) {
+        this.cpu = cpu;
+        this.dssd = dssd;
+        this.ip = ip;
+        this.mem = mem;
+        this.windowsWebServer2008 = windowsWebServer2008;
+        this.windowsServer2008Standard = windowsServer2008Standard;
+        this.sqlServerStandard2008 = sqlServerStandard2008;
+        this.sms = sms;
+        this.ssd = ssd;
+        this.tx = tx;
+        this.vlan = vlan;
+    }
+
+    public Usage getVlan() {
+        return vlan;
+    }
+
+    public Usage getCpu() {
+        return cpu;
+    }
+
+    public Usage getDssd() {
+        return dssd;
+    }
+
+    public Usage getIp() {
+        return ip;
+    }
+
+    public Usage getMem() {
+        return mem;
+    }
+
+    public Usage getSsd() {
+        return ssd;
+    }
+
+    public Usage getWindowsWebServer2008() {
+        return windowsWebServer2008;
+    }
+
+    public Usage getWindowsServer2008Standard() {
+        return windowsServer2008Standard;
+    }
+
+    public Usage getSqlServerStandard2008() {
+        return sqlServerStandard2008;
+    }
+
+    public Usage getSms() {
+        return sms;
+    }
+
+    public Usage getTx() {
+        return tx;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof AccountUsage)) return false;
+
+        AccountUsage that = (AccountUsage) o;
+
+        if (cpu != null ? !cpu.equals(that.cpu) : that.cpu != null) return false;
+        if (dssd != null ? !dssd.equals(that.dssd) : that.dssd != null) return false;
+        if (ip != null ? !ip.equals(that.ip) : that.ip != null) return false;
+        if (mem != null ? !mem.equals(that.mem) : that.mem != null) return false;
+        if (sms != null ? !sms.equals(that.sms) : that.sms != null) return false;
+        if (sqlServerStandard2008 != null ? !sqlServerStandard2008.equals(that.sqlServerStandard2008) : that.sqlServerStandard2008 != null)
+            return false;
+        if (ssd != null ? !ssd.equals(that.ssd) : that.ssd != null) return false;
+        if (tx != null ? !tx.equals(that.tx) : that.tx != null) return false;
+        if (vlan != null ? !vlan.equals(that.vlan) : that.vlan != null) return false;
+        if (windowsServer2008Standard != null ? !windowsServer2008Standard.equals(that.windowsServer2008Standard) : that.windowsServer2008Standard != null)
+            return false;
+        if (windowsWebServer2008 != null ? !windowsWebServer2008.equals(that.windowsWebServer2008) : that.windowsWebServer2008 != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = cpu != null ? cpu.hashCode() : 0;
+        result = 31 * result + (dssd != null ? dssd.hashCode() : 0);
+        result = 31 * result + (ip != null ? ip.hashCode() : 0);
+        result = 31 * result + (mem != null ? mem.hashCode() : 0);
+        result = 31 * result + (windowsWebServer2008 != null ? windowsWebServer2008.hashCode() : 0);
+        result = 31 * result + (windowsServer2008Standard != null ? windowsServer2008Standard.hashCode() : 0);
+        result = 31 * result + (sqlServerStandard2008 != null ? sqlServerStandard2008.hashCode() : 0);
+        result = 31 * result + (sms != null ? sms.hashCode() : 0);
+        result = 31 * result + (ssd != null ? ssd.hashCode() : 0);
+        result = 31 * result + (tx != null ? tx.hashCode() : 0);
+        result = 31 * result + (vlan != null ? vlan.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "cpu=" + cpu +
+                ", dssd=" + dssd +
+                ", ip=" + ip +
+                ", mem=" + mem +
+                ", windowsWebServer2008=" + windowsWebServer2008 +
+                ", windowsServer2008Standard=" + windowsServer2008Standard +
+                ", sqlServerStandard2008=" + sqlServerStandard2008 +
+                ", sms=" + sms +
+                ", ssd=" + ssd +
+                ", tx=" + tx +
+                ", vlan=" + vlan +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/BurstLevel.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/BurstLevel.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/BurstLevel.java
new file mode 100644
index 0000000..97ee3c6
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/BurstLevel.java
@@ -0,0 +1,232 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import com.google.inject.name.Named;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class BurstLevel {
+
+    public static class Builder{
+        private int cpu;
+        private int dssd;
+        private int ip;
+        private int mem;
+        private int windowsWebServer2008;
+        private int windowsServer2008Standard;
+        private int sqlServerStandard2008;
+        private int sms;
+        private int ssd;
+        private int tx;
+        private int vlan;
+
+        public Builder cpu(int cpu) {
+            this.cpu = cpu;
+            return this;
+        }
+
+        public Builder dssd(int dssd) {
+            this.dssd = dssd;
+            return this;
+        }
+
+        public Builder ip(int ip) {
+            this.ip = ip;
+            return this;
+        }
+
+        public Builder mem(int mem) {
+            this.mem = mem;
+            return this;
+        }
+
+        public Builder windowsWebServer2008(int windowsWebServer2008) {
+            this.windowsWebServer2008 = windowsWebServer2008;
+            return this;
+        }
+
+        public Builder windowsServer2008Standard(int windowsServer2008Standard) {
+            this.windowsServer2008Standard = windowsServer2008Standard;
+            return this;
+        }
+
+        public Builder sqlServerStandard2008(int sqlServerStandard2008) {
+            this.sqlServerStandard2008 = sqlServerStandard2008;
+            return this;
+        }
+
+        public Builder ssd(int ssd) {
+            this.ssd = ssd;
+            return this;
+        }
+
+        public Builder vlan(int vlan) {
+            this.vlan = vlan;
+            return this;
+        }
+
+        public Builder tx(int tx) {
+            this.tx = tx;
+            return this;
+        }
+
+        public Builder sms(int sms) {
+            this.sms = sms;
+            return this;
+        }
+
+        public BurstLevel build(){
+            return new BurstLevel(cpu, dssd, ip, mem, windowsWebServer2008, windowsServer2008Standard, sqlServerStandard2008, sms, ssd, tx, vlan);
+        }
+    }
+
+    private final int cpu;
+    private final int dssd;
+    private final int ip;
+    private final int mem;
+    @Named("msft_lwa_00135")
+    private final int windowsWebServer2008;
+    @Named("msft_p37_04837")
+    private final int windowsServer2008Standard;
+    @Named("msft_tfa_00009")
+    private final int sqlServerStandard2008;
+    private final int sms;
+    private final int ssd;
+    private final int tx;
+    private final int vlan;
+
+    @ConstructorProperties({
+            "cpu", "dssd", "ip", "mem", "msft_lwa_00135", "msft_p37_04837", "msft_tfa_00009", "sms", "ssd", "tx", "vlan"
+    })
+    public BurstLevel(int cpu, int dssd, int ip, int mem, int windowsWebServer2008
+            , int windowsServer2008Standard, int sqlServerStandard2008, int sms, int ssd, int tx, int vlan) {
+        this.cpu = cpu;
+        this.dssd = dssd;
+        this.ip = ip;
+        this.mem = mem;
+        this.windowsWebServer2008 = windowsWebServer2008;
+        this.windowsServer2008Standard = windowsServer2008Standard;
+        this.sqlServerStandard2008 = sqlServerStandard2008;
+        this.sms = sms;
+        this.ssd = ssd;
+        this.tx = tx;
+        this.vlan = vlan;
+    }
+
+    public int getVlan() {
+        return vlan;
+    }
+
+    public int getCpu() {
+        return cpu;
+    }
+
+    public int getDssd() {
+        return dssd;
+    }
+
+    public int getIp() {
+        return ip;
+    }
+
+    public int getMem() {
+        return mem;
+    }
+
+    public int getSsd() {
+        return ssd;
+    }
+
+    public int getWindowsWebServer2008() {
+        return windowsWebServer2008;
+    }
+
+    public int getWindowsServer2008Standard() {
+        return windowsServer2008Standard;
+    }
+
+    public int getSqlServerStandard2008() {
+        return sqlServerStandard2008;
+    }
+
+    public int getSms() {
+        return sms;
+    }
+
+    public int getTx() {
+        return tx;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof BurstLevel)) return false;
+
+        BurstLevel that = (BurstLevel) o;
+
+        if (cpu != that.cpu) return false;
+        if (dssd != that.dssd) return false;
+        if (ip != that.ip) return false;
+        if (mem != that.mem) return false;
+        if (sms != that.sms) return false;
+        if (sqlServerStandard2008 != that.sqlServerStandard2008) return false;
+        if (ssd != that.ssd) return false;
+        if (tx != that.tx) return false;
+        if (vlan != that.vlan) return false;
+        if (windowsServer2008Standard != that.windowsServer2008Standard) return false;
+        if (windowsWebServer2008 != that.windowsWebServer2008) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = cpu;
+        result = 31 * result + dssd;
+        result = 31 * result + ip;
+        result = 31 * result + mem;
+        result = 31 * result + windowsWebServer2008;
+        result = 31 * result + windowsServer2008Standard;
+        result = 31 * result + sqlServerStandard2008;
+        result = 31 * result + sms;
+        result = 31 * result + ssd;
+        result = 31 * result + tx;
+        result = 31 * result + vlan;
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "cpu=" + cpu +
+                ", dssd=" + dssd +
+                ", ip=" + ip +
+                ", mem=" + mem +
+                ", windowsWebServer2008=" + windowsWebServer2008 +
+                ", windowsServer2008Standard=" + windowsServer2008Standard +
+                ", sqlServerStandard2008=" + sqlServerStandard2008 +
+                ", sms=" + sms +
+                ", ssd=" + ssd +
+                ", tx=" + tx +
+                ", vlan=" + vlan +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CreateSubscriptionRequest.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CreateSubscriptionRequest.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CreateSubscriptionRequest.java
new file mode 100644
index 0000000..160f44a
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CreateSubscriptionRequest.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.jclouds.cloudsigma2.domain;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class CreateSubscriptionRequest {
+
+    public static class Builder{
+        private String amount;
+        private String period;
+        private SubscriptionResource resource;
+
+        /**
+         * @param amount Subscription amount
+         * CreateSubscriptionRequest Builder
+         */
+        public Builder amount(String amount){
+            this.amount = amount;
+            return this;
+        }
+
+        /**
+         * @param period Duration of the subscription
+         * CreateSubscriptionRequest Builder
+         */
+        public Builder period(String period){
+            this.period = period;
+            return this;
+        }
+
+        /**
+         * @param resource Name of resource associated with the subscription
+         * CreateSubscriptionRequest Builder
+         */
+        public Builder resource(SubscriptionResource resource){
+            this.resource = resource;
+            return this;
+        }
+
+        public CreateSubscriptionRequest build(){
+            return new CreateSubscriptionRequest(amount, period, resource);
+        }
+    }
+
+    private final String amount;
+    private final String period;
+    private final SubscriptionResource resource;
+
+    public CreateSubscriptionRequest(String amount, String period, SubscriptionResource resource) {
+        this.amount = amount;
+        this.period = period;
+        this.resource = resource;
+    }
+
+    /**
+     * @return Subscription amount
+     */
+    public String getAmount() {
+        return amount;
+    }
+
+    /**
+     * @return Duration of the subscription
+     */
+    public String getPeriod() {
+        return period;
+    }
+
+    /**
+     * @return Name of resource associated with the subscription
+     */
+    public SubscriptionResource getResource() {
+        return resource;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "amount='" + amount + '\'' +
+                ", period='" + period + '\'' +
+                ", resource=" + resource +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CurrentUsage.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CurrentUsage.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CurrentUsage.java
new file mode 100644
index 0000000..c7ffabb
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CurrentUsage.java
@@ -0,0 +1,91 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class CurrentUsage {
+
+    public static class Builder{
+        private AccountBalance balance;
+        private AccountUsage usage;
+
+        public Builder balance(AccountBalance balance) {
+            this.balance = balance;
+            return this;
+        }
+
+        public Builder usage(AccountUsage usage) {
+            this.usage = usage;
+            return this;
+        }
+
+        public CurrentUsage build(){
+            return new CurrentUsage(balance, usage);
+        }
+    }
+
+    private final AccountBalance balance;
+    private final AccountUsage usage;
+
+    @ConstructorProperties({
+            "balance", "usage"
+    })
+    public CurrentUsage(AccountBalance balance, AccountUsage usage) {
+        this.balance = balance;
+        this.usage = usage;
+    }
+
+    public AccountBalance getBalance() {
+        return balance;
+    }
+
+    public AccountUsage getUsage() {
+        return usage;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof CurrentUsage)) return false;
+
+        CurrentUsage that = (CurrentUsage) o;
+
+        if (balance != null ? !balance.equals(that.balance) : that.balance != null) return false;
+        if (usage != null ? !usage.equals(that.usage) : that.usage != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = balance != null ? balance.hashCode() : 0;
+        result = 31 * result + (usage != null ? usage.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "balance=" + balance +
+                ", usage=" + usage +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DeviceEmulationType.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DeviceEmulationType.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DeviceEmulationType.java
new file mode 100644
index 0000000..e3b72f0
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DeviceEmulationType.java
@@ -0,0 +1,43 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public enum DeviceEmulationType {
+    IDE, VIRTIO, UNRECOGNIZED;
+
+    public String value() {
+        return name().toLowerCase();
+    }
+
+    @Override
+    public String toString() {
+        return value();
+    }
+
+    public static DeviceEmulationType fromValue(String type) {
+        try {
+            return valueOf(checkNotNull(type, "type").toUpperCase());
+        } catch (IllegalArgumentException e) {
+            return UNRECOGNIZED;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Discount.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Discount.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Discount.java
new file mode 100644
index 0000000..a33b5b8
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Discount.java
@@ -0,0 +1,78 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class Discount {
+
+    private final String period;
+    private final Double value;
+
+    @ConstructorProperties({
+            "period", "value"
+    })
+    public Discount(String period, Double value) {
+        this.period = period;
+        this.value = value;
+    }
+
+    /**
+     * @return The minimum period for this discount
+     */
+    public String getPeriod() {
+        return period;
+    }
+
+    /**
+     * @return The value of the discount
+     */
+    public Double getValue() {
+        return value;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Discount)) return false;
+
+        Discount discount = (Discount) o;
+
+        if (period != null ? !period.equals(discount.period) : discount.period != null) return false;
+        if (value != null ? !value.equals(discount.value) : discount.value != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = period != null ? period.hashCode() : 0;
+        result = 31 * result + (value != null ? value.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "period='" + period + '\'' +
+                ", value=" + value +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Drive.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Drive.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Drive.java
new file mode 100644
index 0000000..13db449
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/Drive.java
@@ -0,0 +1,174 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import com.google.common.base.Objects;
+import org.jclouds.javax.annotation.Nullable;
+
+import java.beans.ConstructorProperties;
+import java.net.URI;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class Drive extends Item {
+
+    public static class Builder extends Item.Builder {
+        protected Owner owner;
+        protected DriveStatus status = DriveStatus.UNMOUNTED;
+
+        /**
+         * @param owner Owner of the drive
+         * @return Drive Builder
+         */
+        public Builder owner(Owner owner) {
+            this.owner = owner;
+            return this;
+        }
+
+        /**
+         * @param status Status of the drive
+         * @return Drive Builder
+         */
+        public Builder status(DriveStatus status) {
+            this.status = status;
+            return this;
+        }
+
+        /**
+         * @param uuid UUID of the drive
+         * @return Drive Builder
+         */
+        @Override
+        public Builder uuid(String uuid) {
+            return Builder.class.cast(super.uuid(uuid));
+        }
+
+        /**
+         * @param name Human readable name of the drive
+         * @return Drive Builder
+         */
+        @Override
+        public Builder name(String name) {
+            return Builder.class.cast(super.name(name));
+        }
+
+        /**
+         * @return Drive Builder
+         */
+        @Override
+        public Builder resourceUri(URI resourceUri) {
+            return Builder.class.cast(super.resourceUri(resourceUri));
+        }
+
+        public Drive build() {
+            return new Drive(uuid, name, resourceUri, owner, status);
+        }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ((name == null) ? 0 : name.hashCode());
+            result = prime * result + ((owner == null) ? 0 : owner.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (getClass() != obj.getClass())
+                return false;
+            Drive other = (Drive) obj;
+            if (owner != other.owner)
+                return false;
+            if (!Objects.equal(status, other.status))
+                return false;
+            if (!Objects.equal(name, other.name))
+                return false;
+            return true;
+        }
+    }
+
+    protected final Owner owner;
+    protected final DriveStatus status;
+
+    @ConstructorProperties({
+            "uuid", "name", "resource_uri", "owner", "status"
+    })
+    public Drive(@Nullable String uuid, String name, @Nullable URI resourceUri, @Nullable Owner owner, DriveStatus status) {
+        super(uuid, name, resourceUri);
+
+        this.owner = owner;
+        this.status = status;
+    }
+
+    /**
+     * @return Owner of the drive
+     */
+    public Owner getOwner() {
+        return owner;
+    }
+
+    /**
+     * @return Status of the drive
+     */
+    public DriveStatus getStatus() {
+        return status;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Drive)) return false;
+        if (!super.equals(o)) return false;
+
+        Drive drive = (Drive) o;
+
+        if (owner != null ? !owner.equals(drive.owner) : drive.owner != null) return false;
+        if (status != drive.status) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (owner != null ? owner.hashCode() : 0);
+        result = 31 * result + (status != null ? status.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[uuid=" + uuid + ", name=" + name + ", owner=" + owner + ", status=" + status + "]";
+    }
+
+    /**
+     * Creates drive for attaching to server
+     *
+     * @param bootOrder drive boot order
+     * @param deviceChannel device channel in format {controller:unit} ex. 0:1, 0:2, etc.
+     * @param deviceEmulationType device emulation type
+     */
+    public ServerDrive toServerDrive(int bootOrder, String deviceChannel, DeviceEmulationType deviceEmulationType){
+        return new ServerDrive(bootOrder, deviceChannel, deviceEmulationType, this.uuid);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveInfo.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveInfo.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveInfo.java
new file mode 100644
index 0000000..f5490d3
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveInfo.java
@@ -0,0 +1,329 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import com.google.common.collect.ImmutableList;
+
+import javax.inject.Named;
+import java.beans.ConstructorProperties;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class DriveInfo extends Drive {
+    public static class Builder extends Drive.Builder {
+
+        protected BigInteger size;
+        protected boolean allowMultimount;
+        protected List<String> affinities;
+        protected List<String> jobs;
+        protected List<DriveLicense> licenses;
+        protected MediaType media = MediaType.UNRECOGNIZED;
+        protected Map<String, String> meta;
+        protected List<Server> mountedOn;
+        protected List<String> tags;
+
+        /**
+         * @param size Size of the drive in bytes
+         * @return DriveInfo Builder
+         */
+        public Builder size(BigInteger size) {
+            this.size = size;
+            return this;
+        }
+
+        /**
+         * @param allowMultimount Allow the drive to be mounted on multiple guests
+         * @return DriveInfo Builder
+         */
+        public Builder allowMultimount(boolean allowMultimount) {
+            this.allowMultimount = allowMultimount;
+            return this;
+        }
+
+        /**
+         * @param affinities A list of affinities this drive should belong to
+         * @return DriveInfo Builder
+         */
+        public Builder affinities(List<String> affinities) {
+            this.affinities = ImmutableList.copyOf(affinities);
+            return this;
+        }
+
+        /**
+         * @param jobs Background jobs related to this resource
+         * @return DriveInfo Builder
+         */
+        public Builder jobs(List<String> jobs) {
+            this.jobs = ImmutableList.copyOf(jobs);
+            return this;
+        }
+
+        /**
+         * @param licenses A list of licences attached to this drive
+         * @return DriveInfo Builder
+         */
+        public Builder licenses(List<DriveLicense> licenses) {
+            this.licenses = licenses;
+            return this;
+        }
+
+        /**
+         * @param media Media representation type
+         * @return DriveInfo Builder
+         */
+        public Builder media(MediaType media) {
+            this.media = media;
+            return this;
+        }
+
+        /**
+         * @param meta User defined meta information
+         * @return DriveInfo Builder
+         */
+        public Builder meta(Map<String, String> meta) {
+            this.meta = meta;
+            return this;
+        }
+
+        /**
+         * @param mountedOn Servers on which this drive is mounted on
+         * @return DriveInfo Builder
+         */
+        public Builder mountedOn(List<Server> mountedOn) {
+            this.mountedOn = ImmutableList.copyOf(mountedOn);
+            return this;
+        }
+
+        /**
+         * @param tags Tags associated with this drive
+         * @return DriveInfo Builder
+         */
+        public Builder tags(List<String> tags) {
+            this.tags = ImmutableList.copyOf(tags);
+            return this;
+        }
+
+        /**
+         * {@inheritDoc}
+         * @return DriveInfo Builder
+         */
+        @Override
+        public Builder uuid(String uuid) {
+            return Builder.class.cast(super.uuid(uuid));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @return DriveInfo Builder
+         */
+        @Override
+        public Builder name(String name) {
+            return Builder.class.cast(super.name(name));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @return DriveInfo Builder
+         */
+        @Override
+        public Builder resourceUri(URI resourceUri) {
+            return Builder.class.cast(super.resourceUri(resourceUri));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @return DriveInfo Builder
+         */
+        @Override
+        public Builder owner(Owner owner) {
+            return Builder.class.cast(super.owner(owner));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @return DriveInfo Builder
+         */
+        @Override
+        public Builder status(DriveStatus status) {
+            return Builder.class.cast(super.status(status));
+        }
+
+        public static Builder fromDriveInfo(DriveInfo in) {
+            return new Builder().uuid(in.getUuid()).name(in.getName()).resourceUri(in.getResourceUri())
+                    .owner(in.getOwner()).status(in.getStatus()).size(in.getSize())
+                    .allowMultimount(in.isAllowMultimount()).affinities(in.getAffinities()).jobs(in.getJobs())
+                    .licenses(in.getLicenses()).media(in.getMedia()).meta(in.getMeta()).mountedOn(in.getMountedOn()).tags(in.getTags());
+        }
+
+        /**
+         * Warning: media, name & size should be specified
+         *
+         * @return DriveInfo instance
+         */
+        @Override
+        public DriveInfo build() {
+            return new DriveInfo(uuid, name, resourceUri, size, owner, status, allowMultimount, affinities, jobs, licenses
+                    , media, meta, mountedOn, tags);
+        }
+
+    }
+
+    protected final BigInteger size;
+    @Named("allow_multimount")
+    protected final boolean allowMultimount;
+    protected final List<String> affinities;
+    protected final List<String> jobs;
+    protected final List<DriveLicense> licenses;
+    protected final MediaType media;
+    protected final Map<String, String> meta;
+    @Named("mounted_on")
+    protected final List<Server> mountedOn;
+    protected final List<String> tags;
+
+    @ConstructorProperties({
+            "uuid", "name", "resource_uri", "size", "owner", "status",
+            "allow_multimount", "affinities", "jobs", "licenses",
+            "media", "meta", "mounted_on", "tags"
+    })
+    public DriveInfo(String uuid, String name, URI resourceUri,
+                     BigInteger size, Owner owner, DriveStatus status,
+                     boolean allowMultimount, List<String> affinities, List<String> jobs, List<DriveLicense> licenses,
+                     MediaType media, Map<String, String> meta, List<Server> mountedOn, List<String> tags) {
+        super(uuid, name, resourceUri, owner, status);
+        this.size = size;
+        this.allowMultimount = allowMultimount;
+        this.affinities = affinities;
+        this.jobs = jobs;
+        this.licenses = licenses;
+        this.media = media;
+        this.meta = meta;
+        this.mountedOn = mountedOn;
+        this.tags = tags;
+    }
+
+    /**
+     * @return Size of the drive in bytes
+     */
+    public BigInteger getSize() {
+        return size;
+    }
+
+    /**
+     * @return A list of affinities this drive should belong to
+     */
+    public List<String> getAffinities() {
+        return affinities;
+    }
+
+    /**
+     * @return Allow the drive to be mounted on multiple guests
+     */
+    public boolean isAllowMultimount() {
+        return allowMultimount;
+    }
+
+    /**
+     * @return Background jobs related to this resource
+     */
+    public List<String> getJobs() {
+        return jobs;
+    }
+
+    /**
+     * @return A list of licences attached to this drive
+     */
+    public List<DriveLicense> getLicenses() {
+        return licenses;
+    }
+
+    /**
+     * @return Media representation type
+     */
+    public MediaType getMedia() {
+        return media;
+    }
+
+    /**
+     * @return User defined meta information
+     */
+    public Map<String, String> getMeta() {
+        return meta;
+    }
+
+    /**
+     * @return Servers on which this drive is mounted on
+     */
+    public List<Server> getMountedOn() {
+        return mountedOn;
+    }
+
+    /**
+     * @return Tags associated with this drive
+     */
+    public List<String> getTags() {
+        return tags;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = super.hashCode();
+        result = 31 * result + (size != null ? size.hashCode() : 0);
+        result = 31 * result + (allowMultimount ? 1 : 0);
+        result = 31 * result + (affinities != null ? affinities.hashCode() : 0);
+        result = 31 * result + (jobs != null ? jobs.hashCode() : 0);
+        result = 31 * result + (licenses != null ? licenses.hashCode() : 0);
+        result = 31 * result + (media != null ? media.hashCode() : 0);
+        result = 31 * result + (meta != null ? meta.hashCode() : 0);
+        result = 31 * result + (mountedOn != null ? mountedOn.hashCode() : 0);
+        result = 31 * result + (tags != null ? tags.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof DriveInfo)) return false;
+        if (!super.equals(o)) return false;
+
+        DriveInfo driveInfo = (DriveInfo) o;
+
+        if (allowMultimount != driveInfo.allowMultimount) return false;
+        if (affinities != null ? !affinities.equals(driveInfo.affinities) : driveInfo.affinities != null) return false;
+        if (jobs != null ? !jobs.equals(driveInfo.jobs) : driveInfo.jobs != null) return false;
+        if (licenses != null ? !licenses.equals(driveInfo.licenses) : driveInfo.licenses != null) return false;
+        if (media != driveInfo.media) return false;
+        if (meta != null ? !meta.equals(driveInfo.meta) : driveInfo.meta != null) return false;
+        if (mountedOn != null ? !mountedOn.equals(driveInfo.mountedOn) : driveInfo.mountedOn != null) return false;
+        if (size != null ? !size.equals(driveInfo.size) : driveInfo.size != null) return false;
+        if (tags != null ? !tags.equals(driveInfo.tags) : driveInfo.tags != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "[uuid=" + uuid + ", name=" + name + ", size=" + size + ", owner=" + owner + ", status=" + status
+                + ", affinities=" + affinities + ", jobs=" + jobs + ", licenses=" + licenses + ", media=" + media
+                + ", meta=" + meta + ", mountedOn=" + mountedOn + ", tags=" + tags + "]";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveLicense.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveLicense.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveLicense.java
new file mode 100644
index 0000000..48b75f7
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveLicense.java
@@ -0,0 +1,106 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import java.beans.ConstructorProperties;
+
+/**
+ * @author Vladimir Shevchenko
+ */
+public class DriveLicense {
+
+    public static class Builder{
+        private int amount;
+        private License license;
+        private Owner user;
+
+        public Builder amount(int amount){
+            this.amount = amount;
+            return this;
+        }
+
+        public Builder license(License license){
+            this.license = license;
+            return this;
+        }
+
+        public Builder user(Owner user){
+            this.user = user;
+            return this;
+        }
+
+        public DriveLicense build(){
+            return new DriveLicense(amount, license, user);
+        }
+    }
+
+    private final int amount;
+    private final License license;
+    private final Owner user;
+
+    @ConstructorProperties({
+            "amount", "license", "user"
+    })
+    public DriveLicense(int amount, License license, Owner user) {
+        this.amount = amount;
+        this.license = license;
+        this.user = user;
+    }
+
+    public int getAmount() {
+        return amount;
+    }
+
+    public License getLicense() {
+        return license;
+    }
+
+    public Owner getUser() {
+        return user;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof DriveLicense)) return false;
+
+        DriveLicense that = (DriveLicense) o;
+
+        if (amount != that.amount) return false;
+        if (license != null ? !license.equals(that.license) : that.license != null) return false;
+        if (user != null ? !user.equals(that.user) : that.user != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = amount;
+        result = 31 * result + (license != null ? license.hashCode() : 0);
+        result = 31 * result + (user != null ? user.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "[" +
+                "amount=" + amount +
+                ", license='" + license + '\'' +
+                ", user=" + user +
+                "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/14619a17/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveStatus.java
----------------------------------------------------------------------
diff --git a/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveStatus.java b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveStatus.java
new file mode 100644
index 0000000..e5f74e3
--- /dev/null
+++ b/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/DriveStatus.java
@@ -0,0 +1,45 @@
+/*
+ * 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.cloudsigma2.domain;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * 
+ * @author Adrian Cole
+ */
+public enum DriveStatus {
+   MOUNTED, UNMOUNTED, UNAVAILABLE, COPYING;
+
+   public String value() {
+      return name().toLowerCase();
+   }
+
+   @Override
+   public String toString() {
+      return value();
+   }
+
+   public static DriveStatus fromValue(String status) {
+      try {
+         return valueOf(checkNotNull(status, "status").toUpperCase());
+      } catch (IllegalArgumentException e) {
+         return UNAVAILABLE;
+      }
+   }
+
+}