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:29 UTC

[19/35] jclouds git commit: JClouds Profitbricks provider - LoadBalancer API

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerListResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerListResponseHandlerTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerListResponseHandlerTest.java
new file mode 100644
index 0000000..cec0999
--- /dev/null
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerListResponseHandlerTest.java
@@ -0,0 +1,75 @@
+/*
+ * 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.http.parser.loadbalancer;
+
+import com.google.common.collect.ImmutableList;
+import java.util.List;
+import org.jclouds.date.DateCodec;
+import org.jclouds.date.DateCodecFactory;
+import org.jclouds.http.functions.ParseSax;
+import org.jclouds.profitbricks.domain.Firewall;
+import org.jclouds.profitbricks.domain.LoadBalancer;
+import org.jclouds.profitbricks.domain.LoadBalancer.Algorithm;
+import org.jclouds.profitbricks.domain.ProvisioningState;
+import org.jclouds.profitbricks.domain.Server;
+import org.jclouds.profitbricks.http.parser.BaseResponseHandlerTest;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "LoadBalancerListResponseHandlerTest")
+public class LoadBalancerListResponseHandlerTest extends BaseResponseHandlerTest<List<LoadBalancer>> {
+
+   @Override
+   protected ParseSax<List<LoadBalancer>> createParser() {
+      return factory.create(injector.getInstance(LoadBalancerListResponseHandler.class));
+   }
+
+   protected DateCodecFactory createDateParser() {
+      return injector.getInstance(DateCodecFactory.class);
+   }
+
+   @Test
+   public void testParseResponseFromGetAllLoadbalancer() {
+      ParseSax<List<LoadBalancer>> parser = createParser();
+
+      List<LoadBalancer> actual = parser.parse(payloadFromResource("/loadbalancer/loadbalancers.xml"));
+      assertNotNull(actual, "Parsed content returned null");
+
+      DateCodec dateParser = createDateParser().iso8601();
+
+      List<LoadBalancer> expected = ImmutableList.<LoadBalancer>of(LoadBalancer.builder().id("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee").loadBalancerAlgorithm(Algorithm.ROUND_ROBIN).name("load-1234567890-name")
+              .dataCenterId("datacenter-id").dataCenterVersion("datacenter-version").internetAccess(true).ip("192.168.0.1").lanId("lan-id").state(ProvisioningState.AVAILABLE).creationTime(dateParser.toDate("2014-12-04T07:09:23.138Z")).lastModificationTime(dateParser.toDate("2014-12-04T07:09:23.138Z"))
+              .firewalls(ImmutableList.<Firewall>of(
+                              Firewall.builder().id("firewall-id").nicId("nic-id").active(false).state(ProvisioningState.AVAILABLE).build()
+                      ))
+              .balancedServers(ImmutableList.<Server>of(
+                              Server.builder().activate(true).balancedNicId("balanced-nic-id").id("server-id").name("server-name").build()
+                      )).build(),
+              LoadBalancer.builder().id("qqqqqqqq-wwww-rrrr-tttt-yyyyyyyyyyyy").loadBalancerAlgorithm(Algorithm.ROUND_ROBIN).name("load-balancer-name")
+              .dataCenterId("datacenter-id").dataCenterVersion("datacenter-version").internetAccess(false).ip("192.168.0.1").lanId("lan-id").state(ProvisioningState.AVAILABLE).creationTime(dateParser.toDate("2014-12-04T07:09:23.138Z")).lastModificationTime(dateParser.toDate("2014-12-04T07:09:23.138Z"))
+              .firewalls(ImmutableList.<Firewall>of(
+                              Firewall.builder().id("firewall-id").nicId("nic-id").active(false).state(ProvisioningState.AVAILABLE).build()
+                      ))
+              .balancedServers(ImmutableList.<Server>of(
+                              Server.builder().activate(false).balancedNicId("balanced-nic-id").id("server-id").name("server-name").build()
+                      ))
+              .build()
+      );
+      assertEquals(actual, expected);
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerResponseHandlerTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerResponseHandlerTest.java
new file mode 100644
index 0000000..365383b
--- /dev/null
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/loadbalancer/LoadBalancerResponseHandlerTest.java
@@ -0,0 +1,93 @@
+/*
+ * 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.http.parser.loadbalancer;
+
+import com.google.common.collect.Lists;
+import java.util.List;
+import org.jclouds.date.DateCodec;
+import org.jclouds.date.DateCodecFactory;
+import org.jclouds.http.functions.ParseSax;
+import org.jclouds.profitbricks.domain.Firewall;
+import org.jclouds.profitbricks.domain.LoadBalancer;
+import org.jclouds.profitbricks.domain.LoadBalancer.Algorithm;
+import org.jclouds.profitbricks.domain.ProvisioningState;
+import org.jclouds.profitbricks.domain.Server;
+import org.jclouds.profitbricks.domain.Storage;
+import org.jclouds.profitbricks.http.parser.BaseResponseHandlerTest;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "LoadBalancerResponseHandlerTest")
+public class LoadBalancerResponseHandlerTest extends BaseResponseHandlerTest<LoadBalancer> {
+
+   @Override
+   protected ParseSax<LoadBalancer> createParser() {
+      return factory.create(injector.getInstance(LoadBalancerResponseHandler.class));
+   }
+
+   protected DateCodecFactory createDateParser() {
+      return injector.getInstance(DateCodecFactory.class);
+   }
+
+   @Test
+   public void testParseResponseFromGetLoadbalancer() {
+      ParseSax<LoadBalancer> parser = createParser();
+
+      LoadBalancer actual = parser.parse(payloadFromResource("/loadbalancer/loadbalancer.xml"));
+      assertNotNull(actual, "Parsed content returned null");
+
+      DateCodec dateParser = createDateParser().iso8601();
+
+      List<Storage> emptyStorages = Lists.newArrayList();
+
+      List<Server> balancedServers = Lists.newArrayList();
+      balancedServers.add(Server.builder()
+              .activate(true)
+              .balancedNicId("balanced-nic-id")
+              .id("server-id")
+              .name("server-name")
+              .storages(emptyStorages)
+              .build());
+      List<Firewall> firewalls = Lists.newArrayList();
+      firewalls.add(Firewall.builder()
+              .id("firewall-id")
+              .nicId("nic-id")
+              .active(false)
+              .state(ProvisioningState.AVAILABLE)
+              .build());
+
+      LoadBalancer expected = LoadBalancer.builder()
+              .id("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
+              .loadBalancerAlgorithm(Algorithm.ROUND_ROBIN)
+              .name("load-balancer-name")
+              .dataCenterId("datacenter-id")
+              .dataCenterVersion("datacenter-version")
+              .internetAccess(true)
+              .ip("192.168.0.1")
+              .lanId("lan-id")
+              .state(ProvisioningState.AVAILABLE)
+              .creationTime(dateParser.toDate("2014-12-12T03:08:35.629Z"))
+              .lastModificationTime(dateParser.toDate("2014-12-12T03:08:35.629Z"))
+              .firewalls(firewalls)
+              .balancedServers(balancedServers)
+              .build();
+
+      assertEquals(actual, expected);
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java
index eb8feb9..88124e7 100644
--- a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java
@@ -74,6 +74,8 @@ public class ServerInfoResponseHandlerTest extends BaseResponseHandlerTest<Serve
               .isNicHotUnPlug(true)
               .isDiscVirtioHotPlug(true)
               .isDiscVirtioHotUnPlug(true)
+              .activate(true)
+              .balancedNicId("qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh")
               .storages(ImmutableList.<Storage>of(
                               Storage.builder()
                               .bootDevice(Boolean.TRUE)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerListResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerListResponseHandlerTest.java b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerListResponseHandlerTest.java
index 9f759cf..1442ba9 100644
--- a/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerListResponseHandlerTest.java
+++ b/providers/profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerListResponseHandlerTest.java
@@ -77,6 +77,8 @@ public class ServerListResponseHandlerTest extends BaseResponseHandlerTest<List<
               .isNicHotUnPlug(true)
               .isDiscVirtioHotPlug(true)
               .isDiscVirtioHotUnPlug(true)
+              .activate(true)
+              .balancedNicId("qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh")
               .storages(ImmutableList.<Storage>of(
                               Storage.builder()
                               .bootDevice(Boolean.TRUE)
@@ -128,6 +130,8 @@ public class ServerListResponseHandlerTest extends BaseResponseHandlerTest<List<
               .isNicHotUnPlug(true)
               .isDiscVirtioHotPlug(true)
               .isDiscVirtioHotUnPlug(true)
+              .activate(true)
+              .balancedNicId("qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh")
               .storages(ImmutableList.<Storage>of(
                               Storage.builder()
                               .bootDevice(Boolean.TRUE)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-create.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-create.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-create.xml
new file mode 100644
index 0000000..14ad678
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-create.xml
@@ -0,0 +1,17 @@
+<soapenv:Envelope
+  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
+  xmlns:ws='http://ws.api.profitbricks.com/'>
+    <soapenv:Header />
+    <soapenv:Body>
+        <ws:createLoadBalancer>
+            <request>
+                <dataCenterId>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</dataCenterId>
+                <loadBalancerName>load-balancer-name</loadBalancerName>
+                <loadBalancerAlgorithm>ROUND_ROBIN</loadBalancerAlgorithm>
+                <ip>192.168.0.1</ip>
+                <lanId>lan-id</lanId>
+                <serverIds>server-ids</serverIds>
+            </request>
+        </ws:createLoadBalancer>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-delete.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-delete.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-delete.xml
new file mode 100644
index 0000000..b699be6
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-delete.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:deleteLoadBalancerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
+      <return>
+        <requestId>request-id</requestId>
+        <dataCenterId>datacenter-id</dataCenterId>
+        <dataCenterVersion>datacenter-version</dataCenterVersion>
+      </return>
+    </ns2:deleteLoadBalancerResponse>
+  </S:Body>
+</S:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-deregister.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-deregister.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-deregister.xml
new file mode 100644
index 0000000..ee03c47
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-deregister.xml
@@ -0,0 +1,14 @@
+<soapenv:Envelope
+  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
+  xmlns:ws='http://ws.api.profitbricks.com/'>
+    <soapenv:Header />
+    <soapenv:Body>
+        <ws:deregisterServersOnLoadBalancer>
+			<request>
+                <serverIds>1</serverIds>
+                <serverIds>2</serverIds>
+                <loadBalancerId>load-balancer-id</loadBalancerId>
+			<request>
+        </ws:deregisterServersOnLoadBalancer>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-register.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-register.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-register.xml
new file mode 100644
index 0000000..48a1ff1
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-register.xml
@@ -0,0 +1,13 @@
+<soapenv:Envelope
+  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
+  xmlns:ws='http://ws.api.profitbricks.com/'>
+    <soapenv:Header/>
+    <soapenv:Body>
+        <ws:registerServersOnLoadBalancer>
+			<request>
+                <serverIds>1234</serverIds>
+                <loadBalancerId>load-balancer-id</loadBalancerId>
+			</request>
+        </ws:registerServersOnLoadBalancer>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-update.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-update.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-update.xml
new file mode 100644
index 0000000..7a39dea
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer-update.xml
@@ -0,0 +1,15 @@
+<soapenv:Envelope
+  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
+  xmlns:ws='http://ws.api.profitbricks.com/'>
+    <soapenv:Header />
+    <soapenv:Body>
+        <ws:updateLoadBalancer>
+            <request>
+                <loadBalancerId>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</loadBalancerId>
+                <loadBalancerName>load-balancer-name</loadBalancerName>
+                <loadBalancerAlgorithm>ROUND_ROBIN</loadBalancerAlgorithm>
+                <ip>192.168.0.1</ip>              
+            </request>
+        </ws:updateLoadBalancer>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer.xml
new file mode 100644
index 0000000..501e470
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancer.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
+    <S:Body>
+        <ns2:getLoadBalancerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
+            <return>
+                <dataCenterId>datacenter-id</dataCenterId>
+                <dataCenterVersion>datacenter-version</dataCenterVersion>
+                <loadBalancerId>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</loadBalancerId>
+                <loadBalancerName>load-balancer-name</loadBalancerName>
+                <loadBalancerAlgorithm>ROUND_ROBIN</loadBalancerAlgorithm>
+                <internetAccess>true</internetAccess>
+                <ip>192.168.0.1</ip>
+                <lanId>lan-id</lanId>
+                <balancedServers>
+                    <activate>true</activate>
+                    <balancedNicId>balanced-nic-id</balancedNicId>
+                    <serverId>server-id</serverId>
+                    <serverName>server-name</serverName>
+                </balancedServers>
+                <provisioningState>AVAILABLE</provisioningState>
+                <creationTime>2014-12-12T03:08:35.629Z</creationTime>
+                <lastModificationTime>2014-12-12T03:08:35.629Z</lastModificationTime>
+                <firewall>
+                    <active>false</active>
+                    <firewallId>firewall-id</firewallId>
+                    <nicId>nic-id</nicId>
+                    <provisioningState>AVAILABLE</provisioningState>
+                </firewall>
+            </return>
+        </ns2:getLoadBalancerResponse>
+    </S:Body>
+</S:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/loadbalancer/loadbalancers.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/loadbalancer/loadbalancers.xml b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancers.xml
new file mode 100644
index 0000000..155a1e3
--- /dev/null
+++ b/providers/profitbricks/src/test/resources/loadbalancer/loadbalancers.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
+    <S:Body>
+        <ns2:getAllLoadBalancersResponse xmlns:ns2="http://ws.api.profitbricks.com/">
+            <return>
+                <dataCenterId>datacenter-id</dataCenterId>
+                <dataCenterVersion>datacenter-version</dataCenterVersion>
+                <loadBalancerId>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</loadBalancerId>
+                <loadBalancerName>load-1234567890-name</loadBalancerName>
+                <loadBalancerAlgorithm>ROUND_ROBIN</loadBalancerAlgorithm>
+                <internetAccess>true</internetAccess>
+                <ip>192.168.0.1</ip>
+                <lanId>lan-id</lanId>
+                <balancedServers>
+                    <activate>true</activate>
+                    <balancedNicId>balanced-nic-id</balancedNicId>
+                    <serverId>server-id</serverId>
+                    <serverName>server-name</serverName>
+                </balancedServers>
+                <provisioningState>AVAILABLE</provisioningState>
+                <creationTime>2014-12-04T07:09:23.138Z</creationTime>
+                <lastModificationTime>2014-12-04T07:09:23.138Z</lastModificationTime>
+                <firewall>
+                    <active>false</active>
+                    <firewallId>firewall-id</firewallId>
+                    <nicId>nic-id</nicId>
+                    <provisioningState>AVAILABLE</provisioningState>
+                </firewall>
+            </return>
+            <return>
+                <dataCenterId>datacenter-id</dataCenterId>
+                <dataCenterVersion>datacenter-version</dataCenterVersion>
+                <loadBalancerId>qqqqqqqq-wwww-rrrr-tttt-yyyyyyyyyyyy</loadBalancerId>
+                <loadBalancerName>load-balancer-name</loadBalancerName>
+                <loadBalancerAlgorithm>ROUND_ROBIN</loadBalancerAlgorithm>
+                <internetAccess>false</internetAccess>
+                <ip>192.168.0.1</ip>
+                <lanId>lan-id</lanId>
+                <balancedServers>
+                    <activate>false</activate>
+                    <balancedNicId>balanced-nic-id</balancedNicId>
+                    <serverId>server-id</serverId>
+                    <serverName>server-name</serverName>
+                </balancedServers>
+                <provisioningState>AVAILABLE</provisioningState>
+                <creationTime>2014-12-04T07:09:23.138Z</creationTime>
+                <lastModificationTime>2014-12-04T07:09:23.138Z</lastModificationTime>
+                <firewall>
+                    <active>false</active>
+                    <firewallId>firewall-id</firewallId>
+                    <nicId>nic-id</nicId>
+                    <provisioningState>AVAILABLE</provisioningState>
+                </firewall>
+            </return>
+        </ns2:getAllLoadBalancersResponse>
+    </S:Body>
+</S:Envelope>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/server/server.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/server/server.xml b/providers/profitbricks/src/test/resources/server/server.xml
index 8fac75d..33fa824 100644
--- a/providers/profitbricks/src/test/resources/server/server.xml
+++ b/providers/profitbricks/src/test/resources/server/server.xml
@@ -12,6 +12,8 @@
                 <ram>4096</ram>
                 <internetAccess>true</internetAccess>
                 <ips>173.252.120.6</ips>
+				<balancedNicId>qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh</balancedNicId>
+				<activate>true</activate>
                 <connectedStorages>
                     <bootDevice>true</bootDevice>
                     <busType>VIRTIO</busType>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/23f158f3/providers/profitbricks/src/test/resources/server/servers.xml
----------------------------------------------------------------------
diff --git a/providers/profitbricks/src/test/resources/server/servers.xml b/providers/profitbricks/src/test/resources/server/servers.xml
index 5da090f..d38bc67 100644
--- a/providers/profitbricks/src/test/resources/server/servers.xml
+++ b/providers/profitbricks/src/test/resources/server/servers.xml
@@ -11,6 +11,8 @@
                 <ram>4096</ram>
                 <internetAccess>true</internetAccess>
                 <ips>173.252.120.6</ips>
+                <balancedNicId>qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh</balancedNicId>
+                <activate>true</activate>
                 <connectedStorages>
                     <bootDevice>true</bootDevice>
                     <busType>VIRTIO</busType>
@@ -60,6 +62,8 @@
                 <ram>1024</ram>
                 <internetAccess>false</internetAccess>
                 <ips>202.69.181.241</ips>
+                <balancedNicId>qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh</balancedNicId>
+                <activate>true</activate>
                 <connectedStorages>
                     <bootDevice>true</bootDevice>
                     <busType>VIRTIO</busType>