You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2017/09/24 14:33:09 UTC

[03/10] libcloud git commit: ProfitBricks provider API v4 update; fix & update tests and docs

ProfitBricks provider API v4 update; fix & update tests and docs


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/01ce1d5c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/01ce1d5c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/01ce1d5c

Branch: refs/heads/trunk
Commit: 01ce1d5cb8c72884037a5a1ad18ce7212e79fe75
Parents: 7c84193
Author: nurfet-becirevic <nu...@stackpointcloud.com>
Authored: Sun Sep 3 17:56:17 2017 -0400
Committer: nurfet-becirevic <nu...@stackpointcloud.com>
Committed: Sun Sep 3 17:56:17 2017 -0400

----------------------------------------------------------------------
 .../images/provider_logos/profitbricks.png      |  Bin 0 -> 3866 bytes
 docs/compute/drivers/profitbricks.rst           |   83 +
 .../compute/profitbricks/create_datacenter.py   |   26 +
 .../examples/compute/profitbricks/create_lan.py |   20 +
 .../compute/profitbricks/create_node.py         |   51 +
 .../compute/profitbricks/create_volume.py       |   29 +
 .../compute/profitbricks/instantiate_driver.py  |    5 +
 libcloud/compute/drivers/profitbricks.py        |  172 +-
 .../fixtures/profitbricks/attach_volume.json    |   10 +-
 .../fixtures/profitbricks/create_node.json      |   10 +-
 .../fixtures/profitbricks/create_volume.json    |    8 +-
 .../profitbricks/create_volume_snapshot.json    |    6 +-
 .../profitbricks/error_resource_not_found.json  |    8 +
 .../profitbricks/ex_create_datacenter.json      |    6 +-
 .../profitbricks/ex_create_firewall_rule.json   |   10 +-
 .../profitbricks/ex_create_ip_block.json        |    6 +-
 .../fixtures/profitbricks/ex_create_lan.json    |    4 +-
 .../profitbricks/ex_create_load_balancer.json   |   25 +-
 .../ex_create_network_interface.json            |    6 +-
 .../profitbricks/ex_describe_datacenter.json    |   60 +-
 .../profitbricks/ex_describe_firewall_rule.json |   10 +-
 .../profitbricks/ex_describe_image.json         |    5 +-
 .../profitbricks/ex_describe_ip_block.json      |   11 +-
 .../fixtures/profitbricks/ex_describe_lan.json  |    6 +-
 .../profitbricks/ex_describe_load_balancer.json |    6 +-
 .../profitbricks/ex_describe_location.json      |    6 +-
 .../ex_describe_network_interface.json          |    8 +-
 .../fixtures/profitbricks/ex_describe_node.json |   28 +-
 .../profitbricks/ex_describe_snapshot.json      |    6 +-
 .../profitbricks/ex_describe_volume.json        |   10 +-
 .../profitbricks/ex_list_attached_volumes.json  |   49 +-
 .../profitbricks/ex_list_datacenters.json       |   18 +-
 .../profitbricks/ex_list_firewall_rules.json    |    8 +-
 .../profitbricks/ex_list_ip_blocks.json         |   10 +-
 .../fixtures/profitbricks/ex_list_lans.json     |   24 +-
 .../ex_list_load_balanced_nics.json             |   12 +-
 .../profitbricks/ex_list_load_balancers.json    |   30 +-
 .../ex_list_network_interfaces.json             |   14 +-
 .../profitbricks/ex_rename_datacenter.json      |   16 +-
 .../profitbricks/ex_set_inet_access.json        |   31 -
 .../profitbricks/ex_update_firewall_rule.json   |   10 +-
 .../fixtures/profitbricks/ex_update_image.json  |    5 +-
 .../fixtures/profitbricks/ex_update_lan.json    |    8 +-
 .../profitbricks/ex_update_load_balancer.json   |    6 +-
 .../ex_update_network_interface.json            |   22 +-
 .../fixtures/profitbricks/ex_update_node.json   |   16 +-
 .../profitbricks/ex_update_snapshot.json        |    6 +-
 .../fixtures/profitbricks/ex_update_volume.json |   10 +-
 .../fixtures/profitbricks/list_images.json      |   26 +-
 .../fixtures/profitbricks/list_locations.json   |   83 +-
 .../fixtures/profitbricks/list_nodes.json       |   46 +-
 .../fixtures/profitbricks/list_snapshots.json   |    4 +-
 .../fixtures/profitbricks/list_volumes.json     |   10 +-
 libcloud/test/compute/test_profitbricks.py      | 1485 ++++++++----------
 54 files changed, 1298 insertions(+), 1292 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/_static/images/provider_logos/profitbricks.png
----------------------------------------------------------------------
diff --git a/docs/_static/images/provider_logos/profitbricks.png b/docs/_static/images/provider_logos/profitbricks.png
new file mode 100644
index 0000000..de1a9eb
Binary files /dev/null and b/docs/_static/images/provider_logos/profitbricks.png differ

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/compute/drivers/profitbricks.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/profitbricks.rst b/docs/compute/drivers/profitbricks.rst
new file mode 100644
index 0000000..5c6420c
--- /dev/null
+++ b/docs/compute/drivers/profitbricks.rst
@@ -0,0 +1,83 @@
+ProfitBricks Driver Documentation
+=================================
+
+`ProfitBricks`_ is an innovative and enterprise-grade IaaS provider.
+
+.. figure:: /_static/images/provider_logos/profitbricks.png
+    :align: center
+    :width: 300
+    :target: https://www.profitbricks.com/
+
+The ProfitBricks driver allows you to integrate with the `ProfitBricks Cloud API`_ to manage
+virtual data centers and other resources located in the United States and Germany availability zones.
+
+Instantiating a Driver
+----------------------
+
+Before you start using the ProfitBricks driver you will have to sign up for a ProfitBricks account.
+To instantiate a driver you will need to pass your ProfitBrick credentials, i.e., username and password.
+
+.. literalinclude:: /examples/compute/profitbricks/instantiate_driver.py
+   :language: python
+
+Examples
+--------
+
+Create a data center
+~~~~~~~~~~~~~~~~~~~~
+
+.. literalinclude:: /examples/compute/profitbricks/create_datacenter.py
+   :language: python
+
+Create a LAN
+~~~~~~~~~~~~
+
+.. literalinclude:: /examples/compute/profitbricks/create_lan.py
+   :language: python
+
+Create a node
+~~~~~~~~~~~~~
+
+.. literalinclude:: /examples/compute/profitbricks/create_node.py
+   :language: python
+
+Create an SSD volume
+~~~~~~~~~~~~~~~~~~~~
+
+.. literalinclude:: /examples/compute/profitbricks/create_volume.py
+   :language: python
+
+Refer to the `driver documentation`_ for more examples and code snippets.
+
+API Docs
+--------
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksNodeDriver
+    :members:
+    :inherited-members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.Datacenter
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksNetworkInterface
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksFirewallRule
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksLan
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksLoadBalancer
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksAvailabilityZone
+    :members:
+
+.. autoclass:: libcloud.compute.drivers.profitbricks.ProfitBricksIPBlock
+    :members:
+
+.. _`ProfitBricks`: https://www.profitbricks.com/
+.. _`ProfitBricks Cloud API`: https://devops.profitbricks.com/api/cloud/
+.. _`driver documentation`: https://devops.profitbricks.com/libraries/libcloud/
+

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/examples/compute/profitbricks/create_datacenter.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/profitbricks/create_datacenter.py b/docs/examples/compute/profitbricks/create_datacenter.py
new file mode 100644
index 0000000..3912af7
--- /dev/null
+++ b/docs/examples/compute/profitbricks/create_datacenter.py
@@ -0,0 +1,26 @@
+import os
+
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.PROFIT_BRICKS)
+
+# Get ProfitBricks credentials from environment variables
+pb_username = os.environ.get('PROFITBRICKS_USERNAME')
+pb_password = os.environ.get('PROFITBRICKS_PASSWORD')
+
+driver = cls(pb_username, pb_password)
+
+# list available locations
+locations = driver.list_locations()
+
+my_location = None
+# US Las Vegas location
+for loc in locations:
+    if loc.id == 'us/las':
+        my_location = loc
+        break
+
+# Create a data center
+datacenter = driver.ex_create_datacenter('demo-dc', my_location)
+print(datacenter)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/examples/compute/profitbricks/create_lan.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/profitbricks/create_lan.py b/docs/examples/compute/profitbricks/create_lan.py
new file mode 100644
index 0000000..03fe75d
--- /dev/null
+++ b/docs/examples/compute/profitbricks/create_lan.py
@@ -0,0 +1,20 @@
+import os
+
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.PROFIT_BRICKS)
+
+# Get ProfitBricks credentials from environment variables
+pb_username = os.environ.get('PROFITBRICKS_USERNAME')
+pb_password = os.environ.get('PROFITBRICKS_PASSWORD')
+
+driver = cls(pb_username, pb_password)
+
+datacenters = driver.list_datacenters()
+# Looks for existing data centers named 'demo-dc'
+datacenter = [dc for dc in datacenters if dc.name == 'demo-dc'][0]
+
+# Create a public LAN
+lan = driver.ex_create_lan(datacenter, is_public=True)
+print(lan)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/examples/compute/profitbricks/create_node.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/profitbricks/create_node.py b/docs/examples/compute/profitbricks/create_node.py
new file mode 100644
index 0000000..7c79e28
--- /dev/null
+++ b/docs/examples/compute/profitbricks/create_node.py
@@ -0,0 +1,51 @@
+import os
+
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+from libcloud.compute.base import NodeAuthSSHKey
+
+cls = get_driver(Provider.PROFIT_BRICKS)
+
+# Get ProfitBricks credentials from environment variables
+pb_username = os.environ.get('PROFITBRICKS_USERNAME')
+pb_password = os.environ.get('PROFITBRICKS_PASSWORD')
+
+driver = cls(pb_username, pb_password)
+
+# List available sizes
+sizes = driver.list_sizes()
+
+# Medium-size instance
+my_size = sizes[1]
+
+datacenters = driver.ex_list_datacenters()
+# Looks for existing data centers named 'demo-dc'
+desired_dc = [dc for dc in datacenters if dc.name == 'demo-dc']
+
+# Get available HDD public images
+images = driver.list_images('HDD')
+
+my_image = None
+# Let's choose Ubuntu-16.04 image in us/las region
+for img in images:
+    if ('Ubuntu-16.04-LTS-server' in img.name and
+            'us/las' == img.extra['location']):
+        my_image = img
+        break
+
+node_key = None
+# Read SSH key from file
+# Specify correct path
+with open('/home/user/.ssh/id_rsa.pub', 'r') as f:
+    node_key = NodeAuthSSHKey(f.read())
+f.close()
+
+node = driver.create_node(
+    name='demo-node',
+    size=my_size,
+    ex_cpu_family='INTEL_XEON',
+    image=my_image,
+    ex_datacenter=desired_dc[0],
+    ex_ssh_keys=[node_key]
+)
+print(node)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/examples/compute/profitbricks/create_volume.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/profitbricks/create_volume.py b/docs/examples/compute/profitbricks/create_volume.py
new file mode 100644
index 0000000..a506d29
--- /dev/null
+++ b/docs/examples/compute/profitbricks/create_volume.py
@@ -0,0 +1,29 @@
+import os
+
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.PROFIT_BRICKS)
+
+# Get ProfitBricks credentials from environment variables
+pb_username = os.environ.get('PROFITBRICKS_USERNAME')
+pb_password = os.environ.get('PROFITBRICKS_PASSWORD')
+
+driver = cls(pb_username, pb_password)
+
+datacenters = driver.ex_list_datacenters()
+location = driver.ex_describe_location(ex_location_id='us/las')
+datacenter = [dc for dc in datacenters if dc.extra['location'] == location.id]
+
+images = driver.list_images(image_type='HDD')
+image = [img for img in images if img.extra['location'] == location.id][0]
+# Create a new SSD volume. Set `ex_type='HDD'` to create a HDD volume.
+ssd_volume = driver.create_volume(
+    name='Example SSD volume',
+    size=100,
+    image=image,
+    ex_type='SSD',
+    ex_datacenter=datacenter[0],
+    ex_password='PuTSoMeSTRONGPaSsWoRdHeRe2017'
+)
+print(ssd_volume)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/docs/examples/compute/profitbricks/instantiate_driver.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/profitbricks/instantiate_driver.py b/docs/examples/compute/profitbricks/instantiate_driver.py
new file mode 100644
index 0000000..059613a
--- /dev/null
+++ b/docs/examples/compute/profitbricks/instantiate_driver.py
@@ -0,0 +1,5 @@
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.PROFIT_BRICKS)
+driver = cls('username', 'password')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/compute/drivers/profitbricks.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/profitbricks.py b/libcloud/compute/drivers/profitbricks.py
index 43996d4..f2d44cb 100644
--- a/libcloud/compute/drivers/profitbricks.py
+++ b/libcloud/compute/drivers/profitbricks.py
@@ -26,6 +26,7 @@ from libcloud.compute.providers import Provider
 from libcloud.common.base import ConnectionUserAndKey, JsonResponse
 from libcloud.compute.base import Node, NodeDriver, NodeLocation, NodeSize
 from libcloud.compute.base import NodeImage, StorageVolume, VolumeSnapshot
+from libcloud.compute.base import NodeAuthPassword, NodeAuthSSHKey
 from libcloud.compute.base import UuidMixin
 from libcloud.compute.types import NodeState
 from libcloud.common.types import LibcloudError, MalformedResponseError
@@ -41,13 +42,14 @@ __all__ = [
     'ProfitBricksNetworkInterface',
     'ProfitBricksFirewallRule',
     'ProfitBricksLan',
+    'ProfitBricksIPFailover',
     'ProfitBricksLoadBalancer',
     'ProfitBricksAvailabilityZone',
     'ProfitBricksIPBlock'
 ]
 
 API_HOST = 'api.profitbricks.com'
-API_VERSION = '/cloudapi/v3/'
+API_VERSION = '/cloudapi/v4/'
 
 
 class ProfitBricksResponse(JsonResponse):
@@ -296,6 +298,30 @@ class ProfitBricksLan(object):
                 % (self.id, self.name, self.href))
 
 
+class ProfitBricksIPFailover(object):
+    """
+    Extension class which stores information about a
+    ProfitBricks LAN's failover
+
+    :param      ip: The IP address to fail over.
+    :type       ip: ``str``
+
+    :param      nic_uuid: The ID of the NIC to fail over.
+    :param      nic_uuid: ``str``
+
+    Note: This class is ProfitBricks specific.
+
+    """
+
+    def __init__(self, ip, nic_uuid):
+        self.ip = ip
+        self.nic_uuid = nic_uuid
+
+    def __repr__(self):
+        return (('<ProfitBricksIPFailover: ip=%s, nic_uuid=%s>')
+                % (self.ip, self.nic_uuid))
+
+
 class ProfitBricksLoadBalancer(object):
     """
     Extention class which stores information about a
@@ -670,10 +696,10 @@ class ProfitBricksNodeDriver(NodeDriver):
         :type   ex_disk: ``int``
 
         :param  ex_password: The password for the volume.
-        :type   ex_password: ``str``
+        :type   ex_password: :class:`NodeAuthPassword`
 
         :param  ex_ssh_keys: Optional SSH keys for the volume.
-        :type   ex_ssh_keys: ``list`` of ``str``
+        :type   ex_ssh_keys: ``list`` of :class:`NodeAuthSSHKey`
 
         :param  ex_bus_type: Volume bus type (VIRTIO, IDE).
         :type   ex_bus_type: ``str``
@@ -736,7 +762,7 @@ class ProfitBricksNodeDriver(NodeDriver):
 
         '''
         If passing in an image we need
-        to enfore a password or ssh keys.
+        to enforce a password or ssh keys.
         '''
         if not volume and image is not None:
             if ex_password is None and ex_ssh_keys is None:
@@ -807,10 +833,12 @@ class ProfitBricksNodeDriver(NodeDriver):
             }
 
             if ex_password is not None:
-                new_volume['properties']['imagePassword'] = ex_password
+                new_volume['properties']['imagePassword'] = \
+                    ex_password.password
 
             if ex_ssh_keys is not None:
-                new_volume['properties']['sshKeys'] = ex_ssh_keys
+                new_volume['properties']['sshKeys'] = \
+                    [ssh_key.pubkey for ssh_key in ex_ssh_keys]
 
             body['entities']['volumes']['items'].append(new_volume)
 
@@ -1008,9 +1036,10 @@ class ProfitBricksNodeDriver(NodeDriver):
     def create_volume(
         self,
         size,
-        image,
         ex_datacenter,
         name=None,
+        image=None,
+        ex_image_alias=None,
         ex_type=None,
         ex_bus_type=None,
         ex_ssh_keys=None,
@@ -1023,9 +1052,6 @@ class ProfitBricksNodeDriver(NodeDriver):
         :param  size: The size of the volume in GB.
         :type   size: ``int``
 
-        :param  image: The OS image for the volume.
-        :type   image: :class:`NodeImage`
-
         :param  ex_datacenter: The datacenter you're placing
                               the storage in. (req)
         :type   ex_datacenter: :class:`Datacenter`
@@ -1033,6 +1059,13 @@ class ProfitBricksNodeDriver(NodeDriver):
         :param  name: The name to be given to the volume.
         :param  name: ``str``
 
+        :param  image: The OS image for the volume.
+        :type   image: :class:`NodeImage`
+
+        :param  ex_image_alias: An alias to a ProfitBricks public image.
+                                Use instead of 'image'.
+        :type   ex_image_alias: ``str``
+
         :param  ex_type: The type to be given to the volume (SSD or HDD).
         :param  ex_type: ``str``
 
@@ -1040,10 +1073,10 @@ class ProfitBricksNodeDriver(NodeDriver):
         :type   ex_bus_type: ``str``
 
         :param  ex_ssh_keys: Optional SSH keys.
-        :type   ex_ssh_keys: ``dict``
+        :type   ex_ssh_keys: ``list`` of :class:`NodeAuthSSHKey`
 
         :param  ex_password: Optional password for root.
-        :type   ex_password: ``str``
+        :type   ex_password: :class:`NodeAuthPassword`
 
         :param  ex_availability_zone: Volume Availability Zone.
         :type   ex_availability_zone: ``str``
@@ -1056,39 +1089,43 @@ class ProfitBricksNodeDriver(NodeDriver):
             raise ValueError('You need to specify a data center'
                              ' to attach this volume to.')
 
-        if not image:
-            raise ValueError('You need to specify an image'
-                             ' to create this volume from.')
-
-        if image.extra['image_type'] != 'HDD':
-            raise ValueError('Invalid type of {image_type} specified for '
-                             '{image_name}, which needs to be of type HDD'
-                             .format(image_type=image.extra['image_type'],
-                                     image_name=image.name))
-
-        if ex_datacenter.extra['location'] != image.extra['location']:
-            raise ValueError(
-                'The image {image_name} '
-                '(location: {image_location}) you specified '
-                'is not available at the data center '
-                '{datacenter_name} '
-                '(location: {datacenter_location}).'
-                .format(
-                    image_name=image.extra['name'],
-                    datacenter_name=ex_datacenter.extra['name'],
-                    image_location=image.extra['location'],
-                    datacenter_location=ex_datacenter.extra['location']
+        if image is not None:
+            if image.extra['image_type'] != 'HDD':
+                raise ValueError('Invalid type of {image_type} specified for '
+                                 '{image_name}, which needs to be of type HDD'
+                                 .format(image_type=image.extra['image_type'],
+                                         image_name=image.name))
+
+            if ex_datacenter.extra['location'] != image.extra['location']:
+                raise ValueError(
+                    'The image {image_name} '
+                    '(location: {image_location}) you specified '
+                    'is not available at the data center '
+                    '{datacenter_name} '
+                    '(location: {datacenter_location}).'
+                    .format(
+                        image_name=image.extra['name'],
+                        datacenter_name=ex_datacenter.extra['name'],
+                        image_location=image.extra['location'],
+                        datacenter_location=ex_datacenter.extra['location']
+                    )
                 )
-            )
+        else:
+            if not ex_image_alias:
+                raise ValueError('You need to specify an image or image alias'
+                                 ' to create this volume from.')
 
         action = ex_datacenter.href + '/volumes'
         body = {
             'properties': {
-                'size': size,
-                'image': image.id
+                'size': size
             }
         }
 
+        if image is not None:
+            body['properties']['image'] = image.id
+        else:
+            body['properties']['imageAlias'] = ex_image_alias
         if name is not None:
             body['properties']['name'] = name
         if ex_type is not None:
@@ -1096,9 +1133,10 @@ class ProfitBricksNodeDriver(NodeDriver):
         if ex_bus_type is not None:
             body['properties']['bus'] = ex_bus_type
         if ex_ssh_keys is not None:
-            body['properties']['sshKeys'] = ex_ssh_keys
+            body['properties']['sshKeys'] = \
+                [ssh_key.pubkey for ssh_key in ex_ssh_keys]
         if ex_password is not None:
-            body['properties']['imagePassword'] = ex_password
+            body['properties']['imagePassword'] = ex_password.password
         if ex_availability_zone is not None:
             body['properties']['availabilityZone'] = ex_availability_zone
 
@@ -1382,7 +1420,8 @@ class ProfitBricksNodeDriver(NodeDriver):
         :param  availability_zone: Update the availability zone.
         :type   availability_zone: :class:`ProfitBricksAvailabilityZone`
 
-        :param  ex_licence_type: Licence type (WINDOWS, LINUX, OTHER).
+        :param  ex_licence_type: Licence type (WINDOWS, WINDOWS2016, LINUX,
+                                OTHER, UNKNOWN).
         :type   ex_licence_type: ``str``
 
         :param  ex_boot_volume: Setting the new boot (HDD) volume.
@@ -1531,7 +1570,7 @@ class ProfitBricksNodeDriver(NodeDriver):
                         you are describing.
         :type   ex_href: ``str``
 
-        :param  ex_datacenter_id: The ID for the data cente
+        :param  ex_datacenter_id: The ID for the data center
                                 you are describing.
         :type   ex_datacenter_id: ``str``
 
@@ -1696,37 +1735,37 @@ class ProfitBricksNodeDriver(NodeDriver):
             body['description'] = description
 
         if licence_type is not None:
-            body['licence_type'] = licence_type
+            body['licenceType'] = licence_type
 
         if cpu_hot_plug is not None:
-            body['cpu_hot_plug'] = cpu_hot_plug
+            body['cpuHotPlug'] = cpu_hot_plug
 
         if cpu_hot_unplug is not None:
-            body['cpu_hot_unplug'] = cpu_hot_unplug
+            body['cpuHotUnplug'] = cpu_hot_unplug
 
         if ram_hot_plug is not None:
-            body['ram_hot_plug'] = ram_hot_plug
+            body['ramHotPlug'] = ram_hot_plug
 
         if ram_hot_unplug is not None:
-            body['ram_hot_unplug'] = ram_hot_unplug
+            body['ramHotUnplug'] = ram_hot_unplug
 
         if nic_hot_plug is not None:
-            body['nic_hot_plug'] = nic_hot_plug
+            body['nicHotPlug'] = nic_hot_plug
 
         if nic_hot_unplug is not None:
-            body['nic_hot_unplug'] = nic_hot_unplug
+            body['nicHotUnplug'] = nic_hot_unplug
 
         if disc_virtio_hot_plug is not None:
-            body['disc_virtio_hot_plug'] = disc_virtio_hot_plug
+            body['discVirtioHotPlug'] = disc_virtio_hot_plug
 
         if disc_virtio_hot_unplug is not None:
-            body['disc_virtio_hot_unplug'] = disc_virtio_hot_unplug
+            body['discVirtioHotUnplug'] = disc_virtio_hot_unplug
 
         if disc_scsi_hot_plug is not None:
-            body['disc_scsi_hot_plug'] = disc_scsi_hot_plug
+            body['discScsiHotPlug'] = disc_scsi_hot_plug
 
         if disc_scsi_hot_unplug is not None:
-            body['disc_scsi_hot_unplug'] = disc_scsi_hot_unplug
+            body['discScsiHotUnplug'] = disc_scsi_hot_unplug
 
         response = self.connection.request(
             action=action,
@@ -1754,7 +1793,7 @@ class ProfitBricksNodeDriver(NodeDriver):
         :type       ex_href: ``str``
 
         :param      ex_location_id: The id for the location you are
-                        describing ('de/fra', 'de/fkb', 'us/las')
+                        describing ('de/fra', 'de/fkb', 'us/las', 'us/ewr')
         :type       ex_location_id: ``str``
 
         :return:    Instance of class ``NodeLocation``
@@ -1766,7 +1805,7 @@ class ProfitBricksNodeDriver(NodeDriver):
         if ex_href is None:
             if ex_location_id is None:
                 raise ValueError(
-                    'The loctation ID is required.'
+                    'The location ID is required.'
                 )
             else:
                 use_full_url = False
@@ -2347,7 +2386,7 @@ class ProfitBricksNodeDriver(NodeDriver):
         - a datacenter if one is specified
         - all datacenters if none specified
 
-        :param  datacenter: The DC you are renaming.
+        :param  datacenter: The parent DC for the LAN.
         :type   datacenter: :class:`Datacenter`
 
         :return:    ``list`` of class ``ProfitBricksLan``
@@ -2378,13 +2417,16 @@ class ProfitBricksNodeDriver(NodeDriver):
 
         return lans
 
-    def ex_create_lan(self, datacenter, is_public=False, nics=None):
+    def ex_create_lan(self, datacenter, name=None, is_public=False, nics=None):
         """
         Create and attach a Lan to a data center.
 
-        :param  datacenter: The DC you are renaming.
+        :param  datacenter: The parent DC for the LAN..
         :type   datacenter: :class:`Datacenter`
 
+        :param  name: LAN name.
+        :type   name: ``str``
+
         :param  is_public: True if the Lan is to have internet access.
         :type   is_public: ``bool``
 
@@ -2398,7 +2440,9 @@ class ProfitBricksNodeDriver(NodeDriver):
         action = datacenter.extra['entities']['lans']['href']
         body = {
             'properties': {
-                'name': 'LAN - {datacenter_name}'.format(
+                'name':
+                name or
+                'LAN - {datacenter_name}'.format(
                     datacenter_name=datacenter.name
                 ),
                 'public': is_public
@@ -2472,7 +2516,7 @@ class ProfitBricksNodeDriver(NodeDriver):
 
         return self._to_lan(response.object)
 
-    def ex_update_lan(self, lan, is_public, name=None):
+    def ex_update_lan(self, lan, is_public, name=None, ip_failover=None):
         """
         Update a local area network
 
@@ -2486,6 +2530,9 @@ class ProfitBricksNodeDriver(NodeDriver):
         :param  name: The name of the lan.
         :type   name: ``str``
 
+        :param  ip_failover: The IP to fail over.
+        :type   ip_failover: ``list`` of :class: ``ProfitBricksIPFailover``
+
         :return:    Instance class ``ProfitBricksLan``
         :rtype:     :class:`ProfitBricksLan`
         """
@@ -2497,6 +2544,10 @@ class ProfitBricksNodeDriver(NodeDriver):
         if name is not None:
             body['name'] = name
 
+        if ip_failover is not None:
+            body['ipFailover'] = [{'ip': item.ip, 'nicUuid': item.nic_uuid}
+                                  for item in ip_failover]
+
         request = self.connection.request(
             action=action,
             headers={
@@ -2908,7 +2959,7 @@ class ProfitBricksNodeDriver(NodeDriver):
         """
         Create and attach a load balancer to a data center.
 
-        :param  datacenter: The DC you are renaming.
+        :param  datacenter: The parent DC for the load balancer.
         :type   datacenter: :class:`Datacenter`
 
         :param  name: Load balancer name.
@@ -3595,6 +3646,7 @@ class ProfitBricksNodeDriver(NodeDriver):
                 'discScsiHotUnplug': 'disc_scsi_hot_unplug',
                 'licenceType': 'licence_type',
                 'imageType': 'image_type',
+                'imageAliases': 'image_aliases',
                 'public': 'public'
             }
         }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/attach_volume.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/attach_volume.json b/libcloud/test/compute/fixtures/profitbricks/attach_volume.json
index eda9a22..700aa0f 100644
--- a/libcloud/test/compute/fixtures/profitbricks/attach_volume.json
+++ b/libcloud/test/compute/fixtures/profitbricks/attach_volume.json
@@ -1,7 +1,7 @@
 {
     "id" : "vol-2",
     "type" : "volume",
-    "href" : "/cloudapi/v3/datacenters/dc-1/volumes/vol-2",
+    "href" : "/cloudapi/v4/datacenters/dc-1/volumes/vol-2",
     "metadata" : {
         "createdDate" : "2016-10-17T13:13:36Z",
         "createdBy" : "test@test.te",
@@ -11,14 +11,14 @@
         "state" : "BUSY"
     },
     "properties" : {
-        "name" : "Updated storage name",
+        "name" : "libcloud Test",
         "type" : "HDD",
-        "size" : 40,
+        "size" : 2,
         "image" : "bvol-img",
         "imagePassword" : null,
         "sshKeys": null,
         "bus" : "VIRTIO",
-        "licenceType" : "LINUX",
+        "licenceType" : "UNKNOWN",
         "cpuHotPlug" : true,
         "cpuHotUnplug" : false,
         "ramHotPlug" : true,
@@ -29,6 +29,6 @@
         "discVirtioHotUnplug" : true,
         "discScsiHotPlug" : false,
         "discScsiHotUnplug" : false,
-        "deviceNumber" : 3
+        "deviceNumber" : 2
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/create_node.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/create_node.json b/libcloud/test/compute/fixtures/profitbricks/create_node.json
index b732980..8a129f4 100644
--- a/libcloud/test/compute/fixtures/profitbricks/create_node.json
+++ b/libcloud/test/compute/fixtures/profitbricks/create_node.json
@@ -1,7 +1,7 @@
 {
     "id": "srv-2",
     "type": "server",
-    "href": "cloudapi/v3/datacenters/f3f7ca3c-6f3d-4a4d-b3d6-15853ae5ba78/servers/srv-2",
+    "href": "cloudapi/v4/datacenters/f3f7ca3c-6f3d-4a4d-b3d6-15853ae5ba78/servers/srv-2",
     "metadata": {
         "createdDate": "2016-10-19T13:25:19Z",
         "createdBy": "test@test.te",
@@ -11,9 +11,9 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Test",
+        "name": "libcloud Test",
         "cores": 1,
-        "ram": 512,
+        "ram": 1024,
         "availabilityZone": "ZONE_1",
         "vmState": null,
         "bootCdrom": null,
@@ -24,12 +24,12 @@
         "volumes": {
             "id": "srv-2/volumes",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/f3f7ca3c-6f3d-4a4d-b3d6-15853ae5ba78/servers/srv-2/volumes",
+            "href": "/cloudapi/v4/datacenters/f3f7ca3c-6f3d-4a4d-b3d6-15853ae5ba78/servers/srv-2/volumes",
             "items": [
                 {
                     "id": "53abb4de-b37b-4025-b139-3e09141e20bb",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/srv-2/volumes/53abb4de-b37b-4025-b139-3e09141e20bb"
+                    "href": "/cloudapi/v4/datacenters/srv-2/volumes/53abb4de-b37b-4025-b139-3e09141e20bb"
                 }
             ]
         }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/create_volume.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/create_volume.json b/libcloud/test/compute/fixtures/profitbricks/create_volume.json
index 59720d9..5118cde 100644
--- a/libcloud/test/compute/fixtures/profitbricks/create_volume.json
+++ b/libcloud/test/compute/fixtures/profitbricks/create_volume.json
@@ -1,7 +1,7 @@
 {
     "id" : "vol-2",
     "type" : "volume",
-    "href" : "/cloudapi/v3/datacenters/dc-1/volumes/vol-2",
+    "href" : "/cloudapi/v4/datacenters/dc-1/volumes/vol-2",
     "metadata" : {
         "createdDate" : "2016-10-17T13:13:36Z",
         "createdBy" : "test@test.te",
@@ -11,10 +11,10 @@
         "state" : "BUSY"
     },
     "properties" : {
-        "name": "Updated storage name",
+        "name": "libcloud Test",
         "type": "HDD",
-        "size": 40,
-        "availabilityZone": "AUTO",
+        "size": 2,
+        "availabilityZone": "ZONE_3",
         "image": "bvol-img",
         "imagePassword": null,
         "sshKeys": null,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/create_volume_snapshot.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/create_volume_snapshot.json b/libcloud/test/compute/fixtures/profitbricks/create_volume_snapshot.json
index a90f585..da1eec6 100644
--- a/libcloud/test/compute/fixtures/profitbricks/create_volume_snapshot.json
+++ b/libcloud/test/compute/fixtures/profitbricks/create_volume_snapshot.json
@@ -1,7 +1,7 @@
 {
     "id": "sshot",
     "type": "snapshot",
-    "href": "/cloudapi/v3/snapshots/sshot",
+    "href": "/cloudapi/v4/snapshots/sshot",
     "metadata": {
         "createdDate": "2016-10-26T11:38:45Z",
         "createdBy": "test@test.te",
@@ -11,8 +11,8 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Test Created Snapshot",
-        "description": "Test Created Snapshot",
+        "name": "libcloud Test",
+        "description": "libcloud test snapshot",
         "location": "us/las",
         "size": 10,
         "cpuHotPlug": true,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/error_resource_not_found.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/error_resource_not_found.json b/libcloud/test/compute/fixtures/profitbricks/error_resource_not_found.json
new file mode 100644
index 0000000..d0ce3c3
--- /dev/null
+++ b/libcloud/test/compute/fixtures/profitbricks/error_resource_not_found.json
@@ -0,0 +1,8 @@
+{
+    "httpStatus": 404,
+    "messages": [{
+            "errorCode": "309",
+            "message": "Resource does not exist"
+        }
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_datacenter.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_datacenter.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_datacenter.json
index 3f42689..e819d8e 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_datacenter.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_datacenter.json
@@ -1,7 +1,7 @@
 {
     "id": "dc-1",
     "type": "datacenter",
-    "href": "/cloudapi/v3/datacenters/dc-1",
+    "href": "/cloudapi/v4/datacenters/dc-1",
     "metadata": {
         "createdDate": "2016-10-18T17:20:56Z",
         "createdBy": "test@test.te",
@@ -11,8 +11,8 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Test Data Center",
-        "description": "Test Data Center.",
+        "name": "libcloud Test",
+        "description": "libcloud test datacenter",
         "location": "us/las",
         "version": null,
         "features": []

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_firewall_rule.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_firewall_rule.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_firewall_rule.json
index a5f4210..fe1f685 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_firewall_rule.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_firewall_rule.json
@@ -1,7 +1,7 @@
 {
     "id": "fwr-1",
     "type": "firewall-rule",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fwr-1",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fwr-1",
     "metadata": {
         "createdDate": "2016-10-19T11:08:04Z",
         "createdBy": "test@test.te",
@@ -11,14 +11,14 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Test created firewall rule",
+        "name": "SSH",
         "protocol": "TCP",
-        "sourceMac": null,
+        "sourceMac": "01:23:45:67:89:00",
         "sourceIp": null,
         "targetIp": null,
         "icmpCode": null,
         "icmpType": null,
-        "portRangeStart": 80,
-        "portRangeEnd": 80
+        "portRangeStart": 22,
+        "portRangeEnd": 22
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_ip_block.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_ip_block.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_ip_block.json
index 56b0544..b561bb0 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_ip_block.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_ip_block.json
@@ -1,7 +1,7 @@
 {
     "id": "ipb-1",
     "type": "ipblock",
-    "href": "/cloudapi/v3/ipblocks/ipb-1",
+    "href": "/cloudapi/v4/ipblocks/ipb-1",
     "metadata": {
         "createdDate": "2016-10-26T15:05:36Z",
         "createdBy": "test@test.te",
@@ -15,8 +15,8 @@
             "11.12.13.14",
             "15.16.17.18"
         ],
-        "location": "de/fkb",
+        "location": "us/las",
         "size": 2,
-        "name": "Test Created IP Block"
+        "name": "libcloud Test"
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_lan.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_lan.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_lan.json
index 0e2b9cc..c76ed44 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_lan.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_lan.json
@@ -1,7 +1,7 @@
 {
     "id" : "10",
     "type" : "lan",
-    "href" : "/cloudapi/v3/datacenters/dc-1/lans/10",
+    "href" : "/cloudapi/v4/datacenters/dc-1/lans/10",
     "metadata" : {
         "createdDate": "2016-10-17T11:33:11Z",
         "createdBy": "test@test.te",
@@ -11,7 +11,7 @@
         "state": "BUSY"
     },
     "properties" : {
-        "name" : "Test Created Lan",
+        "name" : "libcloud Test",
         "public" : true
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_load_balancer.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_load_balancer.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_load_balancer.json
index 67af86b..3f7761c 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_load_balancer.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_load_balancer.json
@@ -1,7 +1,7 @@
 {
     "id": "bal-1",
     "type": "loadbalancer",
-    "href": "/cloudapi/v3/datacenters/dc-1/loadbalancers/bal-1",
+    "href": "/cloudapi/v4/datacenters/dc-1/loadbalancers/bal-1",
     "metadata": {
         "createdDate": "2016-10-26T13:02:33Z",
         "createdBy": "test@test.te",
@@ -11,8 +11,29 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Test load balancer",
+        "name": "libcloud Test",
         "ip": null,
         "dhcp": true
+    },
+    "entities": {
+        "balancednics": {
+            "id": "bal-1/balancednics",
+            "type": "collection",
+            "href": "cloudapi/v4/datacenters/dc-1/loadbalancers/bal-1/balancednics",
+            "items": [{
+                    "id": "nic-1",
+                    "type": "nic",
+                    "href": "cloudapi/v4/datacenters/dc-1/servers/bal-1/nics/nic-1",
+                    "metadata": {
+                        "createdDate": "2016-10-17T15:46:38Z",
+                        "createdBy": "test@test.te",
+                        "etag": "dbd8216137cf0ec9951170f93fa8fa53",
+                        "lastModifiedDate": "2016-10-17T18:19:43Z",
+                        "lastModifiedBy": "test@test.te",
+                        "state": "BUSY"
+                    }
+                }
+            ]
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_create_network_interface.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_create_network_interface.json b/libcloud/test/compute/fixtures/profitbricks/ex_create_network_interface.json
index 5e45994..0210b83 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_create_network_interface.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_create_network_interface.json
@@ -1,7 +1,7 @@
 {
     "id": "nic-2",
     "type": "nic",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/nics/nic-2",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/nics/nic-2",
     "metadata": {
         "createdDate": "2016-10-19T08:18:50Z",
         "createdBy": "test@test.te",
@@ -11,9 +11,9 @@
         "state": "BUSY"
     },
     "properties": {
-        "name": "Creating a test network interface.",
+        "name": "libcloud Test",
         "mac": null,
-        "ips": [],
+        "ips": [ "10.0.0.1" ],
         "dhcp": true,
         "lan": 1,
         "firewallActive": null,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_datacenter.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_datacenter.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_datacenter.json
index 4f20e63..36ba13d 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_datacenter.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_datacenter.json
@@ -1,7 +1,7 @@
 {
     "id": "dc-1",
     "type": "datacenter",
-    "href": "/cloudapi/v3/datacenters/dc-1",
+    "href": "/cloudapi/v4/datacenters/dc-1",
     "metadata": {
         "createdDate": "2016-10-17T11:33:11Z",
         "createdBy": "test@test.test",
@@ -11,9 +11,9 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "Test Data Center",
-        "description": "This is a test data center.",
-        "location": "de/fkb",
+        "name": "libcloud Test",
+        "description": "libcloud test datacenter",
+        "location": "us/las",
         "version": 35,
         "features": [
             "SSD",
@@ -24,12 +24,12 @@
         "servers": {
             "id": "dc-1/servers",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers",
             "items": [
                 {
                     "id": "srv-1",
                     "type": "server",
-                    "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1",
+                    "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1",
                     "metadata": {
                         "createdDate": "2016-10-18T07:28:05Z",
                         "createdBy": "test@test.test",
@@ -48,7 +48,7 @@
                         "bootVolume": {
                             "id": "bvol-1",
                             "type": "volume",
-                            "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1",
+                            "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1",
                             "metadata": {
                                 "createdDate": "2016-10-18T07:20:41Z",
                                 "createdBy": "test@test.test",
@@ -84,35 +84,35 @@
                         "cdroms": {
                             "id": "srv-1/cdroms",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/cdroms",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/cdroms",
                             "items": []
                         },
                         "volumes": {
                             "id": "srv-1/volumes",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/volumes",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/volumes",
                             "items": [
                                 {
                                     "id": "d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
                                     "type": "volume",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3"
                                 },
                                 {
                                     "id": "vol-2",
                                     "type": "volume",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/vol-2"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/vol-2"
                                 },
                                 {
                                     "id": "bvol-1",
                                     "type": "volume",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1"
                                 }
                             ]
                         },
                         "nics": {
                             "id": "srv-1/nics",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/nics",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/nics",
                             "items": []
                         }
                     }
@@ -120,7 +120,7 @@
                 {
                     "id": "s-3",
                     "type": "server",
-                    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3",
+                    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3",
                     "metadata": {
                         "createdDate": "2016-10-17T11:33:20Z",
                         "createdBy": "test@test.test",
@@ -139,7 +139,7 @@
                         "bootVolume": {
                             "id": "21d7e7de-5054-4041-b691-717aa8b3c799",
                             "type": "volume",
-                            "href": "/cloudapi/v3/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799",
+                            "href": "/cloudapi/v4/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799",
                             "metadata": {
                                 "createdDate": "2016-10-17T11:33:20Z",
                                 "createdBy": "test@test.test",
@@ -175,30 +175,30 @@
                         "cdroms": {
                             "id": "s-3/cdroms",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/cdroms",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/cdroms",
                             "items": []
                         },
                         "volumes": {
                             "id": "s-3/volumes",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/volumes",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/volumes",
                             "items": [
                                 {
                                     "id": "21d7e7de-5054-4041-b691-717aa8b3c799",
                                     "type": "volume",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799"
                                 }
                             ]
                         },
                         "nics": {
                             "id": "s-3/nics",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics",
                             "items": [
                                 {
                                     "id": "nic-1",
                                     "type": "nic",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-1"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-1"
                                 }
                             ]
                         }
@@ -209,12 +209,12 @@
         "volumes": {
             "id": "dc-1/volumes",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/volumes",
+            "href": "/cloudapi/v4/datacenters/dc-1/volumes",
             "items": [
                 {
                     "id": "vol-2",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/vol-2",
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/vol-2",
                     "metadata": {
                         "createdDate": "2016-10-18T15:13:44Z",
                         "createdBy": "test@test.test",
@@ -249,7 +249,7 @@
                 {
                     "id": "bvol-1",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1",
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1",
                     "metadata": {
                         "createdDate": "2016-10-18T07:20:41Z",
                         "createdBy": "test@test.test",
@@ -284,7 +284,7 @@
                 {
                     "id": "d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
                     "metadata": {
                         "createdDate": "2016-10-17T13:13:36Z",
                         "createdBy": "test@test.test",
@@ -319,7 +319,7 @@
                 {
                     "id": "21d7e7de-5054-4041-b691-717aa8b3c799",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799",
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/21d7e7de-5054-4041-b691-717aa8b3c799",
                     "metadata": {
                         "createdDate": "2016-10-17T11:33:20Z",
                         "createdBy": "test@test.test",
@@ -356,18 +356,18 @@
         "loadbalancers": {
             "id": "dc-1/loadbalancers",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/loadbalancers",
+            "href": "/cloudapi/v4/datacenters/dc-1/loadbalancers",
             "items": []
         },
         "lans": {
             "id": "dc-1/lans",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/lans",
+            "href": "/cloudapi/v4/datacenters/dc-1/lans",
             "items": [
                 {
                     "id": "2",
                     "type": "lan",
-                    "href": "/cloudapi/v3/datacenters/dc-1/lans/2",
+                    "href": "/cloudapi/v4/datacenters/dc-1/lans/2",
                     "metadata": {
                         "createdDate": "2016-10-17T18:19:43Z",
                         "createdBy": "test@test.test",
@@ -384,12 +384,12 @@
                         "nics": {
                             "id": "2/nics",
                             "type": "collection",
-                            "href": "/cloudapi/v3/datacenters/dc-1/lans/2/nics",
+                            "href": "/cloudapi/v4/datacenters/dc-1/lans/2/nics",
                             "items": [
                                 {
                                     "id": "nic-1",
                                     "type": "nic",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-1"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-1"
                                 }
                             ]
                         }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_firewall_rule.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_firewall_rule.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_firewall_rule.json
index 523245d..5573809 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_firewall_rule.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_firewall_rule.json
@@ -1,7 +1,7 @@
 {
     "id": "fw2",
     "type": "firewall-rule",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fw2",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fw2",
     "metadata": {
         "createdDate": "2016-10-19T09:55:10Z",
         "createdBy": "test@test.te",
@@ -11,14 +11,14 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "HTTPs (SSL)",
+        "name": "SSH",
         "protocol": "TCP",
-        "sourceMac": null,
+        "sourceMac": "01:23:45:67:89:00",
         "sourceIp": null,
         "targetIp": null,
         "icmpCode": null,
         "icmpType": null,
-        "portRangeStart": 443,
-        "portRangeEnd": 443
+        "portRangeStart": 22,
+        "portRangeEnd": 22
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_image.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_image.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_image.json
index a6977ac..bf3faf4 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_image.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_image.json
@@ -1,7 +1,7 @@
 {
     "id": "img-2",
     "type": "image",
-    "href": "/cloudapi/v3/images/img-2",
+    "href": "/cloudapi/v4/images/img-2",
     "metadata": {
         "createdDate": "2015-10-09T12:06:34Z",
         "createdBy": "test@test.te",
@@ -13,7 +13,7 @@
     "properties": {
         "name": "vivid-server-cloudimg-amd64-disk1.img",
         "description": null,
-        "location": "de/fkb",
+        "location": "us/las",
         "size": 2,
         "cpuHotPlug": false,
         "cpuHotUnplug": false,
@@ -27,6 +27,7 @@
         "discScsiHotUnplug": false,
         "licenceType": "UNKNOWN",
         "imageType": "HDD",
+        "imageAliases": [ ],
         "public": false
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_ip_block.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_ip_block.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_ip_block.json
index 63f59e5..1abab89 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_ip_block.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_ip_block.json
@@ -1,7 +1,7 @@
 {
     "id": "ipb-2",
     "type": "ipblock",
-    "href": "/cloudapi/v3/ipblocks/ipb-2",
+    "href": "/cloudapi/v4/ipblocks/ipb-2",
     "metadata": {
         "createdDate": "2016-10-26T15:05:12Z",
         "createdBy": "test@test.te",
@@ -12,10 +12,11 @@
     },
     "properties": {
         "ips": [
-            "78.137.101.250"
+            "208.94.36.101",
+            "192.152.28.137"
         ],
-        "location": "de/fkb",
-        "size": 1,
-        "name": "Test IP Block One"
+        "location": "us/las",
+        "size": 2,
+        "name": "libcloud Test"
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_lan.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_lan.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_lan.json
index 459a74e..f761295 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_lan.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_lan.json
@@ -1,7 +1,7 @@
 {
     "id" : "10",
     "type" : "lan",
-    "href" : "/cloudapi/v3/datacenters/dc-1/lans/10",
+    "href" : "/cloudapi/v4/datacenters/dc-1/lans/10",
     "metadata" : {
         "createdDate": "2016-10-17T11:33:11Z",
         "createdBy": "test@test.te",
@@ -11,14 +11,14 @@
         "state": "BUSY"
     },
     "properties" : {
-        "name" : "Test Created Lan",
+        "name" : "libcloud Test",
         "public" : true
     },
     "entities": {
         "nics": {
             "id": "10/nics",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/lans/10/nics"
+            "href": "/cloudapi/v4/datacenters/dc-1/lans/10/nics"
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_load_balancer.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_load_balancer.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_load_balancer.json
index bb26434..2ddd7d6 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_load_balancer.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_load_balancer.json
@@ -1,7 +1,7 @@
 {
     "id": "bal-1",
     "type": "loadbalancer",
-    "href": "/cloudapi/v3/datacenters/dc-2/loadbalancers/bal-1",
+    "href": "/cloudapi/v4/datacenters/dc-2/loadbalancers/bal-1",
     "metadata": {
         "createdDate": "2016-10-26T13:02:33Z",
         "createdBy": "test@test.te",
@@ -11,7 +11,7 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "Test One",
+        "name": "libcloud Test",
         "ip": "111.112.113.114",
         "dhcp": true
     },
@@ -19,7 +19,7 @@
         "balancednics": {
             "id": "bal-1/balancednics",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-2/loadbalancers/bal-1/balancednics"
+            "href": "/cloudapi/v4/datacenters/dc-2/loadbalancers/bal-1/balancednics"
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_location.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_location.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_location.json
index 6cd6628..845c7ef 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_location.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_location.json
@@ -1,9 +1,9 @@
 {
-    "id": "de/fkb",
+    "id": "us/las",
     "type": "location",
-    "href": "/cloudapi/v3/locations/de/fkb",
+    "href": "/cloudapi/v4/locations/us/las",
     "properties": {
-        "name": "karlsruhe",
+        "name": "lasvegas",
         "features": [
             "SSD",
             "MULTIPLE_CPU"

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_network_interface.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_network_interface.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_network_interface.json
index dedecce..3ff6585 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_network_interface.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_network_interface.json
@@ -1,7 +1,7 @@
 {
     "id": "nic-2",
     "type": "nic",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2",
     "metadata": {
         "createdDate": "2016-10-17T15:46:38Z",
         "createdBy": "test@test.te",
@@ -11,12 +11,12 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "Updated from LibCloud",
+        "name": "libcloud Test",
         "mac": "02:01:0b:9d:4d:ce",
         "ips": [
             "10.15.124.11"
         ],
-        "dhcp": false,
+        "dhcp": true,
         "lan": 2,
         "firewallActive": true,
         "nat": false
@@ -25,7 +25,7 @@
         "firewallrules": {
             "id": "nic-1/firewallrules",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules"
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules"
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_node.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_node.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_node.json
index 476a4b9..88e2b5f 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_node.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_node.json
@@ -1,7 +1,7 @@
 {
     "id": "srv-1",
     "type": "server",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1",
     "metadata": {
         "createdDate": "2016-10-18T07:28:05Z",
         "createdBy": "test@test.test",
@@ -11,16 +11,16 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "A test node",
-        "cores": 2,
-        "ram": 4096,
-        "availabilityZone": "AUTO",
+        "name": "libcloud Test",
+        "cores": 1,
+        "ram": 1024,
+        "availabilityZone": "ZONE_1",
         "vmState": "RUNNING",
         "bootCdrom": null,
         "bootVolume": {
             "id": "bvol-1",
             "type": "volume",
-            "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1",
+            "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1",
             "metadata": {
                 "createdDate": "2016-10-18T07:20:41Z",
                 "createdBy": "test@test.test",
@@ -30,9 +30,9 @@
                 "state": "AVAILABLE"
             },
             "properties": {
-                "name": "A test node boot volume",
+                "name": "libcloud Test",
                 "type": "HDD",
-                "size": 10,
+                "size": 2,
                 "image": "bvol-img",
                 "imagePassword": null,
                 "bus": "VIRTIO",
@@ -56,18 +56,18 @@
         "cdroms": {
             "id": "srv-1/cdroms",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/cdroms",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/cdroms",
             "items": []
         },
         "volumes": {
             "id": "srv-1/volumes",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/volumes",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/volumes",
             "items": [
                 {
                     "id": "bvol-1",
                     "type": "volume",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1",
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1",
                     "metadata": {
                         "createdDate": "2016-10-18T07:20:41Z",
                         "createdBy": "test@test.test",
@@ -77,9 +77,9 @@
                         "state": "AVAILABLE"
                     },
                     "properties": {
-                        "name": "A test node volume",
+                        "name": "libcloud Test",
                         "type": "HDD",
-                        "size": 10,
+                        "size": 2,
                         "availabilityZone": "AUTO",
                         "image": "bvol-img",
                         "imagePassword": null,
@@ -104,7 +104,7 @@
         "nics": {
             "id": "srv-1/nics",
             "type": "collection",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/nics",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/nics",
             "items": []
         }
     }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_snapshot.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_snapshot.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_snapshot.json
index 06cce65..10a2f1c 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_snapshot.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_snapshot.json
@@ -1,7 +1,7 @@
 {
     "id": "sshot",
     "type": "snapshot",
-    "href": "/cloudapi/v3/snapshots/sshot",
+    "href": "/cloudapi/v4/snapshots/sshot",
     "metadata": {
         "createdDate": "2016-10-26T11:38:45Z",
         "createdBy": "test@test.te",
@@ -11,8 +11,8 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "Test Snapshot",
-        "description": "Test Snapshot",
+        "name": "libcloud Test",
+        "description": "libcloud test snapshot",
         "location": "us/las",
         "size": 10,
         "cpuHotPlug": true,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.json b/libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.json
index d0eab6a..732d8f9 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.json
@@ -1,7 +1,7 @@
 {
     "id": "vol-2",
     "type": "volume",
-    "href": "/cloudapi/v3/datacenters/dc-1/volumes/vol-2",
+    "href": "/cloudapi/v4/datacenters/dc-1/volumes/vol-2",
     "metadata": {
         "createdDate": "2016-10-17T13:13:36Z",
         "createdBy": "test@test.te",
@@ -11,15 +11,15 @@
         "state": "AVAILABLE"
     },
     "properties": {
-        "name": "Updated storage name",
+        "name": "libcloud Test",
         "type": "HDD",
-        "size": 40,
-        "availabilityZone": "AUTO",
+        "size": 2,
+        "availabilityZone": "ZONE_3",
         "image": "bvol-img",
         "imagePassword": null,
         "sshKeys": null,
         "bus": "VIRTIO",
-        "licenceType": "LINUX",
+        "licenceType": "UNKNOWN",
         "cpuHotPlug": true,
         "cpuHotUnplug": false,
         "ramHotPlug": true,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_list_attached_volumes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_list_attached_volumes.json b/libcloud/test/compute/fixtures/profitbricks/ex_list_attached_volumes.json
index 6777ba3..c422c00 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_list_attached_volumes.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_list_attached_volumes.json
@@ -1,12 +1,12 @@
 {
     "id": "srv-1/volumes",
     "type": "collection",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/srv-1/volumes",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/srv-1/volumes",
     "items": [
         {
             "id": "d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
             "type": "volume",
-            "href": "/cloudapi/v3/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
+            "href": "/cloudapi/v4/datacenters/dc-1/volumes/d6688ced-700d-4c9c-a3a7-9f7170c5edc3",
             "metadata": {
                 "createdDate": "2016-10-17T13:13:36Z",
                 "createdBy": "test@test.test",
@@ -16,15 +16,15 @@
                 "state": "AVAILABLE"
             },
             "properties": {
-                "name": "Volume one",
+                "name": "libcloud Test",
                 "type": "HDD",
-                "size": 40,
+                "size": 2,
                 "availabilityZone": "AUTO",
                 "image": "bvol-img",
                 "imagePassword": null,
                 "sshKeys": null,
                 "bus": "VIRTIO",
-                "licenceType": "LINUX",
+                "licenceType": "UNKNOWN",
                 "cpuHotPlug": true,
                 "cpuHotUnplug": false,
                 "ramHotPlug": true,
@@ -35,48 +35,13 @@
                 "discVirtioHotUnplug": true,
                 "discScsiHotPlug": false,
                 "discScsiHotUnplug": false,
-                "deviceNumber": 3
-            }
-        },
-        {
-            "id": "vol-2",
-            "type": "volume",
-            "href": "/cloudapi/v3/datacenters/dc-1/volumes/vol-2",
-            "metadata": {
-                "createdDate": "2016-10-18T15:13:44Z",
-                "createdBy": "test@test.test",
-                "etag": "a96f7781920c2890c25f967e66e6ee91",
-                "lastModifiedDate": "2016-10-18T15:13:44Z",
-                "lastModifiedBy": "test@test.test",
-                "state": "AVAILABLE"
-            },
-            "properties": {
-                "name": "Volume two",
-                "type": "HDD",
-                "size": 10,
-                "availabilityZone": "AUTO",
-                "image": null,
-                "imagePassword": null,
-                "sshKeys": null,
-                "bus": "VIRTIO",
-                "licenceType": null,
-                "cpuHotPlug": false,
-                "cpuHotUnplug": false,
-                "ramHotPlug": false,
-                "ramHotUnplug": false,
-                "nicHotPlug": false,
-                "nicHotUnplug": false,
-                "discVirtioHotPlug": false,
-                "discVirtioHotUnplug": false,
-                "discScsiHotPlug": false,
-                "discScsiHotUnplug": false,
                 "deviceNumber": 2
             }
         },
         {
             "id": "bvol-1",
             "type": "volume",
-            "href": "/cloudapi/v3/datacenters/dc-1/volumes/bvol-1",
+            "href": "/cloudapi/v4/datacenters/dc-1/volumes/bvol-1",
             "metadata": {
                 "createdDate": "2016-10-18T07:20:41Z",
                 "createdBy": "test@test.test",
@@ -86,7 +51,7 @@
                 "state": "AVAILABLE"
             },
             "properties": {
-                "name": "Volume three",
+                "name": "libcloud Test",
                 "type": "HDD",
                 "size": 10,
                 "availabilityZone": "AUTO",

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_list_datacenters.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_list_datacenters.json b/libcloud/test/compute/fixtures/profitbricks/ex_list_datacenters.json
index 912c0fc..d13ff6b 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_list_datacenters.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_list_datacenters.json
@@ -1,12 +1,12 @@
 {
     "id": "datacenters",
     "type": "collection",
-    "href": "/cloudapi/v3/datacenters/",
+    "href": "/cloudapi/v4/datacenters/",
     "items": [
         {
             "id": "dc-1",
             "type": "datacenter",
-            "href": "/cloudapi/v3/datacenters/dc-1",
+            "href": "/cloudapi/v4/datacenters/dc-1",
             "metadata": {
                 "createdDate": "2016-10-14T07:24:59Z",
                 "createdBy": "test@test.test",
@@ -16,9 +16,9 @@
                 "state": "AVAILABLE"
             },
             "properties": {
-                "name": "Test One.",
-                "description": "A test data center",
-                "location": "de/fra",
+                "name": "libcloud Test",
+                "description": "libcloud test datacenter",
+                "location": "us/las",
                 "version": 3,
                 "features": [
                     "SSD",
@@ -29,22 +29,22 @@
                 "servers": {
                     "id": "983a45be-a9aa-427a-8117-271ce9f392bb/servers",
                     "type": "collection",
-                    "href": "/cloudapi/v3/datacenters/dc-1/servers"
+                    "href": "/cloudapi/v4/datacenters/dc-1/servers"
                 },
                 "volumes": {
                     "id": "983a45be-a9aa-427a-8117-271ce9f392bb/volumes",
                     "type": "collection",
-                    "href": "/cloudapi/v3/datacenters/dc-1/volumes"
+                    "href": "/cloudapi/v4/datacenters/dc-1/volumes"
                 },
                 "loadbalancers": {
                     "id": "983a45be-a9aa-427a-8117-271ce9f392bb/loadbalancers",
                     "type": "collection",
-                    "href": "/cloudapi/v3/datacenters/dc-1/loadbalancers"
+                    "href": "/cloudapi/v4/datacenters/dc-1/loadbalancers"
                 },
                 "lans": {
                     "id": "983a45be-a9aa-427a-8117-271ce9f392bb/lans",
                     "type": "collection",
-                    "href": "/cloudapi/v3/datacenters/dc-1/lans"
+                    "href": "/cloudapi/v4/datacenters/dc-1/lans"
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_list_firewall_rules.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_list_firewall_rules.json b/libcloud/test/compute/fixtures/profitbricks/ex_list_firewall_rules.json
index 7128877..bd31786 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_list_firewall_rules.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_list_firewall_rules.json
@@ -1,12 +1,12 @@
 {
     "id": "nic-2/firewallrules",
     "type": "collection",
-    "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules",
+    "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules",
     "items": [
         {
             "id": "fwr-1",
             "type": "firewall-rule",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fwr-1",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fwr-1",
             "metadata": {
                 "createdDate": "2016-10-19T11:08:10Z",
                 "createdBy": "test@test.te",
@@ -30,7 +30,7 @@
         {
             "id": "fw2",
             "type": "firewall-rule",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fw2",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/fw2",
             "metadata": {
                 "createdDate": "2016-10-19T09:55:10Z",
                 "createdBy": "test@test.te",
@@ -54,7 +54,7 @@
         {
             "id": "6238b1e2-c706-4dc9-80a9-307fa0bd4287",
             "type": "firewall-rule",
-            "href": "/cloudapi/v3/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/6238b1e2-c706-4dc9-80a9-307fa0bd4287",
+            "href": "/cloudapi/v4/datacenters/dc-1/servers/s-3/nics/nic-2/firewallrules/6238b1e2-c706-4dc9-80a9-307fa0bd4287",
             "metadata": {
                 "createdDate": "2016-10-19T09:55:10Z",
                 "createdBy": "test@test.te",

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_list_ip_blocks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_list_ip_blocks.json b/libcloud/test/compute/fixtures/profitbricks/ex_list_ip_blocks.json
index df3c9cb..a935adb 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_list_ip_blocks.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_list_ip_blocks.json
@@ -1,12 +1,12 @@
 {
     "id": "ipblocks",
     "type": "collection",
-    "href": "/cloudapi/v3/ipblocks",
+    "href": "/cloudapi/v4/ipblocks",
     "items": [
         {
             "id": "ipb-1",
             "type": "ipblock",
-            "href": "/cloudapi/v3/ipblocks/ipb-1",
+            "href": "/cloudapi/v4/ipblocks/ipb-1",
             "metadata": {
                 "createdDate": "2016-10-26T15:05:36Z",
                 "createdBy": "test@test.te",
@@ -20,7 +20,7 @@
                     "78.137.101.252",
                     "78.137.101.251"
                 ],
-                "location": "de/fkb",
+                "location": "us/las",
                 "size": 2,
                 "name": "Test IP Block One"
             }
@@ -28,7 +28,7 @@
         {
             "id": "ipb-2",
             "type": "ipblock",
-            "href": "/cloudapi/v3/ipblocks/ipb-2",
+            "href": "/cloudapi/v4/ipblocks/ipb-2",
             "metadata": {
                 "createdDate": "2016-10-26T15:05:12Z",
                 "createdBy": "test@test.te",
@@ -41,7 +41,7 @@
                 "ips": [
                     "78.137.101.250"
                 ],
-                "location": "de/fkb",
+                "location": "us/las",
                 "size": 1,
                 "name": "Test IP Block One"
             }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/01ce1d5c/libcloud/test/compute/fixtures/profitbricks/ex_list_lans.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/profitbricks/ex_list_lans.json b/libcloud/test/compute/fixtures/profitbricks/ex_list_lans.json
index ede4187..5695388 100644
--- a/libcloud/test/compute/fixtures/profitbricks/ex_list_lans.json
+++ b/libcloud/test/compute/fixtures/profitbricks/ex_list_lans.json
@@ -1,12 +1,12 @@
 {
     "id": "dc-1/lans",
     "type": "collection",
-    "href": "/cloudapi/v3/datacenters/dc-1/lans",
+    "href": "/cloudapi/v4/datacenters/dc-1/lans",
     "items": [
         {
             "id": "1",
             "type": "lan",
-            "href": "/cloudapi/v3/datacenters/dc-1/lans/1",
+            "href": "/cloudapi/v4/datacenters/dc-1/lans/1",
             "metadata": {
                 "createdDate": "2016-10-24T08:03:22Z",
                 "createdBy": "test@test.te",
@@ -16,19 +16,19 @@
                 "state": "AVAILABLE"
             },
             "properties": {
-                "name": "Switch for LAN 1",
+                "name": "libcloud Test",
                 "public": false
             },
             "entities": {
                 "nics": {
                     "id": "1/nics",
                     "type": "collection",
-                    "href": "/cloudapi/v3/datacenters/dc-1/lans/1/nics",
+                    "href": "/cloudapi/v4/datacenters/dc-1/lans/1/nics",
                     "items": [
                         {
                             "id": "dc5e1c66-7280-4a5c-8e13-51ce030e0980",
                             "type": "nic",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/d37abf6b-0980-4bf8-813b-b69863cf7b9e/nics/dc5e1c66-7280-4a5c-8e13-51ce030e0980",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/d37abf6b-0980-4bf8-813b-b69863cf7b9e/nics/dc5e1c66-7280-4a5c-8e13-51ce030e0980",
                             "metadata": {
                                 "createdDate": "2016-10-21T13:00:02Z",
                                 "createdBy": "test@test.te",
@@ -52,14 +52,14 @@
                                 "firewallrules": {
                                     "id": "dc5e1c66-7280-4a5c-8e13-51ce030e0980/firewallrules",
                                     "type": "collection",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/d37abf6b-0980-4bf8-813b-b69863cf7b9e/nics/dc5e1c66-7280-4a5c-8e13-51ce030e0980/firewallrules"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/d37abf6b-0980-4bf8-813b-b69863cf7b9e/nics/dc5e1c66-7280-4a5c-8e13-51ce030e0980/firewallrules"
                                 }
                             }
                         },
                         {
                             "id": "912324a6-c057-445d-84dd-8fea82dfa719",
                             "type": "nic",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/811ab72b-f7f3-427b-8220-f031eae34f63/nics/912324a6-c057-445d-84dd-8fea82dfa719",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/811ab72b-f7f3-427b-8220-f031eae34f63/nics/912324a6-c057-445d-84dd-8fea82dfa719",
                             "metadata": {
                                 "createdDate": "2016-10-21T13:00:02Z",
                                 "createdBy": "test@test.te",
@@ -83,14 +83,14 @@
                                 "firewallrules": {
                                     "id": "912324a6-c057-445d-84dd-8fea82dfa719/firewallrules",
                                     "type": "collection",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/811ab72b-f7f3-427b-8220-f031eae34f63/nics/912324a6-c057-445d-84dd-8fea82dfa719/firewallrules"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/811ab72b-f7f3-427b-8220-f031eae34f63/nics/912324a6-c057-445d-84dd-8fea82dfa719/firewallrules"
                                 }
                             }
                         },
                         {
                             "id": "8d9fb87c-79f7-4c3c-8f7b-e2050a881b16",
                             "type": "nic",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/b1a64861-5819-498a-899a-a57126050952/nics/8d9fb87c-79f7-4c3c-8f7b-e2050a881b16",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/b1a64861-5819-498a-899a-a57126050952/nics/8d9fb87c-79f7-4c3c-8f7b-e2050a881b16",
                             "metadata": {
                                 "createdDate": "2016-10-21T13:00:02Z",
                                 "createdBy": "test@test.te",
@@ -114,14 +114,14 @@
                                 "firewallrules": {
                                     "id": "8d9fb87c-79f7-4c3c-8f7b-e2050a881b16/firewallrules",
                                     "type": "collection",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/b1a64861-5819-498a-899a-a57126050952/nics/8d9fb87c-79f7-4c3c-8f7b-e2050a881b16/firewallrules"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/b1a64861-5819-498a-899a-a57126050952/nics/8d9fb87c-79f7-4c3c-8f7b-e2050a881b16/firewallrules"
                                 }
                             }
                         },
                         {
                             "id": "76d7965d-19e5-491f-8b2f-1c4a3ef127b5",
                             "type": "nic",
-                            "href": "/cloudapi/v3/datacenters/dc-1/servers/77ef2301-b4df-46aa-8544-2dae76c9d7b5/nics/76d7965d-19e5-491f-8b2f-1c4a3ef127b5",
+                            "href": "/cloudapi/v4/datacenters/dc-1/servers/77ef2301-b4df-46aa-8544-2dae76c9d7b5/nics/76d7965d-19e5-491f-8b2f-1c4a3ef127b5",
                             "metadata": {
                                 "createdDate": "2016-10-21T13:00:02Z",
                                 "createdBy": "test@test.te",
@@ -145,7 +145,7 @@
                                 "firewallrules": {
                                     "id": "76d7965d-19e5-491f-8b2f-1c4a3ef127b5/firewallrules",
                                     "type": "collection",
-                                    "href": "/cloudapi/v3/datacenters/dc-1/servers/77ef2301-b4df-46aa-8544-2dae76c9d7b5/nics/76d7965d-19e5-491f-8b2f-1c4a3ef127b5/firewallrules"
+                                    "href": "/cloudapi/v4/datacenters/dc-1/servers/77ef2301-b4df-46aa-8544-2dae76c9d7b5/nics/76d7965d-19e5-491f-8b2f-1c4a3ef127b5/firewallrules"
                                 }
                             }
                         }