You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by de...@apache.org on 2016/02/19 16:33:26 UTC
[16/35] jclouds git commit: Profitbricks Drives API
Profitbricks Drives API
Conflicts:
profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/f58675e9
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/f58675e9
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/f58675e9
Branch: refs/heads/master
Commit: f58675e93de13f85156eb3ef520d9dfc636294ed
Parents: af93f3b
Author: jasminSPC <ja...@stackpointcloud.com>
Authored: Tue Mar 3 23:04:46 2015 +0100
Committer: Ignasi Barrera <na...@apache.org>
Committed: Sun Mar 8 21:20:23 2015 +0100
----------------------------------------------------------------------
.../jclouds/profitbricks/ProfitBricksApi.java | 3 +
.../drive/AddRomDriveToServerRequestBinder.java | 45 +++++++++++
.../org/jclouds/profitbricks/domain/Drive.java | 70 +++++++++++++++++
.../jclouds/profitbricks/domain/Location.java | 1 +
.../profitbricks/features/DrivesApi.java | 51 ++++++++++++
.../AddRomDriveToServerRequestBinderTest.java | 49 ++++++++++++
.../features/DrivesApiLiveTest.java | 72 +++++++++++++++++
.../features/DrivesApiMockTest.java | 81 ++++++++++++++++++++
.../image/ImageListResponseHandlerTest.java | 6 +-
.../src/test/resources/drives/drives-add.xml | 12 +++
.../src/test/resources/drives/drives-remove.xml | 12 +++
11 files changed, 399 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java
index 34309bf..12da7ea 100644
--- a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java
+++ b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java
@@ -18,6 +18,7 @@ package org.jclouds.profitbricks;
import java.io.Closeable;
import org.jclouds.profitbricks.features.DataCenterApi;
+import org.jclouds.profitbricks.features.DrivesApi;
import org.jclouds.profitbricks.features.FirewallApi;
import org.jclouds.profitbricks.features.ImageApi;
import org.jclouds.profitbricks.features.IpBlockApi;
@@ -53,4 +54,6 @@ public interface ProfitBricksApi extends Closeable {
@Delegate
IpBlockApi ipBlockApi();
+ @Delegate
+ DrivesApi drivesApi();
}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/main/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinder.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinder.java b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinder.java
new file mode 100644
index 0000000..3a931ab
--- /dev/null
+++ b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinder.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.profitbricks.binder.drive;
+
+import static java.lang.String.format;
+import org.jclouds.profitbricks.binder.BaseProfitBricksRequestBinder;
+import org.jclouds.profitbricks.domain.Drive;
+
+public class AddRomDriveToServerRequestBinder extends BaseProfitBricksRequestBinder<Drive.Request.AddRomDriveToServerPayload> {
+
+ private final StringBuilder requestBuilder;
+
+ AddRomDriveToServerRequestBinder() {
+ super("payload");
+ this.requestBuilder = new StringBuilder(128);
+ }
+
+ @Override
+ protected String createPayload(Drive.Request.AddRomDriveToServerPayload payload) {
+ requestBuilder.append("<ws:addRomDriveToServer>")
+ .append("<request>")
+ .append(format("<imageId>%s</imageId>", payload.imageId()))
+ .append(format("<serverId>%s</serverId>", payload.serverId()))
+ .append(formatIfNotEmpty("<deviceNumber>%s</deviceNumber>", payload.deviceNumber()))
+ .append("</request>")
+ .append("</ws:addRomDriveToServer>");
+
+ return requestBuilder.toString();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Drive.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Drive.java b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Drive.java
new file mode 100644
index 0000000..08add2a
--- /dev/null
+++ b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Drive.java
@@ -0,0 +1,70 @@
+/*
+ * 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.profitbricks.domain;
+
+import com.google.auto.value.AutoValue;
+
+@AutoValue
+public abstract class Drive {
+
+ public static final class Request {
+
+ @AutoValue
+ public abstract static class AddRomDriveToServerPayload {
+
+ public abstract String serverId();
+
+ public abstract String imageId();
+
+ public abstract String deviceNumber();
+
+ public static AddRomDriveToServerPayload create(String serverId, String storageId, String deviceNumber) {
+ return new AutoValue_Drive_Request_AddRomDriveToServerPayload(serverId, storageId, deviceNumber);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public static class Builder {
+
+ private String serverId;
+ private String imageId;
+ private String deviceNumber;
+
+ public Builder serverId(String serverId) {
+ this.serverId = serverId;
+ return this;
+ }
+
+ public Builder storageId(String storageId) {
+ this.imageId = storageId;
+ return this;
+ }
+
+ public Builder deviceNumber(String deviceNumber) {
+ this.deviceNumber = deviceNumber;
+ return this;
+ }
+
+ public AddRomDriveToServerPayload build() {
+ return AddRomDriveToServerPayload.create(serverId, imageId, deviceNumber);
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Location.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Location.java b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Location.java
index 0354bf4..3dd888d 100644
--- a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Location.java
+++ b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/domain/Location.java
@@ -21,6 +21,7 @@ public enum Location {
DE_FKB("de/fkb"),
DE_FRA("de/fra"),
US_LAS("us/las"),
+ US_LAS_DEV("us/lasdev"),
UNRECOGNIZED("unknown");
private final String id;
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/main/java/org/jclouds/profitbricks/features/DrivesApi.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/main/java/org/jclouds/profitbricks/features/DrivesApi.java b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/features/DrivesApi.java
new file mode 100644
index 0000000..70f70a0
--- /dev/null
+++ b/providers/profitbricks/src/main/java/org/jclouds/profitbricks/features/DrivesApi.java
@@ -0,0 +1,51 @@
+/*
+ * 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.profitbricks.features;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.jclouds.http.filters.BasicAuthentication;
+import org.jclouds.profitbricks.binder.drive.AddRomDriveToServerRequestBinder;
+import org.jclouds.profitbricks.domain.Drive;
+import org.jclouds.profitbricks.http.filters.ProfitBricksSoapMessageEnvelope;
+import org.jclouds.profitbricks.http.parser.RequestIdOnlyResponseHandler;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.Payload;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.XMLResponseParser;
+
+@RequestFilters({BasicAuthentication.class, ProfitBricksSoapMessageEnvelope.class})
+@Consumes(MediaType.TEXT_XML)
+@Produces(MediaType.TEXT_XML)
+public interface DrivesApi {
+
+ @POST
+ @Named("drives:add")
+ @MapBinder(AddRomDriveToServerRequestBinder.class)
+ @XMLResponseParser(RequestIdOnlyResponseHandler.class)
+ String addRomDriveToServer(@PayloadParam("payload") Drive.Request.AddRomDriveToServerPayload payload);
+
+ @POST
+ @Named("drives:remove")
+ @Payload("<ws:removeRomDriveFromServer><imageId>{imageid}</imageId><serverId>{serverid}</serverId></ws:removeRomDriveFromServer>")
+ @XMLResponseParser(RequestIdOnlyResponseHandler.class)
+ String removeRomDriveFromServer(@PayloadParam("imageid") String imageid, @PayloadParam("serverid") String serverid);
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinderTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinderTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinderTest.java
new file mode 100644
index 0000000..13fb7f1
--- /dev/null
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/binder/drive/AddRomDriveToServerRequestBinderTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.profitbricks.binder.drive;
+
+import org.jclouds.profitbricks.domain.Drive;
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "AddRomDriveToServerRequestBinderTest")
+public class AddRomDriveToServerRequestBinderTest {
+
+ @Test
+ public void testAddRomDriveToServerPayload() {
+ AddRomDriveToServerRequestBinder binder = new AddRomDriveToServerRequestBinder();
+
+ Drive.Request.AddRomDriveToServerPayload payload = Drive.Request.AddRomDriveToServerPayload.builder()
+ .serverId("server-id")
+ .storageId("image-id")
+ .deviceNumber("device-number")
+ .build();
+
+ String actual = binder.createPayload(payload);
+ assertEquals(expectedPayload, actual);
+ }
+
+ private final String expectedPayload
+ = (" <ws:addRomDriveToServer>"
+ + " <request>"
+ + " <imageId>image-id</imageId>"
+ + " <serverId>server-id</serverId>"
+ + " <deviceNumber>device-number</deviceNumber>"
+ + " </request>"
+ + " </ws:addRomDriveToServer>").replaceAll("\\s+", "");
+
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiLiveTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiLiveTest.java
new file mode 100644
index 0000000..aacc314
--- /dev/null
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiLiveTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.profitbricks.features;
+
+import autovalue.shaded.com.google.common.common.collect.Iterables;
+import java.util.List;
+import org.jclouds.profitbricks.BaseProfitBricksLiveTest;
+import org.jclouds.profitbricks.domain.Drive;
+import org.jclouds.profitbricks.domain.Image;
+import org.jclouds.profitbricks.domain.Server;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", testName = "DrivesApiLiveTest", singleThreaded = true)
+public class DrivesApiLiveTest extends BaseProfitBricksLiveTest {
+
+ public String serverId;
+ public String imageId;
+
+ @Override
+ protected void initialize() {
+ super.initialize();
+
+ List<Server> servers = api.serverApi().getAllServers();
+ assertFalse(servers.isEmpty(), "At least one server is required to run drives test.");
+
+ Server server = Iterables.getFirst(servers, null);
+ assertNotNull(server);
+
+ this.serverId = server.id();
+
+ List<Image> images = api.imageApi().getAllImages();
+ assertFalse(images.isEmpty(), "At least one image is required to run drives test.");
+
+ Image image = Iterables.getFirst(images, null);
+ assertNotNull(image);
+
+ this.imageId = image.id();
+ }
+
+ @Test
+ public void addRomDriveToServerTest() {
+ String requestId = api.drivesApi().addRomDriveToServer(Drive.Request.AddRomDriveToServerPayload.builder()
+ .serverId(serverId)
+ .storageId("05cadf29-6c12-11e4-beeb-52540066fee9")
+ .deviceNumber("0")
+ .build());
+ assertNotNull(requestId);
+ }
+
+ @Test (dependsOnMethods = "addRomDriveToServerTest")
+ public void removeRomDriveFromServerTest() {
+ String requestId = api.drivesApi().removeRomDriveFromServer(imageId, serverId);
+
+ assertNotNull(requestId);
+ }
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiMockTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiMockTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiMockTest.java
new file mode 100644
index 0000000..d55676d
--- /dev/null
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/features/DrivesApiMockTest.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.profitbricks.features;
+
+import com.squareup.okhttp.mockwebserver.MockResponse;
+import com.squareup.okhttp.mockwebserver.MockWebServer;
+import org.jclouds.profitbricks.ProfitBricksApi;
+import org.jclouds.profitbricks.domain.Drive;
+import org.jclouds.profitbricks.internal.BaseProfitBricksMockTest;
+import static org.jclouds.profitbricks.internal.BaseProfitBricksMockTest.mockWebServer;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "DrivesApiMockTest")
+public class DrivesApiMockTest extends BaseProfitBricksMockTest {
+
+ @Test
+ public void addRomDriveToServerTest() throws Exception {
+ MockWebServer server = mockWebServer();
+ server.enqueue(new MockResponse().setBody(payloadFromResource("/drives/drives-add.xml")));
+
+ ProfitBricksApi pbApi = api(server.getUrl(rootUrl));
+ DrivesApi api = pbApi.drivesApi();
+
+ String content = "<ws:addRomDriveToServer>"
+ + "<request>"
+ + "<imageId>image-id</imageId>"
+ + "<serverId>server-id</serverId>"
+ + "<deviceNumber>device-number</deviceNumber>"
+ + "</request>"
+ + "</ws:addRomDriveToServer>";
+ try {
+ String requestId = api.addRomDriveToServer(Drive.Request.AddRomDriveToServerPayload.builder()
+ .serverId("server-id")
+ .storageId("image-id")
+ .deviceNumber("device-number")
+ .build());
+ assertRequestHasCommonProperties(server.takeRequest(), content);
+ assertNotNull(requestId);
+ } finally {
+ pbApi.close();
+ server.shutdown();
+ }
+ }
+
+ @Test
+ public void removeRomDriveFromServerTest() throws Exception {
+ MockWebServer server = mockWebServer();
+ server.enqueue(new MockResponse().setBody(payloadFromResource("/drives/drives-remove.xml")));
+
+ ProfitBricksApi pbApi = api(server.getUrl(rootUrl));
+ DrivesApi api = pbApi.drivesApi();
+
+ String content = "<ws:removeRomDriveFromServer>"
+ + "<imageId>image-id</imageId>"
+ + "<serverId>server-id</serverId>"
+ + "</ws:removeRomDriveFromServer>";
+ try {
+ String requestId = api.removeRomDriveFromServer("image-id", "server-id");
+ assertRequestHasCommonProperties(server.takeRequest(), content);
+ assertNotNull(requestId);
+ } finally {
+ pbApi.close();
+ server.shutdown();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/image/ImageListResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/image/ImageListResponseHandlerTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/image/ImageListResponseHandlerTest.java
index 4827138..7d0cb88 100644
--- a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/image/ImageListResponseHandlerTest.java
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/image/ImageListResponseHandlerTest.java
@@ -91,7 +91,7 @@ public class ImageListResponseHandlerTest extends BaseResponseHandlerTest<List<I
.name("Debian-jessie-prerelease-server-2015-01-01")
.size(2048f)
.type(Image.Type.HDD)
- .location(Location.UNRECOGNIZED)
+ .location(Location.US_LAS_DEV)
.isNicHotPlug(true)
.isNicHotUnPlug(true)
.osType(OsType.LINUX)
@@ -110,7 +110,7 @@ public class ImageListResponseHandlerTest extends BaseResponseHandlerTest<List<I
.name("Fedora-19-server-2015-01-01")
.size(2048f)
.type(Image.Type.HDD)
- .location(Location.UNRECOGNIZED)
+ .location(Location.US_LAS_DEV)
.isNicHotPlug(true)
.isNicHotUnPlug(true)
.osType(OsType.LINUX)
@@ -129,7 +129,7 @@ public class ImageListResponseHandlerTest extends BaseResponseHandlerTest<List<I
.name("Ubuntu-12.04-LTS-server-2015-01-01")
.size(2048f)
.type(Image.Type.HDD)
- .location(Location.UNRECOGNIZED)
+ .location(Location.US_LAS_DEV)
.isNicHotPlug(true)
.isNicHotUnPlug(true)
.osType(OsType.LINUX)
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/resources/drives/drives-add.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/drives/drives-add.xml b/providers/profitbricks/src/test/resources/drives/drives-add.xml
new file mode 100644
index 0000000..752f8f3
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/drives/drives-add.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
+ <S:Body>
+ <ns2:addRomDriveToServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
+ <return>
+ <requestId>request-id</requestId>
+ <dataCenterId>datacenter-id</dataCenterId>
+ <dataCenterVersion>datacenter-version</dataCenterVersion>
+ </return>
+ </ns2:addRomDriveToServerResponse>
+ </S:Body>
+</S:Envelope>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jclouds/blob/f58675e9/providers/profitbricks/src/test/resources/drives/drives-remove.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/drives/drives-remove.xml b/providers/profitbricks/src/test/resources/drives/drives-remove.xml
new file mode 100644
index 0000000..ccfd400
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/drives/drives-remove.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
+ <S:Body>
+ <ns2:removeRomDriveFromServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
+ <return>
+ <requestId>request-id</requestId>
+ <dataCenterId>datacenter-id</dataCenterId>
+ <dataCenterVersion>datacenter-version</dataCenterVersion>
+ </return>
+ </ns2:removeRomDriveFromServerResponse>
+ </S:Body>
+</S:Envelope>
\ No newline at end of file