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 2014/01/03 15:59:13 UTC

[01/44] git commit: Update API to v1 and remove traces of ephemeral disks. The primary change here is updating ex_create_multiple_nodes to create disks and nodes in parallel.

Updated Branches:
  refs/heads/trunk 039f74206 -> 6fda82f34


Update API to v1 and remove traces of ephemeral disks.
The primary change here is updating ex_create_multiple_nodes to create disks and
nodes in parallel.


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

Branch: refs/heads/trunk
Commit: 07f6b9403c4bc50552071c085e7cf07a7243a676
Parents: cb5901a
Author: Rick Wright <ri...@google.com>
Authored: Wed Dec 4 13:17:25 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Wed Dec 4 13:17:25 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 196 ++++++++++++++++++++++++-----------
 1 file changed, 137 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/07f6b940/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 6c7ceeb..0c4c046 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -30,7 +30,7 @@ from libcloud.compute.base import NodeSize, StorageVolume, UuidMixin
 from libcloud.compute.providers import Provider
 from libcloud.compute.types import NodeState
 
-API_VERSION = 'v1beta16'
+API_VERSION = 'v1'
 DEFAULT_TASK_COMPLETION_TIMEOUT = 180
 
 
@@ -99,6 +99,18 @@ class GCEAddress(UuidMixin):
         return self.driver.ex_destroy_address(address=self)
 
 
+class GCEFailedDisk(object):
+    """Dummy Node object for disks that are not created."""
+    def __init__(self, name, error, code):
+        self.name = name
+        self.error = error
+        self.code = code
+
+    def __repr__(self):
+        return '<GCEFailedDisk name="%s" error_code="%s">' % (
+            self.name, self.code)
+
+
 class GCEFailedNode(object):
     """Dummy Node object for nodes that are not created."""
     def __init__(self, name, error, code):
@@ -1232,8 +1244,7 @@ class GCENodeDriver(NodeDriver):
         return self.ex_get_network(name)
 
     def _create_node_req(self, name, size, image, location, network,
-                         tags=None, metadata=None, boot_disk=None,
-                         persistent_disk=False):
+                         tags=None, metadata=None, boot_disk=None):
         """
         Returns a request and body to create a new node.  This is a helper
         method to suppor both :class:`create_node` and
@@ -1264,11 +1275,6 @@ class GCENodeDriver(NodeDriver):
         :keyword  boot_disk:  Persistent boot disk to attach.
         :type     :class:`StorageVolume`
 
-        :keyword  persistent_disk: If True, create a persistent disk instead of
-                                   an ephemeral one.  Has no effect if
-                                   boot_disk is specified.
-        :type     persistent_disk: ``bool``
-
         :return:  A tuple containing a request string and a node_data dict.
         :rtype:   ``tuple`` of ``str`` and ``dict``
         """
@@ -1279,9 +1285,7 @@ class GCENodeDriver(NodeDriver):
             node_data['tags'] = {'items': tags}
         if metadata:
             node_data['metadata'] = metadata
-        if (not boot_disk) and persistent_disk:
-            boot_disk = self.create_volume(None, name, location=location,
-                                           image=image)
+
         if boot_disk:
             disks = [{'kind': 'compute#attachedDisk',
                       'boot': True,
@@ -1291,7 +1295,6 @@ class GCENodeDriver(NodeDriver):
                       'zone': boot_disk.extra['zone'].extra['selfLink'],
                       'source': boot_disk.extra['selfLink']}]
             node_data['disks'] = disks
-            node_data['kernel'] = image.extra['preferredKernel']
         else:
             node_data['image'] = image.extra['selfLink']
 
@@ -1307,7 +1310,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None, ex_persistent_disk=False):
+                    ex_boot_disk=None):
         """
         Create a new node and return a node object for the node.
 
@@ -1337,11 +1340,6 @@ class GCENodeDriver(NodeDriver):
         :keyword  ex_boot_disk: The boot disk to attach to the instance.
         :type     ex_boot_disk: :class:`StorageVolume` or ``str``
 
-        :keyword  ex_persistent_disk: If True, create a persistent_disk instead
-                                      of a ephemeral one.  Has no effect if
-                                      ex_boot_disk is specified.
-        :type     ex_persistent_disk: ``bool``
-
         :return:  A Node object for the new node.
         :rtype:   :class:`Node`
         """
@@ -1355,19 +1353,23 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
+        if not ex_boot_disk:
+            ex_boot_disk = self.create_volume(None, name, location=location,
+                                              image=image)
+
         request, node_data = self._create_node_req(name, size, image,
                                                    location, ex_network,
                                                    ex_tags, ex_metadata,
-                                                   ex_boot_disk,
-                                                   ex_persistent_disk)
+                                                   ex_boot_disk)
         self.connection.async_request(request, method='POST', data=node_data)
 
         return self.ex_get_node(name, location.name)
 
+
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True, ex_persistent_disk=False,
+                                 ignore_errors=True,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1408,12 +1410,9 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails.
         :type     ignore_errors: ``bool``
 
-        :keyword  persistent_disk: If True, create persistent boot disks
-                                   instead of ephemeral ones.
-        :type     persistent_disk: ``bool``
-
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
+        :type     timeout: ``int``
 
         :return:  A list of Node objects for the new nodes.
         :rtype:   ``list`` of :class:`Node`
@@ -1429,16 +1428,23 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
-        node_list = [None] * number
-        responses = []
+        # List for holding the status information for disk/node creation.
+        status_list = [None] * number
+
         for i in range(number):
             name = '%s-%03d' % (base_name, i)
-            request, node_data = self._create_node_req(
-                name, size, image, location, ex_network, ex_tags, ex_metadata,
-                persistent_disk=ex_persistent_disk)
-            response = self.connection.request(request, method='POST',
-                                               data=node_data)
-            responses.append(response.object)
+
+            # Create disks for nodes
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, name, location=location, image=image)
+            disk_res = self.connection.request(disk_req, method='POST',
+                                               data=disk_data,
+                                               params=disk_params).object
+            status_list[i] = {'name': name,
+                              'node_response': None,
+                              'node': None,
+                              'disk_response': disk_res,
+                              'disk': None}
 
         start_time = time.time()
         complete = False
@@ -1447,27 +1453,66 @@ class GCENodeDriver(NodeDriver):
                 raise Exception("Timeout (%s sec) while waiting for multiple "
                                 "instances")
             complete = True
-            for i, operation in enumerate(responses):
-                if operation is None:
-                    continue
-                error = None
-                try:
-                    response = self.connection.request(
-                        operation['selfLink']).object
-                except:
-                    e = self._catch_error(ignore_errors=ignore_errors)
-                    error = e.value
-                    code = e.code
-                if response['status'] == 'DONE':
-                    responses[i] = None
-                    name = '%s-%03d' % (base_name, i)
-                    if error:
-                        node_list[i] = GCEFailedNode(name, error, code)
+            time.sleep(2)
+            for i, status in enumerate(status_list):
+                # If disk does not yet exist, check on its status
+                if not status['disk']:
+                    error = None
+                    try:
+                        response = self.connection.request(
+                            status['disk_response']['selfLink']).object
+                    except:
+                        e = self._catch_error(ignore_errors=ignore_errors)
+                        error = e.value
+                        code = e.code
+                    if response['status'] == 'DONE':
+                        status['disk_response'] = None
+                        if error:
+                            status['disk'] = GCEFailedDisk(status['name'],
+                                                           error, code)
+                        else:
+                            status['disk'] = self.ex_get_volume(status['name'], location)
+
+                # If disk exists, but node does not, create the node or check on
+                # its status if already in progress.
+                if status['disk'] and not status['node']:
+                    if not status['node_response']:
+                        request, node_data = self._create_node_req(status['name'], size,
+                                                                   image,
+                                                                   location,
+                                                                   ex_network,
+                                                                   ex_tags,
+                                                                   ex_metadata,
+                                                                   boot_disk=status['disk'])
+                        node_res = self.connection.request(request,
+                                                           method='POST',
+                                                           data=node_data).object
+                        status['node_response'] = node_res
                     else:
-                        node_list[i] = self.ex_get_node(name, location.name)
-                else:
+                        error = None
+                        try:
+                            response = self.connection.request(
+                                status['node_response']['selfLink']).object
+                        except:
+                            e = self._catch_error(ignore_errors=ignore_errors)
+                            error = e.value
+                            code = e.code
+                        if response['status'] == 'DONE':
+                            status['node_response'] = None
+                        if error:
+                            status['node'] = GCEFailedNode(status['name'],
+                                                           error, code)
+                        else:
+                            status['node'] = self.ex_get_node(status['name'], location)
+
+                # If any of the nodes have not been created (or failed) we are
+                # not done yet.
+                if not status['node']:
                     complete = False
-                    time.sleep(2)
+
+        node_list = []
+        for status in status_list:
+            node_list.append(status['node'])
         return node_list
 
     def ex_create_targetpool(self, name, region=None, healthchecks=None,
@@ -1520,10 +1565,12 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None):
+    def _create_vol_req(self, size, name, location=None, image=None,
+                        snapshot=None):
         """
-        Create a volume (disk).
+        Assemble the request/data for creating a volume.
+
+        Used by create_volume and ex_create_multiple_nodes
 
         :param  size: Size of volume to create (in GB). Can be None if image
                       or snapshot is supplied.
@@ -1542,8 +1589,9 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
-        :return:  Storage Volume object
-        :rtype:   :class:`StorageVolume`
+        :return:  Tuple containg the request string, the data dictionary and the
+                  URL parameters
+        :rtype:   ``tuple``
         """
         volume_data = {}
         params = None
@@ -1563,8 +1611,38 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
         request = '/zones/%s/disks' % (location.name)
-        self.connection.async_request(request, method='POST',
-                                      data=volume_data,
+
+        return request, volume_data, params
+
+
+    def create_volume(self, size, name, location=None, image=None,
+                      snapshot=None):
+        """
+        Create a volume (disk).
+
+        :param  size: Size of volume to create (in GB). Can be None if image
+                      or snapshot is supplied.
+        :type   size: ``int`` or ``str`` or ``None``
+
+        :param  name: Name of volume to create
+        :type   name: ``str``
+
+        :keyword  location: Location (zone) to create the volume in
+        :type     location: ``str`` or :class:`GCEZone` or
+                            :class:`NodeLocation` or ``None``
+
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
+        :keyword  snapshot: Snapshot to create image from (needs full URI)
+        :type     snapshot: ``str``
+
+        :return:  Storage Volume object
+        :rtype:   :class:`StorageVolume`
+        """
+        request, volume_data, params = self._create_vol_req(
+            size, name, location, image, snapshot)
+        self.connection.async_request(request, method='POST', data=volume_data,
                                       params=params)
 
         return self.ex_get_volume(name, location)


[44/44] git commit: Merge branch 'LIBCLOUD-450_GCEv1' into trunk

Posted by to...@apache.org.
Merge branch 'LIBCLOUD-450_GCEv1' into trunk


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

Branch: refs/heads/trunk
Commit: 6fda82f34f4c0d0629f3043e1fa6c28109a7ae17
Parents: 039f742 f519acb
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Jan 3 15:32:28 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Jan 3 15:32:37 2014 +0100

----------------------------------------------------------------------
 demos/gce_demo.py                               |   34 +-
 demos/gce_lb_demo.py                            |    3 +-
 libcloud/common/google.py                       |   45 +-
 libcloud/compute/drivers/gce.py                 | 1539 +++++++++------
 .../fixtures/gce/aggregated_addresses.json      |   18 +-
 .../compute/fixtures/gce/aggregated_disks.json  |  115 +-
 .../gce/aggregated_forwardingRules.json         |   32 +-
 .../fixtures/gce/aggregated_instances.json      |  260 +--
 .../fixtures/gce/aggregated_machineTypes.json   | 1825 ++++++++++--------
 .../fixtures/gce/aggregated_targetPools.json    |   28 +-
 .../test/compute/fixtures/gce/generic_disk.json |   13 +
 .../compute/fixtures/gce/global_firewalls.json  |   22 +-
 .../gce/global_firewalls_lcfirewall.json        |    4 +-
 .../gce/global_firewalls_lcfirewall_delete.json |    4 +-
 .../gce/global_firewalls_lcfirewall_put.json    |    4 +-
 .../fixtures/gce/global_firewalls_post.json     |    4 +-
 .../fixtures/gce/global_httpHealthChecks.json   |   24 +-
 .../global_httpHealthChecks_basic-check.json    |    2 +-
 .../global_httpHealthChecks_lchealthcheck.json  |    2 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ...althChecks_libcloud-lb-demo-healthcheck.json |    2 +-
 .../gce/global_httpHealthChecks_post.json       |    4 +-
 .../compute/fixtures/gce/global_images.json     |   10 +-
 .../compute/fixtures/gce/global_networks.json   |    8 +-
 .../fixtures/gce/global_networks_default.json   |    2 +-
 .../fixtures/gce/global_networks_lcnetwork.json |    2 +-
 .../gce/global_networks_lcnetwork_delete.json   |    4 +-
 ...l_networks_libcloud-demo-europe-network.json |    2 +-
 .../global_networks_libcloud-demo-network.json  |    2 +-
 .../fixtures/gce/global_networks_post.json      |    4 +-
 .../compute/fixtures/gce/global_snapshots.json  |   31 +
 .../gce/global_snapshots_lcsnapshot.json        |   12 +
 .../gce/global_snapshots_lcsnapshot_delete.json |   14 +
 ...tion_global_firewalls_lcfirewall_delete.json |    4 +-
 ...eration_global_firewalls_lcfirewall_put.json |    4 +-
 ...rations_operation_global_firewalls_post.json |    4 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ..._operation_global_httpHealthChecks_post.json |    4 +-
 ...ration_global_networks_lcnetwork_delete.json |    4 +-
 ...erations_operation_global_networks_post.json |    4 +-
 ...tion_global_snapshots_lcsnapshot_delete.json |   15 +
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 ...tion_regions_us-central1_addresses_post.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...on_regions_us-central1_targetPools_post.json |    6 +-
 ...ion_zones_europe-west1-a_instances_post.json |    6 +-
 ...ral1-a_disks_lcdisk_createSnapshot_post.json |   16 +
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 ...peration_zones_us-central1-a_disks_post.json |    6 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    6 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 ...tion_zones_us-central1-a_instances_post.json |    6 +-
 libcloud/test/compute/fixtures/gce/project.json |    2 +-
 .../projects_debian-cloud_global_images.json    |  172 +-
 libcloud/test/compute/fixtures/gce/regions.json |   18 +-
 .../gce/regions_us-central1_addresses.json      |   10 +-
 ...regions_us-central1_addresses_lcaddress.json |    4 +-
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 .../gce/regions_us-central1_addresses_post.json |    6 +-
 .../regions_us-central1_forwardingRules.json    |   14 +-
 ...ntral1_forwardingRules_lcforwardingrule.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...al1_forwardingRules_libcloud-lb-demo-lb.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 .../gce/regions_us-central1_targetPools.json    |   24 +-
 ...ns_us-central1_targetPools_lctargetpool.json |   10 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...ral1_targetPools_libcloud-lb-demo-lb-tp.json |   12 +-
 .../regions_us-central1_targetPools_post.json   |    6 +-
 ...egions_us-central1_targetPools_www-pool.json |   12 +-
 libcloud/test/compute/fixtures/gce/zones.json   |   35 +-
 .../gce/zones_europe-west1-a_instances.json     |   83 +-
 .../zones_europe-west1-a_instances_post.json    |    6 +-
 ...rope-west1-a_machineTypes_n1-standard-1.json |    2 +-
 .../fixtures/gce/zones_us-central1-a.json       |    4 +-
 .../fixtures/gce/zones_us-central1-a_disks.json |   33 +-
 .../gce/zones_us-central1-a_disks_lcdisk.json   |    4 +-
 ...ral1-a_disks_lcdisk_createSnapshot_post.json |   15 +
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 .../gce/zones_us-central1-a_disks_post.json     |    6 +-
 .../gce/zones_us-central1-a_instances.json      |  213 +-
 ...ones_us-central1-a_instances_lcnode-000.json |   28 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...ones_us-central1-a_instances_lcnode-001.json |   26 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...zones_us-central1-a_instances_node-name.json |   26 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    8 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 .../gce/zones_us-central1-a_instances_post.json |    6 +-
 .../gce/zones_us-central1-a_machineTypes.json   |   96 +-
 ...s-central1-a_machineTypes_n1-standard-1.json |    2 +-
 ...l1-b_instances_libcloud-lb-demo-www-000.json |   29 +-
 ...l1-b_instances_libcloud-lb-demo-www-001.json |   31 +-
 libcloud/test/compute/test_gce.py               |  163 +-
 libcloud/test/loadbalancer/test_gce.py          |    6 +-
 115 files changed, 3281 insertions(+), 2205 deletions(-)
----------------------------------------------------------------------



[37/44] git commit: Fix signature for create_volume to align with the base API

Posted by to...@apache.org.
Fix signature for create_volume to align with the base API


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

Branch: refs/heads/trunk
Commit: 6456cdea6508a3c1a6afd70748a7eb826980f090
Parents: 02fa688
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 14:20:40 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6456cdea/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 8e59d3f..5277fc3 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1632,8 +1632,8 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def _create_vol_req(self, size, name, location=None, image=None,
-                        snapshot=None):
+    def _create_vol_req(self, size, name, location=None, snapshot=None,
+                        image=None):
         """
         Assemble the request/data for creating a volume.
 
@@ -1650,12 +1650,12 @@ class GCENodeDriver(NodeDriver):
         :type     location: ``str`` or :class:`GCEZone` or
                             :class:`NodeLocation` or ``None``
 
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
         :keyword  snapshot: Snapshot to create image from
         :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
         :return:  Tuple containg the request string, the data dictionary and
                   the URL parameters
         :rtype:   ``tuple``
@@ -1687,8 +1687,8 @@ class GCENodeDriver(NodeDriver):
 
         return request, volume_data, params
 
-    def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None, use_existing=True):
+    def create_volume(self, size, name, location=None, snapshot=None,
+                      image=None, use_existing=True):
         """
         Create a volume (disk).
 
@@ -1703,12 +1703,12 @@ class GCENodeDriver(NodeDriver):
         :type     location: ``str`` or :class:`GCEZone` or
                             :class:`NodeLocation` or ``None``
 
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
         :keyword  snapshot: Snapshot to create image from
         :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
         :keyword  use_existing: If True and a disk with the given name already
                                 exists, return an object for that disk instead
                                 of attempting to create a new disk.
@@ -1718,7 +1718,7 @@ class GCENodeDriver(NodeDriver):
         :rtype:   :class:`StorageVolume`
         """
         request, volume_data, params = self._create_vol_req(
-            size, name, location, image, snapshot)
+            size, name, location, snapshot, image)
         try:
             self.connection.async_request(request, method='POST',
                                           data=volume_data, params=params)


[42/44] git commit: Reorder methods to put them in public/private/internal order.

Posted by to...@apache.org.
Reorder methods to put them in public/private/internal order.


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

Branch: refs/heads/trunk
Commit: 00c30bc457bbda07dbc7cebedb520a3edf0a9722
Parents: 9e6caa7
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 22:58:36 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 938 +++++++++++++++++------------------
 1 file changed, 469 insertions(+), 469 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/00c30bc4/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 71d2d1f..f056774 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -88,10 +88,6 @@ class GCEAddress(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEAddress id="%s" name="%s" address="%s">' % (
-            self.id, self.name, self.address)
-
     def destroy(self):
         """
         Destroy this address.
@@ -101,6 +97,10 @@ class GCEAddress(UuidMixin):
         """
         return self.driver.ex_destroy_address(address=self)
 
+    def __repr__(self):
+        return '<GCEAddress id="%s" name="%s" address="%s">' % (
+            self.id, self.name, self.address)
+
 
 class GCEFailedDisk(object):
     """Dummy Node object for disks that are not created."""
@@ -142,10 +142,6 @@ class GCEHealthCheck(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEHealthCheck id="%s" name="%s" path="%s" port="%s">' % (
-            self.id, self.name, self.path, self.port)
-
     def destroy(self):
         """
         Destroy this Health Check.
@@ -164,6 +160,10 @@ class GCEHealthCheck(UuidMixin):
         """
         return self.driver.ex_update_healthcheck(healthcheck=self)
 
+    def __repr__(self):
+        return '<GCEHealthCheck id="%s" name="%s" path="%s" port="%s">' % (
+            self.id, self.name, self.path, self.port)
+
 
 class GCEFirewall(UuidMixin):
     """A GCE Firewall rule class."""
@@ -179,10 +179,6 @@ class GCEFirewall(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEFirewall id="%s" name="%s" network="%s">' % (
-            self.id, self.name, self.network.name)
-
     def destroy(self):
         """
         Destroy this firewall.
@@ -201,6 +197,10 @@ class GCEFirewall(UuidMixin):
         """
         return self.driver.ex_update_firewall(firewall=self)
 
+    def __repr__(self):
+        return '<GCEFirewall id="%s" name="%s" network="%s">' % (
+            self.id, self.name, self.network.name)
+
 
 class GCEForwardingRule(UuidMixin):
     def __init__(self, id, name, region, address, protocol, targetpool, driver,
@@ -215,10 +215,6 @@ class GCEForwardingRule(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEForwardingRule id="%s" name="%s" address="%s">' % (
-            self.id, self.name, self.address)
-
     def destroy(self):
         """
         Destroy this Forwarding Rule
@@ -228,6 +224,10 @@ class GCEForwardingRule(UuidMixin):
         """
         return self.driver.ex_destroy_forwarding_rule(forwarding_rule=self)
 
+    def __repr__(self):
+        return '<GCEForwardingRule id="%s" name="%s" address="%s">' % (
+            self.id, self.name, self.address)
+
 
 class GCENetwork(UuidMixin):
     """A GCE Network object class."""
@@ -239,10 +239,6 @@ class GCENetwork(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCENetwork id="%s" name="%s" cidr="%s">' % (
-            self.id, self.name, self.cidr)
-
     def destroy(self):
         """
         Destroy this newtwork
@@ -252,6 +248,10 @@ class GCENetwork(UuidMixin):
         """
         return self.driver.ex_destroy_network(network=self)
 
+    def __repr__(self):
+        return '<GCENetwork id="%s" name="%s" cidr="%s">' % (
+            self.id, self.name, self.cidr)
+
 
 class GCENodeSize(NodeSize):
     """A GCE Node Size (MachineType) class."""
@@ -314,10 +314,6 @@ class GCETargetPool(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCETargetPool id="%s" name="%s" region="%s">' % (
-            self.id, self.name, self.region.name)
-
     def add_node(self, node):
         """
         Add a node to this target pool.
@@ -378,6 +374,10 @@ class GCETargetPool(UuidMixin):
         """
         return self.driver.ex_destroy_targetpool(targetpool=self)
 
+    def __repr__(self):
+        return '<GCETargetPool id="%s" name="%s" region="%s">' % (
+            self.id, self.name, self.region.name)
+
 
 class GCEZone(NodeLocation):
     """Subclass of NodeLocation to provide additional information."""
@@ -391,6 +391,22 @@ class GCEZone(NodeLocation):
         super(GCEZone, self).__init__(id=str(id), name=name, country=country,
                                       driver=driver)
 
+    @property
+    def time_until_mw(self):
+        """
+        Returns the time until the next Maintenance Window as a
+        datetime.timedelta object.
+        """
+        return self._get_time_until_mw()
+
+    @property
+    def next_mw_duration(self):
+        """
+        Returns the duration of the next Maintenance Window as a
+        datetime.timedelta object.
+        """
+        return self._get_next_mw_duration()
+
     def _now(self):
         """
         Returns current UTC time.
@@ -455,22 +471,6 @@ class GCEZone(NodeLocation):
         next_end = timestamp_to_datetime(next_window['endTime'])
         return next_end - next_begin
 
-    @property
-    def time_until_mw(self):
-        """
-        Returns the time until the next Maintenance Window as a
-        datetime.timedelta object.
-        """
-        return self._get_time_until_mw()
-
-    @property
-    def next_mw_duration(self):
-        """
-        Returns the duration of the next Maintenance Window as a
-        datetime.timedelta object.
-        """
-        return self._get_next_mw_duration()
-
     def __repr__(self):
         return '<GCEZone id="%s" name="%s" status="%s">' % (self.id, self.name,
                                                             self.status)
@@ -558,182 +558,6 @@ class GCENodeDriver(NodeDriver):
         else:
             self.region = None
 
-    def _ex_connection_class_kwargs(self):
-        return {'auth_type': self.auth_type,
-                'project': self.project}
-
-    def _catch_error(self, ignore_errors=False):
-        """
-        Catch an exception and raise it unless asked to ignore it.
-
-        :keyword  ignore_errors: If true, just return the error.  Otherwise,
-                                 raise the error.
-        :type     ignore_errors: ``bool``
-
-        :return:  The exception that was raised.
-        :rtype:   :class:`Exception`
-        """
-        e = sys.exc_info()[1]
-        if ignore_errors:
-            return e
-        else:
-            raise e
-
-    def _get_components_from_path(self, path):
-        """
-        Return a dictionary containing name & zone/region from a request path.
-
-        :param  path: HTTP request path (e.g.
-                      '/project/pjt-name/zones/us-central1-a/instances/mynode')
-        :type   path: ``str``
-
-        :return:  Dictionary containing name and zone/region of resource
-        :rtype    ``dict``
-        """
-        region = None
-        zone = None
-        glob = False
-        components = path.split('/')
-        name = components[-1]
-        if components[-4] == 'regions':
-            region = components[-3]
-        elif components[-4] == 'zones':
-            zone = components[-3]
-        elif components[-3] == 'global':
-            glob = True
-
-        return {'name': name, 'region': region, 'zone': zone, 'global': glob}
-
-    def _get_region_from_zone(self, zone):
-        """
-        Return the Region object that contains the given Zone object.
-
-        :param  zone: Zone object
-        :type   zone: :class:`GCEZone`
-
-        :return:  Region object that contains the zone
-        :rtype:   :class:`GCERegion`
-        """
-        for region in self.region_list:
-            zones = [z.name for z in region.zones]
-            if zone.name in zones:
-                return region
-
-    def _find_zone_or_region(self, name, res_type, region=False,
-                             res_name=None):
-        """
-        Find the zone or region for a named resource.
-
-        :param  name: Name of resource to find
-        :type   name: ``str``
-
-        :param  res_type: Type of resource to find.
-                          Examples include: 'disks', 'instances' or 'addresses'
-        :type   res_type: ``str``
-
-        :keyword  region: If True, search regions instead of zones
-        :type     region: ``bool``
-
-        :keyword  res_name: The name of the resource type for error messages.
-                            Examples: 'Volume', 'Node', 'Address'
-        :keyword  res_name: ``str``
-
-        :return:  Zone/Region object for the zone/region for the resource.
-        :rtype:   :class:`GCEZone` or :class:`GCERegion`
-        """
-        if region:
-            rz = 'region'
-        else:
-            rz = 'zone'
-        rz_name = None
-        res_name = res_name or res_type
-        request = '/aggregated/%s' % (res_type)
-        res_list = self.connection.request(request).object
-        for k, v in res_list['items'].items():
-            for res in v.get(res_type, []):
-                if res['name'] == name:
-                    rz_name = k.replace('%ss/' % (rz), '')
-                    break
-        if not rz_name:
-            raise ResourceNotFoundError(
-                '%s \'%s\' not found in any %s.' % (res_name, name, rz),
-                None, None)
-        else:
-            getrz = getattr(self, 'ex_get_%s' % (rz))
-            return getrz(rz_name)
-
-    def _match_images(self, project, partial_name):
-        """
-        Find the latest image, given a partial name.
-
-        For example, providing 'debian-7' will return the image object for the
-        most recent image with a name that starts with 'debian-7' in the
-        supplied project.  If no project is given, it will search your own
-        project.
-
-        :param  project:  The name of the project to search for images.
-                          Examples include: 'debian-cloud' and 'centos-cloud'.
-        :type   project:  ``str`` or ``None``
-
-        :param  partial_name: The full name or beginning of a name for an
-                              image.
-        :type   partial_name: ``str``
-
-        :return:  The latest image object that maches the partial name or None
-                  if no matching image is found.
-        :rtype:   :class:`NodeImage` or ``None``
-        """
-        project_images = self.list_images(project)
-        partial_match = []
-        for image in project_images:
-            if image.name == partial_name:
-                return image
-            if image.name.startswith(partial_name):
-                ts = timestamp_to_datetime(image.extra['creationTimestamp'])
-                if not partial_match or partial_match[0] < ts:
-                    partial_match = [ts, image]
-
-        if partial_match:
-            return partial_match[1]
-
-    def _set_region(self, region):
-        """
-        Return the region to use for listing resources.
-
-        :param  region: A name, region object, None, or 'all'
-        :type   region: ``str`` or :class:`GCERegion` or ``None``
-
-        :return:  A region object or None if all regions should be considered
-        :rtype:   :class:`GCERegion` or ``None``
-        """
-        region = region or self.region
-
-        if region == 'all' or region is None:
-            return None
-
-        if not hasattr(region, 'name'):
-            region = self.ex_get_region(region)
-        return region
-
-    def _set_zone(self, zone):
-        """
-        Return the zone to use for listing resources.
-
-        :param  zone: A name, zone object, None, or 'all'
-        :type   region: ``str`` or :class:`GCEZone` or ``None``
-
-        :return:  A zone object or None if all zones should be considered
-        :rtype:   :class:`GCEZone` or ``None``
-        """
-        zone = zone or self.zone
-
-        if zone == 'all' or zone is None:
-            return None
-
-        if not hasattr(zone, 'name'):
-            zone = self.ex_get_zone(zone)
-        return zone
-
     def ex_list_addresses(self, region=None):
         """
         Return a list of static addreses for a region or all.
@@ -1267,71 +1091,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_network(name)
 
-    def _create_node_req(self, name, size, image, location, network,
-                         tags=None, metadata=None, boot_disk=None):
-        """
-        Returns a request and body to create a new node.  This is a helper
-        method to suppor both :class:`create_node` and
-        :class:`ex_create_multiple_nodes`.
-
-        :param  name: The name of the node to create.
-        :type   name: ``str``
-
-        :param  size: The machine type to use.
-        :type   size: :class:`GCENodeSize`
-
-        :param  image: The image to use to create the node (or, if using a
-                       persistent disk, the image the disk was created from).
-        :type   image: :class:`NodeImage`
-
-        :param  location: The location (zone) to create the node in.
-        :type   location: :class:`NodeLocation` or :class:`GCEZone`
-
-        :param  network: The network to associate with the node.
-        :type   network: :class:`GCENetwork`
-
-        :keyword  tags: A list of tags to assiciate with the node.
-        :type     tags: ``list`` of ``str``
-
-        :keyword  metadata: Metadata dictionary for instance.
-        :type     metadata: ``dict``
-
-        :keyword  boot_disk:  Persistent boot disk to attach.
-        :type     :class:`StorageVolume`
-
-        :return:  A tuple containing a request string and a node_data dict.
-        :rtype:   ``tuple`` of ``str`` and ``dict``
-        """
-        node_data = {}
-        node_data['machineType'] = size.extra['selfLink']
-        node_data['name'] = name
-        if tags:
-            node_data['tags'] = {'items': tags}
-        if metadata:
-            node_data['metadata'] = metadata
-
-        if boot_disk:
-            disks = [{'kind': 'compute#attachedDisk',
-                      'boot': True,
-                      'type': 'PERSISTENT',
-                      'mode': 'READ_WRITE',
-                      'deviceName': boot_disk.name,
-                      'zone': boot_disk.extra['zone'].extra['selfLink'],
-                      'source': boot_disk.extra['selfLink']}]
-            node_data['disks'] = disks
-        else:
-            node_data['image'] = image.extra['selfLink']
-
-        ni = [{'kind': 'compute#instanceNetworkInterface',
-               'accessConfigs': [{'name': 'External NAT',
-                                  'type': 'ONE_TO_ONE_NAT'}],
-               'network': network.extra['selfLink']}]
-        node_data['networkInterfaces'] = ni
-
-        request = '/zones/%s/instances' % (location.name)
-
-        return request, node_data
-
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
                     ex_boot_disk=None, use_existing_disk=True):
@@ -1395,139 +1154,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
-    def _multi_create_disk(self, status, node_attrs):
-        """Create disk for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        disk = None
-        # Check for existing disk
-        if node_attrs['use_existing_disk']:
-            try:
-                disk = self.ex_get_volume(status['name'],
-                                          node_attrs['location'])
-            except ResourceNotFoundError:
-                pass
-
-        if disk:
-            status['disk'] = disk
-        else:
-            # Create disk and return response object back in the status dict.
-            # Or, if there is an error, mark as failed.
-            disk_req, disk_data, disk_params = self._create_vol_req(
-                None, status['name'], location=node_attrs['location'],
-                image=node_attrs['image'])
-            try:
-                disk_res = self.connection.request(
-                    disk_req, method='POST', data=disk_data,
-                    params=disk_params).object
-            except GoogleBaseError:
-                e = self._catch_error(
-                    ignore_errors=node_attrs['ignore_errors'])
-                error = e.value
-                code = e.code
-                disk_res = None
-                status['disk'] = GCEFailedDisk(status['name'],
-                                               error, code)
-            status['disk_response'] = disk_res
-
-    def _multi_check_disk(self, status, node_attrs):
-        """Check disk status for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        error = None
-        try:
-            response = self.connection.request(
-                status['disk_response']['selfLink']).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            response = {'status': 'DONE'}
-        if response['status'] == 'DONE':
-            status['disk_response'] = None
-            if error:
-                status['disk'] = GCEFailedDisk(status['name'], error, code)
-            else:
-                status['disk'] = self.ex_get_volume(status['name'],
-                                                    node_attrs['location'])
-
-    def _multi_create_node(self, status, node_attrs):
-        """Create node for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        # If disk has an error, set the node as failed and return
-        if hasattr(status['disk'], 'error'):
-            status['node'] = status['disk']
-            return
-
-        # Create node and return response object in status dictionary.
-        # Or, if there is an error, mark as failed.
-        request, node_data = self._create_node_req(
-            status['name'], node_attrs['size'], node_attrs['image'],
-            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
-            node_attrs['metadata'], boot_disk=status['disk'])
-        try:
-            node_res = self.connection.request(
-                request, method='POST', data=node_data).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            node_res = None
-            status['node'] = GCEFailedNode(status['name'],
-                                           error, code)
-        status['node_response'] = node_res
-
-    def _multi_check_node(self, status, node_attrs):
-        """Check node status for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        error = None
-        try:
-            response = self.connection.request(
-                status['node_response']['selfLink']).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            response = {'status': 'DONE'}
-        if response['status'] == 'DONE':
-            status['node_response'] = None
-        if error:
-            status['node'] = GCEFailedNode(status['name'],
-                                           error, code)
-        else:
-            status['node'] = self.ex_get_node(status['name'],
-                                              node_attrs['location'])
-
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
@@ -1706,61 +1332,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def _create_vol_req(self, size, name, location=None, snapshot=None,
-                        image=None):
-        """
-        Assemble the request/data for creating a volume.
-
-        Used by create_volume and ex_create_multiple_nodes
-
-        :param  size: Size of volume to create (in GB). Can be None if image
-                      or snapshot is supplied.
-        :type   size: ``int`` or ``str`` or ``None``
-
-        :param  name: Name of volume to create
-        :type   name: ``str``
-
-        :keyword  location: Location (zone) to create the volume in
-        :type     location: ``str`` or :class:`GCEZone` or
-                            :class:`NodeLocation` or ``None``
-
-        :keyword  snapshot: Snapshot to create image from
-        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
-
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
-        :return:  Tuple containg the request string, the data dictionary and
-                  the URL parameters
-        :rtype:   ``tuple``
-        """
-        volume_data = {}
-        params = None
-        volume_data['name'] = name
-        if size:
-            volume_data['sizeGb'] = str(size)
-        if image:
-            if not hasattr(image, 'name'):
-                image = self.ex_get_image(image)
-            params = {'sourceImage': image.extra['selfLink']}
-            volume_data['description'] = 'Image: %s' % (
-                image.extra['selfLink'])
-        if snapshot:
-            if not hasattr(snapshot, 'name'):
-                # Check for full URI to not break backward-compatibility
-                if snapshot.startswith('https'):
-                    snapshot = self._get_components_from_path(snapshot)['name']
-                snapshot = self.ex_get_snapshot(snapshot)
-            snapshot_link = snapshot.extra['selfLink']
-            volume_data['sourceSnapshot'] = snapshot_link
-            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
-        location = location or self.zone
-        if not hasattr(location, 'name'):
-            location = self.ex_get_zone(location)
-        request = '/zones/%s/disks' % (location.name)
-
-        return request, volume_data, params
-
     def create_volume(self, size, name, location=None, snapshot=None,
                       image=None, use_existing=True):
         """
@@ -2734,6 +2305,435 @@ class GCENodeDriver(NodeDriver):
             return None
         return self._to_zone(response)
 
+    def _ex_connection_class_kwargs(self):
+        return {'auth_type': self.auth_type,
+                'project': self.project}
+
+    def _catch_error(self, ignore_errors=False):
+        """
+        Catch an exception and raise it unless asked to ignore it.
+
+        :keyword  ignore_errors: If true, just return the error.  Otherwise,
+                                 raise the error.
+        :type     ignore_errors: ``bool``
+
+        :return:  The exception that was raised.
+        :rtype:   :class:`Exception`
+        """
+        e = sys.exc_info()[1]
+        if ignore_errors:
+            return e
+        else:
+            raise e
+
+    def _get_components_from_path(self, path):
+        """
+        Return a dictionary containing name & zone/region from a request path.
+
+        :param  path: HTTP request path (e.g.
+                      '/project/pjt-name/zones/us-central1-a/instances/mynode')
+        :type   path: ``str``
+
+        :return:  Dictionary containing name and zone/region of resource
+        :rtype    ``dict``
+        """
+        region = None
+        zone = None
+        glob = False
+        components = path.split('/')
+        name = components[-1]
+        if components[-4] == 'regions':
+            region = components[-3]
+        elif components[-4] == 'zones':
+            zone = components[-3]
+        elif components[-3] == 'global':
+            glob = True
+
+        return {'name': name, 'region': region, 'zone': zone, 'global': glob}
+
+    def _get_region_from_zone(self, zone):
+        """
+        Return the Region object that contains the given Zone object.
+
+        :param  zone: Zone object
+        :type   zone: :class:`GCEZone`
+
+        :return:  Region object that contains the zone
+        :rtype:   :class:`GCERegion`
+        """
+        for region in self.region_list:
+            zones = [z.name for z in region.zones]
+            if zone.name in zones:
+                return region
+
+    def _find_zone_or_region(self, name, res_type, region=False,
+                             res_name=None):
+        """
+        Find the zone or region for a named resource.
+
+        :param  name: Name of resource to find
+        :type   name: ``str``
+
+        :param  res_type: Type of resource to find.
+                          Examples include: 'disks', 'instances' or 'addresses'
+        :type   res_type: ``str``
+
+        :keyword  region: If True, search regions instead of zones
+        :type     region: ``bool``
+
+        :keyword  res_name: The name of the resource type for error messages.
+                            Examples: 'Volume', 'Node', 'Address'
+        :keyword  res_name: ``str``
+
+        :return:  Zone/Region object for the zone/region for the resource.
+        :rtype:   :class:`GCEZone` or :class:`GCERegion`
+        """
+        if region:
+            rz = 'region'
+        else:
+            rz = 'zone'
+        rz_name = None
+        res_name = res_name or res_type
+        request = '/aggregated/%s' % (res_type)
+        res_list = self.connection.request(request).object
+        for k, v in res_list['items'].items():
+            for res in v.get(res_type, []):
+                if res['name'] == name:
+                    rz_name = k.replace('%ss/' % (rz), '')
+                    break
+        if not rz_name:
+            raise ResourceNotFoundError(
+                '%s \'%s\' not found in any %s.' % (res_name, name, rz),
+                None, None)
+        else:
+            getrz = getattr(self, 'ex_get_%s' % (rz))
+            return getrz(rz_name)
+
+    def _match_images(self, project, partial_name):
+        """
+        Find the latest image, given a partial name.
+
+        For example, providing 'debian-7' will return the image object for the
+        most recent image with a name that starts with 'debian-7' in the
+        supplied project.  If no project is given, it will search your own
+        project.
+
+        :param  project:  The name of the project to search for images.
+                          Examples include: 'debian-cloud' and 'centos-cloud'.
+        :type   project:  ``str`` or ``None``
+
+        :param  partial_name: The full name or beginning of a name for an
+                              image.
+        :type   partial_name: ``str``
+
+        :return:  The latest image object that maches the partial name or None
+                  if no matching image is found.
+        :rtype:   :class:`NodeImage` or ``None``
+        """
+        project_images = self.list_images(project)
+        partial_match = []
+        for image in project_images:
+            if image.name == partial_name:
+                return image
+            if image.name.startswith(partial_name):
+                ts = timestamp_to_datetime(image.extra['creationTimestamp'])
+                if not partial_match or partial_match[0] < ts:
+                    partial_match = [ts, image]
+
+        if partial_match:
+            return partial_match[1]
+
+    def _set_region(self, region):
+        """
+        Return the region to use for listing resources.
+
+        :param  region: A name, region object, None, or 'all'
+        :type   region: ``str`` or :class:`GCERegion` or ``None``
+
+        :return:  A region object or None if all regions should be considered
+        :rtype:   :class:`GCERegion` or ``None``
+        """
+        region = region or self.region
+
+        if region == 'all' or region is None:
+            return None
+
+        if not hasattr(region, 'name'):
+            region = self.ex_get_region(region)
+        return region
+
+    def _set_zone(self, zone):
+        """
+        Return the zone to use for listing resources.
+
+        :param  zone: A name, zone object, None, or 'all'
+        :type   region: ``str`` or :class:`GCEZone` or ``None``
+
+        :return:  A zone object or None if all zones should be considered
+        :rtype:   :class:`GCEZone` or ``None``
+        """
+        zone = zone or self.zone
+
+        if zone == 'all' or zone is None:
+            return None
+
+        if not hasattr(zone, 'name'):
+            zone = self.ex_get_zone(zone)
+        return zone
+
+    def _create_node_req(self, name, size, image, location, network,
+                         tags=None, metadata=None, boot_disk=None):
+        """
+        Returns a request and body to create a new node.  This is a helper
+        method to suppor both :class:`create_node` and
+        :class:`ex_create_multiple_nodes`.
+
+        :param  name: The name of the node to create.
+        :type   name: ``str``
+
+        :param  size: The machine type to use.
+        :type   size: :class:`GCENodeSize`
+
+        :param  image: The image to use to create the node (or, if using a
+                       persistent disk, the image the disk was created from).
+        :type   image: :class:`NodeImage`
+
+        :param  location: The location (zone) to create the node in.
+        :type   location: :class:`NodeLocation` or :class:`GCEZone`
+
+        :param  network: The network to associate with the node.
+        :type   network: :class:`GCENetwork`
+
+        :keyword  tags: A list of tags to assiciate with the node.
+        :type     tags: ``list`` of ``str``
+
+        :keyword  metadata: Metadata dictionary for instance.
+        :type     metadata: ``dict``
+
+        :keyword  boot_disk:  Persistent boot disk to attach.
+        :type     :class:`StorageVolume`
+
+        :return:  A tuple containing a request string and a node_data dict.
+        :rtype:   ``tuple`` of ``str`` and ``dict``
+        """
+        node_data = {}
+        node_data['machineType'] = size.extra['selfLink']
+        node_data['name'] = name
+        if tags:
+            node_data['tags'] = {'items': tags}
+        if metadata:
+            node_data['metadata'] = metadata
+
+        if boot_disk:
+            disks = [{'kind': 'compute#attachedDisk',
+                      'boot': True,
+                      'type': 'PERSISTENT',
+                      'mode': 'READ_WRITE',
+                      'deviceName': boot_disk.name,
+                      'zone': boot_disk.extra['zone'].extra['selfLink'],
+                      'source': boot_disk.extra['selfLink']}]
+            node_data['disks'] = disks
+        else:
+            node_data['image'] = image.extra['selfLink']
+
+        ni = [{'kind': 'compute#instanceNetworkInterface',
+               'accessConfigs': [{'name': 'External NAT',
+                                  'type': 'ONE_TO_ONE_NAT'}],
+               'network': network.extra['selfLink']}]
+        node_data['networkInterfaces'] = ni
+
+        request = '/zones/%s/instances' % (location.name)
+
+        return request, node_data
+
+    def _multi_create_disk(self, status, node_attrs):
+        """Create disk for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        disk = None
+        # Check for existing disk
+        if node_attrs['use_existing_disk']:
+            try:
+                disk = self.ex_get_volume(status['name'],
+                                          node_attrs['location'])
+            except ResourceNotFoundError:
+                pass
+
+        if disk:
+            status['disk'] = disk
+        else:
+            # Create disk and return response object back in the status dict.
+            # Or, if there is an error, mark as failed.
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, status['name'], location=node_attrs['location'],
+                image=node_attrs['image'])
+            try:
+                disk_res = self.connection.request(
+                    disk_req, method='POST', data=disk_data,
+                    params=disk_params).object
+            except GoogleBaseError:
+                e = self._catch_error(
+                    ignore_errors=node_attrs['ignore_errors'])
+                error = e.value
+                code = e.code
+                disk_res = None
+                status['disk'] = GCEFailedDisk(status['name'],
+                                               error, code)
+            status['disk_response'] = disk_res
+
+    def _multi_check_disk(self, status, node_attrs):
+        """Check disk status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['disk_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['disk_response'] = None
+            if error:
+                status['disk'] = GCEFailedDisk(status['name'], error, code)
+            else:
+                status['disk'] = self.ex_get_volume(status['name'],
+                                                    node_attrs['location'])
+
+    def _multi_create_node(self, status, node_attrs):
+        """Create node for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        # If disk has an error, set the node as failed and return
+        if hasattr(status['disk'], 'error'):
+            status['node'] = status['disk']
+            return
+
+        # Create node and return response object in status dictionary.
+        # Or, if there is an error, mark as failed.
+        request, node_data = self._create_node_req(
+            status['name'], node_attrs['size'], node_attrs['image'],
+            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
+            node_attrs['metadata'], boot_disk=status['disk'])
+        try:
+            node_res = self.connection.request(
+                request, method='POST', data=node_data).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            node_res = None
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        status['node_response'] = node_res
+
+    def _multi_check_node(self, status, node_attrs):
+        """Check node status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['node_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['node_response'] = None
+        if error:
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        else:
+            status['node'] = self.ex_get_node(status['name'],
+                                              node_attrs['location'])
+
+    def _create_vol_req(self, size, name, location=None, snapshot=None,
+                        image=None):
+        """
+        Assemble the request/data for creating a volume.
+
+        Used by create_volume and ex_create_multiple_nodes
+
+        :param  size: Size of volume to create (in GB). Can be None if image
+                      or snapshot is supplied.
+        :type   size: ``int`` or ``str`` or ``None``
+
+        :param  name: Name of volume to create
+        :type   name: ``str``
+
+        :keyword  location: Location (zone) to create the volume in
+        :type     location: ``str`` or :class:`GCEZone` or
+                            :class:`NodeLocation` or ``None``
+
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
+
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
+        :return:  Tuple containg the request string, the data dictionary and
+                  the URL parameters
+        :rtype:   ``tuple``
+        """
+        volume_data = {}
+        params = None
+        volume_data['name'] = name
+        if size:
+            volume_data['sizeGb'] = str(size)
+        if image:
+            if not hasattr(image, 'name'):
+                image = self.ex_get_image(image)
+            params = {'sourceImage': image.extra['selfLink']}
+            volume_data['description'] = 'Image: %s' % (
+                image.extra['selfLink'])
+        if snapshot:
+            if not hasattr(snapshot, 'name'):
+                # Check for full URI to not break backward-compatibility
+                if snapshot.startswith('https'):
+                    snapshot = self._get_components_from_path(snapshot)['name']
+                snapshot = self.ex_get_snapshot(snapshot)
+            snapshot_link = snapshot.extra['selfLink']
+            volume_data['sourceSnapshot'] = snapshot_link
+            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
+        location = location or self.zone
+        if not hasattr(location, 'name'):
+            location = self.ex_get_zone(location)
+        request = '/zones/%s/disks' % (location.name)
+
+        return request, volume_data, params
+
     def _to_address(self, address):
         """
         Return an Address object from the json-response dictionary.


[30/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json b/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
index e8c832a..32de60d 100644
--- a/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
+++ b/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
@@ -2,278 +2,378 @@
   "id": "projects/debian-cloud/global/images",
   "items": [
     {
+      "archiveSizeBytes": "365056004",
+      "creationTimestamp": "2013-12-02T17:49:01.206-08:00",
+      "description": "Debian GNU/Linux 7.2 (wheezy) with backports kernel built on 2013-11-27",
+      "id": "11823693270029497919",
+      "kind": "compute#image",
+      "name": "backports-debian-7-wheezy-v20131127",
+      "rawDisk": {
+        "containerType": "TAR",
+        "source": ""
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-v20131127",
+      "sourceType": "RAW",
+      "status": "READY"
+    },
+    {
       "archiveSizeBytes": "214107225",
       "creationTimestamp": "2013-05-07T17:09:22.111-07:00",
+      "deprecated": {
+        "deleted": "1970-01-03",
+        "deprecated": "1970-01-01",
+        "obsolete": "1970-01-02",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-07",
       "id": "647943287916432906",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130507",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "255972840",
       "creationTimestamp": "2013-05-09T12:56:21.720-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-12T21:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-09",
       "id": "15745758816845911589",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130509",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130509",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130509",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "219458106",
       "creationTimestamp": "2013-05-14T21:01:12.124-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-15",
       "id": "006866479348046290",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130515",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130515",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130515",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130515",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "265118282",
       "creationTimestamp": "2013-05-30T09:48:37.837-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-22",
       "id": "1266148899538866390",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130522",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130522",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130522",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130522",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "233984980",
       "creationTimestamp": "2013-06-19T13:45:44.111-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-06-17",
       "id": "04009358257173422091",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "258168500",
       "creationTimestamp": "2013-07-24T12:31:06.054-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-07-23",
       "id": "3115342424904648000",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130723",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130723",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130723",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "300710522",
       "creationTimestamp": "2013-09-04T13:21:53.292-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-08-16",
       "id": "06130699342353523133",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130816",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130816",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130816",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "300710522",
       "creationTimestamp": "2013-10-11T09:26:47.736-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-09-26",
       "id": "0225119674082940764",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130926",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130926",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130926",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "237290472",
       "creationTimestamp": "2013-05-07T17:01:30.071-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-07",
       "id": "15638477823580670459",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130507",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130507",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130507",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "270107366",
       "creationTimestamp": "2013-05-09T12:56:47.910-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-09",
       "id": "020034532765408091",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130509",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130509",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130509",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "265604335",
       "creationTimestamp": "2013-05-14T21:02:55.044-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-15",
       "id": "0587071888358410836",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130515",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130515",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130515",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130515",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "284301993",
       "creationTimestamp": "2013-05-30T09:47:30.980-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-22",
       "id": "622079684385221180",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130522",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130522",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130522",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130522",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "310882322",
       "creationTimestamp": "2013-06-19T13:47:20.563-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-06-17",
       "id": "1549141992333368759",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "258869806",
       "creationTimestamp": "2013-07-24T12:31:36.790-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-07-23",
       "id": "3119304810142650253",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130723",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "279162251",
       "creationTimestamp": "2013-09-04T13:24:30.479-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-08-16",
       "id": "2595370902107306327",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130816",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130816",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130816",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "279162251",
       "creationTimestamp": "2013-10-11T09:26:56.993-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-09-26",
       "id": "06737951524754934395",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130926",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130926",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130926",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "405683884",
       "creationTimestamp": "2013-10-28T13:52:08.233-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T12:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.2 (wheezy) built on 2013-10-14",
       "id": "1405559880052641502",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20131014",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+      "sourceType": "RAW",
+      "status": "READY"
+    },
+    {
+      "archiveSizeBytes": "341857472",
+      "creationTimestamp": "2013-11-25T15:17:00.436-08:00",
+      "description": "Debian GNU/Linux 7.2 (wheezy) built on 2013-11-20",
+      "id": "05708985343919147751",
+      "kind": "compute#image",
+      "name": "debian-7-wheezy-v20131120",
+      "rawDisk": {
+        "containerType": "TAR",
+        "source": ""
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
       "sourceType": "RAW",
       "status": "READY"
     }
   ],
   "kind": "compute#imageList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions.json b/libcloud/test/compute/fixtures/gce/regions.json
index d5e98c5..f6d12c0 100644
--- a/libcloud/test/compute/fixtures/gce/regions.json
+++ b/libcloud/test/compute/fixtures/gce/regions.json
@@ -29,11 +29,11 @@
           "usage": 0.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b"
       ]
     },
     {
@@ -64,11 +64,11 @@
           "usage": 4.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
       ]
     },
     {
@@ -99,13 +99,13 @@
           "usage": 0.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central2",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
       ]
     }
   ],
   "kind": "compute#regionList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
index 11539c4..65c5bd6 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
@@ -8,8 +8,8 @@
       "id": "17634862894218443422",
       "kind": "compute#address",
       "name": "libcloud-demo-address",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
       "status": "RESERVED"
     },
     {
@@ -19,11 +19,11 @@
       "id": "11879548153827627972",
       "kind": "compute#address",
       "name": "testaddress",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/testaddress",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/testaddress",
       "status": "RESERVED"
     }
   ],
   "kind": "compute#addressList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
index fe72fdc..6579a2d 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
@@ -5,7 +5,7 @@
   "id": "01531551729918243104",
   "kind": "compute#address",
   "name": "lcaddress",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "status": "RESERVED"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
index 7aef2a9..90fec9e 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_lcaddress_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
   "startTime": "2013-06-26T12:21:44.110-07:00",
   "status": "PENDING",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
index bc00fb5..3bcbf1e 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_addresses_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
   "startTime": "2013-06-26T12:21:40.358-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
index 0fe7a08..2eedb8a 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
@@ -9,9 +9,9 @@
       "kind": "compute#forwardingRule",
       "name": "lcforwardingrule",
       "portRange": "8000-8500",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
-      "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+      "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     },
     {
       "IPAddress": "173.255.119.185",
@@ -21,11 +21,11 @@
       "kind": "compute#forwardingRule",
       "name": "libcloud-lb-demo-lb",
       "portRange": "80-80",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
-      "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+      "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     }
   ],
   "kind": "compute#forwardingRuleList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
index d29a715..6301a55 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
@@ -6,7 +6,7 @@
   "kind": "compute#forwardingRule",
   "name": "lcforwardingrule",
   "portRange": "8000-8500",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
-  "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
index 807c24a..b12f003 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "startTime": "2013-09-03T00:17:36.168-07:00",
   "status": "PENDING",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
index 970328d..7925845 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
@@ -6,7 +6,7 @@
   "kind": "compute#forwardingRule",
   "name": "libcloud-lb-demo-lb",
   "portRange": "80-80",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
-  "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+  "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
index 6194247..c65f283 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_forwardingRules_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
   "startTime": "2013-09-03T00:17:25.434-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
index 0f25323..72584ec 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
@@ -4,35 +4,35 @@
     {
       "creationTimestamp": "2013-09-03T00:51:05.300-07:00",
       "healthChecks": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+        "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
       ],
       "id": "13598380121688918358",
       "instances": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
       ],
       "kind": "compute#targetPool",
       "name": "lctargetpool",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
     },
     {
       "creationTimestamp": "2013-09-02T22:25:45.817-07:00",
       "healthChecks": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+        "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
       ],
       "id": "16862638289615591831",
       "instances": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
       ],
       "kind": "compute#targetPool",
       "name": "libcloud-lb-demo-lb-tp",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     }
   ],
   "kind": "compute#targetPoolList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
index 6349186..1875ed1 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
@@ -1,15 +1,15 @@
 {
   "creationTimestamp": "2013-09-03T00:51:05.300-07:00",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
   ],
   "id": "13598380121688918358",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
   ],
   "kind": "compute#targetPool",
   "name": "lctargetpool",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
index 5c783ea..9db7b24 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "operationType": "addHealthCheck",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "startTime": "2013-09-03T01:28:40.838-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
index a2fa532..7f61c1d 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "operationType": "addInstance",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "startTime": "2013-09-03T01:29:03.145-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
index 039ad00..276a465 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
   "startTime": "2013-09-03T00:51:06.840-07:00",
   "status": "PENDING",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
index 98e772e..eebae15 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "operationType": "removeHealthCheck",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "startTime": "2013-09-03T01:28:32.942-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
index 698018d..fc0c69f 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "operationType": "removeInstance",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "startTime": "2013-09-03T01:28:53.109-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
index ddcab9b..44a7af5 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
@@ -1,16 +1,16 @@
 {
   "creationTimestamp": "2013-09-02T22:25:45.817-07:00",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
   ],
   "id": "16862638289615591831",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
   ],
   "kind": "compute#targetPool",
   "name": "libcloud-lb-demo-lb-tp",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
index 5d1185c..6437bc7 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_targetPools_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
   "startTime": "2013-09-03T00:51:05.115-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
index 69e17d4..d41068f 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
@@ -2,16 +2,16 @@
   "creationTimestamp": "2013-08-19T14:43:25.289-07:00",
   "description": "",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check"
   ],
   "id": "09965129111508633746",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www1",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www2",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www3"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www1",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www2",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www3"
   ],
   "kind": "compute#targetPool",
   "name": "www-pool",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/www-pool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/www-pool"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones.json b/libcloud/test/compute/fixtures/gce/zones.json
index 05b0b25..0d564e7 100644
--- a/libcloud/test/compute/fixtures/gce/zones.json
+++ b/libcloud/test/compute/fixtures/gce/zones.json
@@ -15,8 +15,8 @@
         }
       ],
       "name": "europe-west1-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a",
       "status": "UP"
     },
     {
@@ -33,8 +33,8 @@
         }
       ],
       "name": "europe-west1-b",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b",
       "status": "UP"
     },
     {
@@ -43,8 +43,8 @@
       "id": "13462829244527433283",
       "kind": "compute#zone",
       "name": "us-central1-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
       "status": "UP"
     },
     {
@@ -52,24 +52,15 @@
       "description": "us-central1-b",
       "id": "1045862591201432620",
       "kind": "compute#zone",
-      "maintenanceWindows": [
-        {
-          "beginTime": "2013-11-02T12:00:00.000-07:00",
-          "description": "maintenance zone",
-          "endTime": "2013-11-10T12:00:00.000-08:00",
-          "name": "2013-11-02-planned-outage"
-        }
-      ],
       "name": "us-central1-b",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b",
       "status": "UP"
     },
     {
       "creationTimestamp": "2013-02-05T16:19:23.257-08:00",
       "deprecated": {
-        "deprecated": "2013-10-24T10:46:00-00:00",
-        "replacement": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b",
         "state": "DEPRECATED"
       },
       "description": "us-central2-a",
@@ -84,11 +75,11 @@
         }
       ],
       "name": "us-central2-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a",
       "status": "UP"
     }
   ],
   "kind": "compute#zoneList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones"
-}
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
index d6174cf..1dd88d6 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
@@ -3,20 +3,21 @@
   "items": [
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:46:02.933-07:00",
+      "creationTimestamp": "2013-12-13T10:43:58.782-08:00",
       "disks": [
         {
+          "boot": true,
+          "deviceName": "libcloud-demo-europe-multiple-nodes-000",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "type": "SCRATCH"
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
+          "type": "PERSISTENT"
         }
       ],
-      "id": "04184465693678804555",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "10947706194464948790",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -28,16 +29,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.211.48",
+              "natIP": "192.158.28.252",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.141.92"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.122.85"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "W7t6ZyTyIrc=",
@@ -45,32 +50,33 @@
           "libcloud"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     },
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:44:57.127-07:00",
+      "creationTimestamp": "2013-12-13T10:43:12.706-08:00",
       "disks": [
         {
+          "boot": true,
+          "deviceName": "libcloud-demo-europe-np-node",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "type": "SCRATCH"
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+          "type": "PERSISTENT"
         },
         {
           "deviceName": "libcloud-demo-europe-attach-disk",
           "index": 1,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
           "type": "PERSISTENT"
         }
       ],
-      "id": "4450078356274958103",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "3421745795082776097",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -82,16 +88,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.208.52",
+              "natIP": "23.251.128.10",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.48.164"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.221.125"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "W7t6ZyTyIrc=",
@@ -99,11 +109,11 @@
           "libcloud"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     },
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:45:44.186-07:00",
+      "creationTimestamp": "2013-12-13T10:43:37.267-08:00",
       "disks": [
         {
           "boot": true,
@@ -111,14 +121,13 @@
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
           "type": "PERSISTENT"
         }
       ],
-      "id": "8051468456709756069",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "517678477070693411",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -130,16 +139,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.211.23",
+              "natIP": "23.251.128.32",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.188.108"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.240.204"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "EbZdwVRtKyg=",
@@ -148,9 +161,9 @@
           "newtag"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     }
   ],
   "kind": "compute#instanceList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
index f507829..710517c 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_europe-west1-a_instances_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
   "startTime": "2013-06-26T20:57:34.453-07:00",
   "status": "PENDING",
   "targetId": "14308265828754333159",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
index b598068..e4e8fcf 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
@@ -9,6 +9,6 @@
   "maximumPersistentDisksSizeGb": "10240",
   "memoryMb": 3840,
   "name": "n1-standard-1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
   "zone": "europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
index 9812bd8..c917966 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
@@ -4,7 +4,7 @@
   "id": "13462829244527433283",
   "kind": "compute#zone",
   "name": "us-central1-a",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
   "status": "UP"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
index ef0e4af..68d40fc 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
@@ -2,36 +2,29 @@
   "id": "projects/project_name/zones/us-central1-a/disks",
   "items": [
     {
-      "creationTimestamp": "2013-06-26T10:06:04.007-07:00",
-      "id": "16109451798967042451",
+      "creationTimestamp": "2013-12-13T10:45:42.139-08:00",
+      "id": "08045379695757218000",
       "kind": "compute#disk",
       "name": "lcdisk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
       "sizeGb": "1",
       "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     },
     {
-      "creationTimestamp": "2013-06-26T09:47:09.178-07:00",
-      "id": "10880026303683859871",
+      "creationTimestamp": "2013-12-13T10:45:20.308-08:00",
+      "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+      "id": "0265567475385851075",
       "kind": "compute#disk",
-      "name": "libcloud-demo-boot-disk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/libcloud-demo-boot-disk",
+      "name": "node-name",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
       "sizeGb": "10",
+      "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+      "sourceImageId": "17312518942796567788",
       "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "creationTimestamp": "2013-06-25T10:57:34.305-07:00",
-      "id": "14383387450728762434",
-      "kind": "compute#disk",
-      "name": "test-disk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/test-disk",
-      "sizeGb": "10",
-      "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     }
   ],
   "kind": "compute#diskList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
index ae28c7f..d88ba6e 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
@@ -3,8 +3,8 @@
   "id": "16109451798967042451",
   "kind": "compute#disk",
   "name": "lcdisk",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "sizeGb": "1",
   "status": "READY",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
index 19efa6a..84d222a 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_disks_lcdisk_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
   "startTime": "2013-06-26T10:06:12.006-07:00",
   "status": "PENDING",
   "targetId": "16109451798967042451",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
index 370a3fb..ed69408 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
@@ -5,10 +5,10 @@
   "name": "operation-zones_us-central1-a_disks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
   "startTime": "2013-06-26T16:48:17.479-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file


[22/44] git commit: Fixes for dealing with disk on multiple node creation/destruction.

Posted by to...@apache.org.
Fixes for dealing with disk on multiple node creation/destruction.


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

Branch: refs/heads/trunk
Commit: 6e3c1054e6965d2c51bd36d032275d401ebc90da
Parents: 65f8c2d
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 12:29:34 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 demos/gce_lb_demo.py            |   3 +-
 libcloud/compute/drivers/gce.py | 104 +++++++++++++++++++++++++++--------
 2 files changed, 83 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6e3c1054/demos/gce_lb_demo.py
----------------------------------------------------------------------
diff --git a/demos/gce_lb_demo.py b/demos/gce_lb_demo.py
index 3c2cdac..e977ac7 100755
--- a/demos/gce_lb_demo.py
+++ b/demos/gce_lb_demo.py
@@ -202,7 +202,8 @@ def main():
                            'value': startup_script}]}
     lb_nodes = gce.ex_create_multiple_nodes(base_name, size, image,
                                             number, ex_tags=[tag],
-                                            ex_metadata=metadata)
+                                            ex_metadata=metadata,
+                                            ignore_errors=False)
     display('Created Nodes', lb_nodes)
 
     # == Create a Firewall for instances ==

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6e3c1054/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index fef1b98..421c0ca 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1488,9 +1488,17 @@ class GCENodeDriver(NodeDriver):
             else:
                 disk_req, disk_data, disk_params = self._create_vol_req(
                     None, name, location=location, image=image)
-                disk_res = self.connection.request(disk_req, method='POST',
-                                                   data=disk_data,
-                                                   params=disk_params).object
+                try:
+                    disk_res = self.connection.request(
+                        disk_req, method='POST', data=disk_data,
+                        params=disk_params).object
+                except:
+                     e = self._catch_error(ignore_errors=ignore_errors)
+                     error = e.value
+                     code = e.code
+                     disk_res = None
+                     status['disk'] = GCEFailedDisk(status['name'],
+                                                    error, code)
                 status['disk_response'] = disk_res
 
             status_list.append(status)
@@ -1528,11 +1536,22 @@ class GCENodeDriver(NodeDriver):
                 # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
+                        if hasattr(status['disk'], 'error'):
+                            status['node'] = status['disk']
+                            continue
                         request, node_data = self._create_node_req(
                             status['name'], size, image, location, ex_network,
                             ex_tags, ex_metadata, boot_disk=status['disk'])
-                        node_res = self.connection.request(
-                            request, method='POST', data=node_data).object
+                        try:
+                            node_res = self.connection.request(
+                                request, method='POST', data=node_data).object
+                        except:
+                            e = self._catch_error(ignore_errors=ignore_errors)
+                            error = e.value
+                            code = e.code
+                            node_res = None
+                            status['node'] = GCEFailedNode(status['name'],
+                                                           error, code)
                         status['node_response'] = node_res
                     else:
                         error = None
@@ -2191,8 +2210,7 @@ class GCENodeDriver(NodeDriver):
                   that the node was successfully destroyed.
         :rtype:   ``list`` of ``bool``
         """
-        responses = []
-        success = [False] * len(nodelist)
+        status_list = []
         complete = False
         start_time = time.time()
         for node in nodelist:
@@ -2204,29 +2222,69 @@ class GCENodeDriver(NodeDriver):
             except:
                 self._catch_error(ignore_errors=ignore_errors)
                 response = None
-            responses.append(response)
+
+            status = {'node': node,
+                      'node_success': False,
+                      'node_response': response,
+                      'disk_success': not destroy_boot_disk,
+                      'disk_response': None}
+
+            status_list.append(status)
 
         while not complete:
             if (time.time() - start_time >= timeout):
                 raise Exception("Timeout (%s sec) while waiting to delete "
                                 "multiple instances")
             complete = True
-            for i, operation in enumerate(responses):
-                if operation is None:
-                    continue
-                no_errors = True
-                try:
-                    response = self.connection.request(
-                        operation['selfLink']).object
-                except:
-                    self._catch_error(ignore_errors=ignore_errors)
-                    no_errors = False
-                if response['status'] == 'DONE':
-                    responses[i] = None
-                    success[i] = no_errors
-                else:
-                    complete = False
+            for status in status_list:
+                # If one of the operations is running, check the status
+                operation = status['node_response'] or status['disk_response']
+                delete_disk = False
+                if operation:
+                    no_errors = True
+                    try:
+                        response = self.connection.request(
+                            operation['selfLink']).object
+                    except:
+                        self._catch_error(ignore_errors=ignore_errors)
+                        no_errors = False
+                        response = {'status': 'DONE'}
+                    if response['status'] == 'DONE':
+                        # If a node was deleted, update status and indicate
+                        # that the disk is ready to be deleted.
+                        if status['node_response']:
+                            status['node_response'] = None
+                            status['node_success'] = no_errors
+                            delete_disk = True
+                        else:
+                            status['disk_response'] = None
+                            status['disk_success'] = no_errors
+                # If we are destroying disks, and the node has been deleted,
+                # destroy the disk.
+                if delete_disk and destroy_boot_disk:
+                    boot_disk = status['node'].extra['boot_disk']
+                    if boot_disk:
+                        request = '/zones/%s/disks/%s' % (
+                            boot_disk.extra['zone'].name, boot_disk.name)
+                        try:
+                            response = self.connection.request(
+                                request, method='DELETE').object
+                        except:
+                            self._catch_error(ignore_errors=ignore_errors)
+                            no_errors = False
+                            response = None
+                        status['disk_response'] = response
+                    else:  # If there is no boot disk, ignore
+                        status['disk_success'] = True
+                operation = status['node_response'] or status['disk_response']
+                if operation:
                     time.sleep(2)
+                    complete = False
+
+        success = []
+        for status in status_list:
+            s = status['node_success'] and status['disk_success']
+            success.append(s)
         return success
 
     def ex_destroy_targetpool(self, targetpool):


[03/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
index b8a3555..9fccb06 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
@@ -3,230 +3,53 @@
   "items": [
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:00:12.021-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "1845312225624811608",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "node-name",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "173.255.115.146",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.113.94"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "42WmSpB8rSM="
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:19.247-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "8573880455005118258",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-multiple-nodes-000",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.81.107",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.224.165"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-multiple-nodes-000",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:19.662-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "17221721898919682654",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-multiple-nodes-001",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.81.166",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.223.109"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-multiple-nodes-001",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:10:09.700-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "03138438763739542377",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-np-node",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.80.244",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.147.18"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-np-node",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:02.386-07:00",
+      "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
       "disks": [
         {
           "boot": true,
-          "deviceName": "libcloud-demo-boot-disk",
+          "deviceName": "persistent-disk-0",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/libcloud-demo-boot-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
           "type": "PERSISTENT"
         }
       ],
-      "id": "2378270030714524465",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "id": "4006034190819017667",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
       },
-      "name": "libcloud-demo-persist-node",
+      "name": "node-name",
       "networkInterfaces": [
         {
           "accessConfigs": [
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "108.59.81.66",
+              "natIP": "23.236.58.15",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.192.190"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.72.75"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-persist-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
       "status": "RUNNING",
       "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
+        "fingerprint": "42WmSpB8rSM="
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     }
   ],
   "kind": "compute#instanceList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances"
-}
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
index eaefc2a..43661c2 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T16:12:30.443-07:00",
+  "creationTimestamp": "2013-12-13T10:54:07.687-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "lcnode-000",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-000",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "5390075309006132922",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "17170905942674172532",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "108.59.81.107",
+          "natIP": "173.255.114.35",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.106.153"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.160.66"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
index e1e5072..ffbf152 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-000_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
   "startTime": "2013-06-26T16:13:12.948-07:00",
   "status": "PENDING",
   "targetId": "5390075309006132922",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
index b4a670d..7cd6be9 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T16:12:51.782-07:00",
+  "creationTimestamp": "2013-12-13T10:54:08.639-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "lcnode-001",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-001",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "16630486471904253898",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "09356229693786319079",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "108.59.81.166",
+          "natIP": "173.255.117.19",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.96.232"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.168.208"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
index f52765d..fa887ce 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-001_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
   "startTime": "2013-06-26T16:13:40.620-07:00",
   "status": "PENDING",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
index 7845777..439e00b 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T15:00:12.021-07:00",
+  "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "persistent-disk-0",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "1845312225624811608",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "4006034190819017667",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.115.146",
+          "natIP": "23.236.58.15",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.113.94"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.72.75"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
index e9e4964..e6167b5 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "operationType": "attachDisk",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "startTime": "2013-06-26T16:48:27.762-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
index 0df1b9a..e74dbba 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
   "startTime": "2013-06-26T10:05:40.405-07:00",
   "status": "PENDING",
   "targetId": "07410051435384876224",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
index 36ded09..d8d2e63 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "operationType": "detachDisk",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "startTime": "2013-06-26T16:48:35.398-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
index d095030..240a255 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_reset_post",
   "operationType": "reset",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
   "startTime": "2013-06-26T15:03:02.813-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
index 87e67ec..2dfdcd4 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_setTags_post",
   "operationType": "setTags",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
   "startTime": "2013-06-26T21:20:04.103-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
index d6b8ad7..77c95e8 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
@@ -5,10 +5,10 @@
   "name": "operation-zones_us-central1-a_instances_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
   "startTime": "2013-06-26T16:12:51.537-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
index b4e795b..7cbae6f 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
@@ -12,7 +12,7 @@
       "maximumPersistentDisksSizeGb": "3072",
       "memoryMb": 614,
       "name": "f1-micro",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
       "zone": "us-central1-a"
     },
     {
@@ -26,7 +26,7 @@
       "maximumPersistentDisksSizeGb": "3072",
       "memoryMb": 1740,
       "name": "g1-small",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
       "zone": "us-central1-a"
     },
     {
@@ -40,11 +40,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 1843,
       "name": "n1-highcpu-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "15178384466070744001",
@@ -59,7 +64,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -73,11 +78,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 3686,
       "name": "n1-highcpu-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "01151097524490134507",
@@ -92,7 +102,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -106,11 +116,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 7373,
       "name": "n1-highcpu-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "02507333096579477005",
@@ -128,7 +143,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
       "zone": "us-central1-a"
     },
     {
@@ -142,11 +157,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 13312,
       "name": "n1-highmem-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "00770157291441082211",
@@ -161,7 +181,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -175,11 +195,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 26624,
       "name": "n1-highmem-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "05095504563332567951",
@@ -194,7 +219,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -208,11 +233,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 53248,
       "name": "n1-highmem-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "07181827135536388552",
@@ -230,7 +260,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
       "zone": "us-central1-a"
     },
     {
@@ -244,11 +274,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 3840,
       "name": "n1-standard-1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+        "state": "DEPRECATED"
+      },
       "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
       "guestCpus": 1,
       "id": "10583029372018866711",
@@ -263,7 +298,7 @@
           "diskGb": 420
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
       "zone": "us-central1-a"
     },
     {
@@ -277,11 +312,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 7680,
       "name": "n1-standard-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "06313284160910191442",
@@ -296,7 +336,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -310,11 +350,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 15360,
       "name": "n1-standard-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "00523085164784013586",
@@ -329,7 +374,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -343,11 +388,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 30720,
       "name": "n1-standard-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:51:19.936-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUs, 30 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "00035824420671580077",
@@ -365,10 +415,10 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8-d",
       "zone": "us-central1-a"
     }
   ],
   "kind": "compute#machineTypeList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
index 961aa26..d1b3d74 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
@@ -9,6 +9,6 @@
   "maximumPersistentDisksSizeGb": "10240",
   "memoryMb": 3840,
   "name": "n1-standard-1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "zone": "us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
index ad229a5..858b0de 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
@@ -1,21 +1,22 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-09-02T22:25:15.878-07:00",
+  "creationTimestamp": "2013-12-13T10:51:24.339-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "libcloud-lb-demo-www-000",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/libcloud-lb-demo-www-000",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "16051209904934263688",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
-  "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+  "id": "08447900841145802741",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
   "metadata": {
-    "fingerprint": "n9EGknQZPSA=",
+    "fingerprint": "IZjMMp0A_8k=",
     "items": [
       {
         "key": "startup-script",
@@ -31,16 +32,20 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.113.234",
+          "natIP": "23.236.58.15",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.138.154"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.104.11"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "XI0he92M8l8=",
@@ -48,5 +53,5 @@
       "libcloud-lb-demo-www"
     ]
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
index 3cc0dae..df6b0c6 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
@@ -1,21 +1,22 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-09-02T22:25:16.253-07:00",
+  "creationTimestamp": "2013-12-13T10:51:25.165-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "libcloud-lb-demo-www-001",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/libcloud-lb-demo-www-001",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "11204787063927654129",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
-  "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+  "id": "11523404878553997348",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
   "metadata": {
-    "fingerprint": "n9EGknQZPSA=",
+    "fingerprint": "09vSzO6KXcw=",
     "items": [
       {
         "key": "startup-script",
@@ -31,16 +32,20 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.114.210",
+          "natIP": "23.236.58.59",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.0.123"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.94.107"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "XI0he92M8l8=",
@@ -48,5 +53,5 @@
       "libcloud-lb-demo-www"
     ]
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 52c462a..3462f64 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -96,7 +96,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
     def test_match_images(self):
         project = 'debian-cloud'
         image = self.driver._match_images(project, 'debian-7')
-        self.assertEqual(image.name, 'debian-7-wheezy-v20131014')
+        self.assertEqual(image.name, 'debian-7-wheezy-v20131120')
         image = self.driver._match_images(project, 'debian-6')
         self.assertEqual(image.name, 'debian-6-squeeze-v20130926')
 
@@ -113,7 +113,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
 
     def test_ex_list_healthchecks(self):
         healthchecks = self.driver.ex_list_healthchecks()
-        self.assertEqual(len(healthchecks), 2)
+        self.assertEqual(len(healthchecks), 3)
         self.assertEqual(healthchecks[0].name, 'basic-check')
 
     def test_ex_list_firewalls(self):
@@ -137,7 +137,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         local_images = self.driver.list_images()
         debian_images = self.driver.list_images(ex_project='debian-cloud')
         self.assertEqual(len(local_images), 2)
-        self.assertEqual(len(debian_images), 17)
+        self.assertEqual(len(debian_images), 19)
         self.assertEqual(local_images[0].name, 'debian-7-wheezy-v20130617')
         self.assertEqual(local_images[1].name, 'centos-6-v20131118')
 
@@ -155,9 +155,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         nodes = self.driver.list_nodes()
         nodes_all = self.driver.list_nodes(ex_zone='all')
         nodes_uc1a = self.driver.list_nodes(ex_zone='us-central1-a')
-        self.assertEqual(len(nodes), 5)
+        self.assertEqual(len(nodes), 1)
         self.assertEqual(len(nodes_all), 8)
-        self.assertEqual(len(nodes_uc1a), 5)
+        self.assertEqual(len(nodes_uc1a), 1)
         self.assertEqual(nodes[0].name, 'node-name')
         self.assertEqual(nodes_uc1a[0].name, 'node-name')
         names = [n.name for n in nodes_all]
@@ -194,9 +194,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         volumes = self.driver.list_volumes()
         volumes_all = self.driver.list_volumes('all')
         volumes_uc1a = self.driver.list_volumes('us-central1-a')
-        self.assertEqual(len(volumes), 3)
-        self.assertEqual(len(volumes_all), 5)
-        self.assertEqual(len(volumes_uc1a), 3)
+        self.assertEqual(len(volumes), 2)
+        self.assertEqual(len(volumes_all), 10)
+        self.assertEqual(len(volumes_uc1a), 2)
         self.assertEqual(volumes[0].name, 'lcdisk')
         self.assertEqual(volumes_uc1a[0].name, 'lcdisk')
         names = [v.name for v in volumes_all]
@@ -544,12 +544,10 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
 
     def test_ex_get_zone(self):
         zone_name = 'us-central1-b'
-        expected_time_until = datetime.timedelta(days=129)
-        expected_duration = datetime.timedelta(days=8, hours=1)
         zone = self.driver.ex_get_zone(zone_name)
         self.assertEqual(zone.name, zone_name)
-        self.assertEqual(zone.time_until_mw, expected_time_until)
-        self.assertEqual(zone.next_mw_duration, expected_duration)
+        self.assertFalse(zone.time_until_mw)
+        self.assertFalse(zone.next_mw_duration)
 
         zone_no_mw = self.driver.ex_get_zone('us-central1-a')
         self.assertEqual(zone_no_mw.time_until_mw, None)
@@ -972,6 +970,77 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('zones_us-central1-a_disks_lcdisk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_disks_node_name(self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_a_disks_lcnode_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_a_disks_lcnode_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_002(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_boot_disk(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_np_node(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks(self, method, url, body, headers):
+        if method == 'POST':
+            body = self.fixtures.load('zones_us-central1-a_disks_post.json')
+        else:
+            body = self.fixtures.load('zones_us-central1-a_disks.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_np_node(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_boot_disk(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_multiple_nodes_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_europe_west1_a_instances(self, method, url, body, headers):
         if method == 'POST':
             body = self.fixtures.load(

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/loadbalancer/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_gce.py b/libcloud/test/loadbalancer/test_gce.py
index 55e29cc..9b55a2a 100644
--- a/libcloud/test/loadbalancer/test_gce.py
+++ b/libcloud/test/loadbalancer/test_gce.py
@@ -50,7 +50,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
         self.driver = GCELBDriver(*GCE_PARAMS, **kwargs)
 
     def test_get_node_from_ip(self):
-        ip = '8.35.197.91'
+        ip = '23.236.58.15'
         expected_name = 'node-name'
         node = self.driver._get_node_from_ip(ip)
         self.assertEqual(node.name, expected_name)
@@ -139,7 +139,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
         members = balancer.list_members()
         self.assertEqual(len(members), 2)
         member_ips = [m.ip for m in members]
-        self.assertTrue('173.255.113.234' in member_ips)
+        self.assertTrue('23.236.58.15' in member_ips)
 
     def test_ex_create_healthcheck(self):
         healthcheck_name = 'lchealthcheck'
@@ -158,7 +158,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
 
     def test_ex_list_healthchecks(self):
         healthchecks = self.driver.ex_list_healthchecks()
-        self.assertEqual(len(healthchecks), 2)
+        self.assertEqual(len(healthchecks), 3)
         self.assertEqual(healthchecks[0].name, 'basic-check')
 
     def test_ex_balancer_detach_attach_healthcheck(self):


[02/44] git commit: Add functionality to create_node & create_volume to use existing disks of the same name. Also some pep8 fixes.

Posted by to...@apache.org.
Add functionality to create_node & create_volume to use existing
disks of the same name.
Also some pep8 fixes.


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

Branch: refs/heads/trunk
Commit: 0d477589953643dd87084eb1af7c53701f30667e
Parents: 07f6b94
Author: Rick Wright <ri...@google.com>
Authored: Wed Dec 4 17:12:15 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Wed Dec 4 17:12:15 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 99 ++++++++++++++++++++++++------------
 1 file changed, 66 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0d477589/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 0c4c046..852b944 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1310,7 +1310,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None):
+                    ex_boot_disk=None, use_existing_disk=False):
         """
         Create a new node and return a node object for the node.
 
@@ -1340,6 +1340,11 @@ class GCENodeDriver(NodeDriver):
         :keyword  ex_boot_disk: The boot disk to attach to the instance.
         :type     ex_boot_disk: :class:`StorageVolume` or ``str``
 
+        :keyword  use_existing_disk: If True and if an existing disk with the
+                                     same name/location is found, use that
+                                     disk instead of creating a new one.
+        :type     use_existing_disk: ``bool``
+
         :return:  A Node object for the new node.
         :rtype:   :class:`Node`
         """
@@ -1355,7 +1360,8 @@ class GCENodeDriver(NodeDriver):
 
         if not ex_boot_disk:
             ex_boot_disk = self.create_volume(None, name, location=location,
-                                              image=image)
+                                              image=image,
+                                              use_existing=use_existing_disk)
 
         request, node_data = self._create_node_req(name, size, image,
                                                    location, ex_network,
@@ -1365,11 +1371,10 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
-
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True,
+                                 ignore_errors=True, use_existing_disk=False,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1410,6 +1415,11 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails.
         :type     ignore_errors: ``bool``
 
+        :keyword  use_existing_disk: If True and if an existing disk with the
+                                     same name/location is found, use that
+                                     disk instead of creating a new one.
+        :type     use_existing_disk: ``bool``
+
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
         :type     timeout: ``int``
@@ -1429,22 +1439,36 @@ class GCENodeDriver(NodeDriver):
             image = self.ex_get_image(image)
 
         # List for holding the status information for disk/node creation.
-        status_list = [None] * number
+        status_list = []
 
         for i in range(number):
             name = '%s-%03d' % (base_name, i)
 
+            status = {'name': name,
+                      'node_response': None,
+                      'node': None,
+                      'disk_response': None,
+                      'disk': None}
+
             # Create disks for nodes
-            disk_req, disk_data, disk_params = self._create_vol_req(
-                None, name, location=location, image=image)
-            disk_res = self.connection.request(disk_req, method='POST',
-                                               data=disk_data,
-                                               params=disk_params).object
-            status_list[i] = {'name': name,
-                              'node_response': None,
-                              'node': None,
-                              'disk_response': disk_res,
-                              'disk': None}
+            disk = None
+            if use_existing_disk:
+                try:
+                    disk = self.ex_get_volume(name, location)
+                except:
+                    pass
+
+            if disk:
+                status['disk'] = disk
+            else:
+                disk_req, disk_data, disk_params = self._create_vol_req(
+                    None, name, location=location, image=image)
+                disk_res = self.connection.request(disk_req, method='POST',
+                                                   data=disk_data,
+                                                   params=disk_params).object
+                status['disk_response'] = disk_res
+
+            status_list.append(status)
 
         start_time = time.time()
         complete = False
@@ -1471,22 +1495,18 @@ class GCENodeDriver(NodeDriver):
                             status['disk'] = GCEFailedDisk(status['name'],
                                                            error, code)
                         else:
-                            status['disk'] = self.ex_get_volume(status['name'], location)
+                            status['disk'] = self.ex_get_volume(status['name'],
+                                                                location)
 
-                # If disk exists, but node does not, create the node or check on
-                # its status if already in progress.
+                # If disk exists, but node does not, create the node or check
+                # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
-                        request, node_data = self._create_node_req(status['name'], size,
-                                                                   image,
-                                                                   location,
-                                                                   ex_network,
-                                                                   ex_tags,
-                                                                   ex_metadata,
-                                                                   boot_disk=status['disk'])
-                        node_res = self.connection.request(request,
-                                                           method='POST',
-                                                           data=node_data).object
+                        request, node_data = self._create_node_req(
+                            status['name'], size, image, location, ex_network,
+                            ex_tags, ex_metadata, boot_disk=status['disk'])
+                        node_res = self.connection.request(
+                            request, method='POST', data=node_data).object
                         status['node_response'] = node_res
                     else:
                         error = None
@@ -1503,7 +1523,8 @@ class GCENodeDriver(NodeDriver):
                             status['node'] = GCEFailedNode(status['name'],
                                                            error, code)
                         else:
-                            status['node'] = self.ex_get_node(status['name'], location)
+                            status['node'] = self.ex_get_node(status['name'],
+                                                              location)
 
                 # If any of the nodes have not been created (or failed) we are
                 # not done yet.
@@ -1589,8 +1610,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
-        :return:  Tuple containg the request string, the data dictionary and the
-                  URL parameters
+        :return:  Tuple containg the request string, the data dictionary and
+                  the URL parameters
         :rtype:   ``tuple``
         """
         volume_data = {}
@@ -1614,9 +1635,8 @@ class GCENodeDriver(NodeDriver):
 
         return request, volume_data, params
 
-
     def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None):
+                      snapshot=None, use_existing=False):
         """
         Create a volume (disk).
 
@@ -1637,9 +1657,22 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
+        :keyword  use_existing: If True and a disk with the given name already
+                                exists, return an object for that disk instead
+                                of attempting to create a new disk.
+        :type     use_existing: ``bool``
+
         :return:  Storage Volume object
         :rtype:   :class:`StorageVolume`
         """
+        vol = None
+        if use_existing:
+            try:
+                vol = self.ex_get_volume(name, location)
+            except:
+                pass
+        if vol:
+            return vol
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
         self.connection.async_request(request, method='POST', data=volume_data,


[13/44] git commit: Initialize PyCrypto's RNG (We don't actually use the RNG, but this should prevent certain errors if libcloud is running in a fork of an application that has already imported the Crypto library.)

Posted by to...@apache.org.
Initialize PyCrypto's RNG
(We don't actually use the RNG, but this should prevent certain errors if
libcloud is running in a fork of an application that has already imported the
Crypto library.)


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

Branch: refs/heads/trunk
Commit: 0b9b7deb728f706405d412f2874350b10a5a4f6f
Parents: fc59dd8
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 15:52:19 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 15:52:19 2013 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0b9b7deb/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 549ba8b..da3b66d 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -82,6 +82,8 @@ try:
     from Crypto.Hash import SHA256
     from Crypto.PublicKey import RSA
     from Crypto.Signature import PKCS1_v1_5
+    import Crypto.Random
+    Crypto.Random.atfork()
 except ImportError:
     # The pycrypto library is unavailable
     SHA256 = None


[09/44] git commit: Fixes for dealing with disk on multiple node creation/destruction.

Posted by to...@apache.org.
Fixes for dealing with disk on multiple node creation/destruction.


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

Branch: refs/heads/trunk
Commit: a0aa455735ac8b2c1c4bb1a02dc8e7a96eba3920
Parents: ca96c9b
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 12:29:34 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 12:29:34 2013 -0800

----------------------------------------------------------------------
 demos/gce_lb_demo.py            |   3 +-
 libcloud/compute/drivers/gce.py | 104 +++++++++++++++++++++++++++--------
 2 files changed, 83 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a0aa4557/demos/gce_lb_demo.py
----------------------------------------------------------------------
diff --git a/demos/gce_lb_demo.py b/demos/gce_lb_demo.py
index 3c2cdac..e977ac7 100755
--- a/demos/gce_lb_demo.py
+++ b/demos/gce_lb_demo.py
@@ -202,7 +202,8 @@ def main():
                            'value': startup_script}]}
     lb_nodes = gce.ex_create_multiple_nodes(base_name, size, image,
                                             number, ex_tags=[tag],
-                                            ex_metadata=metadata)
+                                            ex_metadata=metadata,
+                                            ignore_errors=False)
     display('Created Nodes', lb_nodes)
 
     # == Create a Firewall for instances ==

http://git-wip-us.apache.org/repos/asf/libcloud/blob/a0aa4557/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index d8cdc09..d38b42b 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1488,9 +1488,17 @@ class GCENodeDriver(NodeDriver):
             else:
                 disk_req, disk_data, disk_params = self._create_vol_req(
                     None, name, location=location, image=image)
-                disk_res = self.connection.request(disk_req, method='POST',
-                                                   data=disk_data,
-                                                   params=disk_params).object
+                try:
+                    disk_res = self.connection.request(
+                        disk_req, method='POST', data=disk_data,
+                        params=disk_params).object
+                except:
+                     e = self._catch_error(ignore_errors=ignore_errors)
+                     error = e.value
+                     code = e.code
+                     disk_res = None
+                     status['disk'] = GCEFailedDisk(status['name'],
+                                                    error, code)
                 status['disk_response'] = disk_res
 
             status_list.append(status)
@@ -1528,11 +1536,22 @@ class GCENodeDriver(NodeDriver):
                 # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
+                        if hasattr(status['disk'], 'error'):
+                            status['node'] = status['disk']
+                            continue
                         request, node_data = self._create_node_req(
                             status['name'], size, image, location, ex_network,
                             ex_tags, ex_metadata, boot_disk=status['disk'])
-                        node_res = self.connection.request(
-                            request, method='POST', data=node_data).object
+                        try:
+                            node_res = self.connection.request(
+                                request, method='POST', data=node_data).object
+                        except:
+                            e = self._catch_error(ignore_errors=ignore_errors)
+                            error = e.value
+                            code = e.code
+                            node_res = None
+                            status['node'] = GCEFailedNode(status['name'],
+                                                           error, code)
                         status['node_response'] = node_res
                     else:
                         error = None
@@ -2191,8 +2210,7 @@ class GCENodeDriver(NodeDriver):
                   that the node was successfully destroyed.
         :rtype:   ``list`` of ``bool``
         """
-        responses = []
-        success = [False] * len(nodelist)
+        status_list = []
         complete = False
         start_time = time.time()
         for node in nodelist:
@@ -2204,29 +2222,69 @@ class GCENodeDriver(NodeDriver):
             except:
                 self._catch_error(ignore_errors=ignore_errors)
                 response = None
-            responses.append(response)
+
+            status = {'node': node,
+                      'node_success': False,
+                      'node_response': response,
+                      'disk_success': not destroy_boot_disk,
+                      'disk_response': None}
+
+            status_list.append(status)
 
         while not complete:
             if (time.time() - start_time >= timeout):
                 raise Exception("Timeout (%s sec) while waiting to delete "
                                 "multiple instances")
             complete = True
-            for i, operation in enumerate(responses):
-                if operation is None:
-                    continue
-                no_errors = True
-                try:
-                    response = self.connection.request(
-                        operation['selfLink']).object
-                except:
-                    self._catch_error(ignore_errors=ignore_errors)
-                    no_errors = False
-                if response['status'] == 'DONE':
-                    responses[i] = None
-                    success[i] = no_errors
-                else:
-                    complete = False
+            for status in status_list:
+                # If one of the operations is running, check the status
+                operation = status['node_response'] or status['disk_response']
+                delete_disk = False
+                if operation:
+                    no_errors = True
+                    try:
+                        response = self.connection.request(
+                            operation['selfLink']).object
+                    except:
+                        self._catch_error(ignore_errors=ignore_errors)
+                        no_errors = False
+                        response = {'status': 'DONE'}
+                    if response['status'] == 'DONE':
+                        # If a node was deleted, update status and indicate
+                        # that the disk is ready to be deleted.
+                        if status['node_response']:
+                            status['node_response'] = None
+                            status['node_success'] = no_errors
+                            delete_disk = True
+                        else:
+                            status['disk_response'] = None
+                            status['disk_success'] = no_errors
+                # If we are destroying disks, and the node has been deleted,
+                # destroy the disk.
+                if delete_disk and destroy_boot_disk:
+                    boot_disk = status['node'].extra['boot_disk']
+                    if boot_disk:
+                        request = '/zones/%s/disks/%s' % (
+                            boot_disk.extra['zone'].name, boot_disk.name)
+                        try:
+                            response = self.connection.request(
+                                request, method='DELETE').object
+                        except:
+                            self._catch_error(ignore_errors=ignore_errors)
+                            no_errors = False
+                            response = None
+                        status['disk_response'] = response
+                    else:  # If there is no boot disk, ignore
+                        status['disk_success'] = True
+                operation = status['node_response'] or status['disk_response']
+                if operation:
                     time.sleep(2)
+                    complete = False
+
+        success = []
+        for status in status_list:
+            s = status['node_success'] and status['disk_success']
+            success.append(s)
         return success
 
     def ex_destroy_targetpool(self, targetpool):


[08/44] git commit: Add Snapshots to demo code and a snapshot fix

Posted by to...@apache.org.
Add Snapshots to demo code and a snapshot fix


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

Branch: refs/heads/trunk
Commit: ca96c9b659772d9fb22cd15219dc460a4f284c93
Parents: 2d3caa8
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 10:30:49 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 10:30:49 2013 -0800

----------------------------------------------------------------------
 demos/gce_demo.py               | 34 ++++++++++++++++++++++++++--------
 libcloud/compute/drivers/gce.py | 13 ++++++-------
 2 files changed, 32 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ca96c9b6/demos/gce_demo.py
----------------------------------------------------------------------
diff --git a/demos/gce_demo.py b/demos/gce_demo.py
index b6f2cb4..5f45c68 100755
--- a/demos/gce_demo.py
+++ b/demos/gce_demo.py
@@ -180,14 +180,17 @@ def main():
     zones = gce.ex_list_zones()
     display('Zones', zones)
 
+    snapshots = gce.ex_list_snapshots()
+    display('Snapshots', snapshots)
+
     # == Clean up any old demo resources ==
     print('Cleaning up any "%s" resources:' % DEMO_BASE_NAME)
     clean_up(gce, DEMO_BASE_NAME, all_nodes,
-             all_addresses + all_volumes + firewalls + networks)
+             all_addresses + all_volumes + firewalls + networks + snapshots)
 
-    # == Create Node with non-persistent disk ==
+    # == Create Node with disk auto-created ==
     if MAX_NODES > 1:
-        print('Creating Node with non-persistent disk:')
+        print('Creating Node with auto-created disk:')
         name = '%s-np-node' % DEMO_BASE_NAME
         node_1 = gce.create_node(name, 'n1-standard-1', 'debian-7',
                                  ex_tags=['libcloud'])
@@ -205,17 +208,29 @@ def main():
             if gce.detach_volume(volume, ex_node=node_1):
                 print('   Detached %s from %s' % (volume.name, node_1.name))
 
-    # == Create Node with persistent disk ==
-    print('Creating Node with Persistent disk:')
+    # == Create Snapshot ==
+    print('Creating a snapshot from existing disk:')
+    # Create a disk to snapshot
+    vol_name = '%s-snap-template' % DEMO_BASE_NAME
+    image = gce.ex_get_image('debian-7')
+    vol = gce.create_volume(None, vol_name, image=image)
+    print('   Created disk %s to shapshot' % DEMO_BASE_NAME)
+    # Snapshot volume
+    snapshot = vol.snapshot('%s-snapshot' % DEMO_BASE_NAME)
+    print('   Snapshot %s created' % snapshot.name)
+
+    # == Create Node with existing disk ==
+    print('Creating Node with existing disk:')
     name = '%s-persist-node' % DEMO_BASE_NAME
     # Use objects this time instead of names
     # Get latest Debian 7 image
     image = gce.ex_get_image('debian-7')
     # Get Machine Size
     size = gce.ex_get_size('n1-standard-1')
-    # Create Disk.  Size is None to just take default of image
+    # Create Disk from Snapshot created above
     volume_name = '%s-boot-disk' % DEMO_BASE_NAME
-    volume = gce.create_volume(None, volume_name, image=image)
+    volume = gce.create_volume(None, volume_name, snapshot=snapshot)
+    print('   Created %s from snapshot' % volume.name)
     # Create Node with Disk
     node_2 = gce.create_node(name, size, image, ex_tags=['libcloud'],
                              ex_boot_disk=volume)
@@ -282,10 +297,13 @@ def main():
     networks = gce.ex_list_networks()
     display('Networks', networks)
 
+    snapshots = gce.ex_list_snapshots()
+    display('Snapshots', snapshots)
+
     if CLEANUP:
         print('Cleaning up %s resources created.' % DEMO_BASE_NAME)
         clean_up(gce, DEMO_BASE_NAME, nodes,
-                 addresses + volumes + firewalls + networks)
+                 addresses + volumes + firewalls + networks + snapshots)
 
 if __name__ == '__main__':
     main()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ca96c9b6/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index faa2905..d8cdc09 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1653,13 +1653,12 @@ class GCENodeDriver(NodeDriver):
             volume_data['description'] = 'Image: %s' % (
                 image.extra['selfLink'])
         if snapshot:
-            # Check for full URI to not break backward-compatibility
-            if snapshot.startswith('https'):
-                snapshot_link = snapshot
-            else:
-                if not hasattr(snapshot, 'name'):
-                    snapshot = self.ex_get_snapshot(snapshot)
-                snapshot_link = snapshot.extra['selfLink']
+            if not hasattr(snapshot, 'name'):
+                # Check for full URI to not break backward-compatibility
+                if snapshot.startswith('https'):
+                    snapshot = self._get_components_from_path(snapshot)['name']
+                snapshot = self.ex_get_snapshot(snapshot)
+            snapshot_link = snapshot.extra['selfLink']
             volume_data['sourceSnapshot'] = snapshot_link
             volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
         location = location or self.zone


[43/44] git commit: Merge branch 'LIBCLOUD-450_GCEv1' of https://github.com/wrigri/libcloud into LIBCLOUD-450_GCEv1

Posted by to...@apache.org.
Merge branch 'LIBCLOUD-450_GCEv1' of https://github.com/wrigri/libcloud into LIBCLOUD-450_GCEv1


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

Branch: refs/heads/trunk
Commit: f519acba43ae27e99e597af12889ef6cac4da94b
Parents: c321b37 ce2fc3c
Author: Rick Wright <ri...@google.com>
Authored: Thu Jan 2 23:31:11 2014 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:31:11 2014 -0800

----------------------------------------------------------------------

----------------------------------------------------------------------



[04/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json b/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
index e8c832a..32de60d 100644
--- a/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
+++ b/libcloud/test/compute/fixtures/gce/projects_debian-cloud_global_images.json
@@ -2,278 +2,378 @@
   "id": "projects/debian-cloud/global/images",
   "items": [
     {
+      "archiveSizeBytes": "365056004",
+      "creationTimestamp": "2013-12-02T17:49:01.206-08:00",
+      "description": "Debian GNU/Linux 7.2 (wheezy) with backports kernel built on 2013-11-27",
+      "id": "11823693270029497919",
+      "kind": "compute#image",
+      "name": "backports-debian-7-wheezy-v20131127",
+      "rawDisk": {
+        "containerType": "TAR",
+        "source": ""
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-v20131127",
+      "sourceType": "RAW",
+      "status": "READY"
+    },
+    {
       "archiveSizeBytes": "214107225",
       "creationTimestamp": "2013-05-07T17:09:22.111-07:00",
+      "deprecated": {
+        "deleted": "1970-01-03",
+        "deprecated": "1970-01-01",
+        "obsolete": "1970-01-02",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-07",
       "id": "647943287916432906",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130507",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130507",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "255972840",
       "creationTimestamp": "2013-05-09T12:56:21.720-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-12T21:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-09",
       "id": "15745758816845911589",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130509",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130509",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130509",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "219458106",
       "creationTimestamp": "2013-05-14T21:01:12.124-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-15",
       "id": "006866479348046290",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130515",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130515",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130515",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130515",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "265118282",
       "creationTimestamp": "2013-05-30T09:48:37.837-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-05-22",
       "id": "1266148899538866390",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130522",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130522",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130522",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130522",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "233984980",
       "creationTimestamp": "2013-06-19T13:45:44.111-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-06-17",
       "id": "04009358257173422091",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "258168500",
       "creationTimestamp": "2013-07-24T12:31:06.054-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-07-23",
       "id": "3115342424904648000",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130723",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130723",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130723",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "300710522",
       "creationTimestamp": "2013-09-04T13:21:53.292-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-08-16",
       "id": "06130699342353523133",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130816",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130816",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130816",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "300710522",
       "creationTimestamp": "2013-10-11T09:26:47.736-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-09-26",
       "id": "0225119674082940764",
       "kind": "compute#image",
       "name": "debian-6-squeeze-v20130926",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-6-squeeze-v20130926",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-6-squeeze-v20130926",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "237290472",
       "creationTimestamp": "2013-05-07T17:01:30.071-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-07",
       "id": "15638477823580670459",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130507",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130507",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130507",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "270107366",
       "creationTimestamp": "2013-05-09T12:56:47.910-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-09",
       "id": "020034532765408091",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130509",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130225",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130509",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130509",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "265604335",
       "creationTimestamp": "2013-05-14T21:02:55.044-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-15",
       "id": "0587071888358410836",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130515",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130515",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130515",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130515",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "284301993",
       "creationTimestamp": "2013-05-30T09:47:30.980-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.0 (wheezy) built on 2013-05-22",
       "id": "622079684385221180",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130522",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130522",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130522",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130522",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "310882322",
       "creationTimestamp": "2013-06-19T13:47:20.563-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-06-17",
       "id": "1549141992333368759",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "258869806",
       "creationTimestamp": "2013-07-24T12:31:36.790-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-07-23",
       "id": "3119304810142650253",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130723",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "279162251",
       "creationTimestamp": "2013-09-04T13:24:30.479-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-08-16",
       "id": "2595370902107306327",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130816",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130816",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130816",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "279162251",
       "creationTimestamp": "2013-10-11T09:26:56.993-07:00",
+      "deprecated": {
+        "deprecated": "2013-11-14T00:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.1 (wheezy) built on 2013-09-26",
       "id": "06737951524754934395",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130926",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130926",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130926",
       "sourceType": "RAW",
       "status": "READY"
     },
     {
       "archiveSizeBytes": "405683884",
       "creationTimestamp": "2013-10-28T13:52:08.233-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T12:00:00Z",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+        "state": "DEPRECATED"
+      },
       "description": "Debian GNU/Linux 7.2 (wheezy) built on 2013-10-14",
       "id": "1405559880052641502",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20131014",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
+      "sourceType": "RAW",
+      "status": "READY"
+    },
+    {
+      "archiveSizeBytes": "341857472",
+      "creationTimestamp": "2013-11-25T15:17:00.436-08:00",
+      "description": "Debian GNU/Linux 7.2 (wheezy) built on 2013-11-20",
+      "id": "05708985343919147751",
+      "kind": "compute#image",
+      "name": "debian-7-wheezy-v20131120",
+      "rawDisk": {
+        "containerType": "TAR",
+        "source": ""
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
       "sourceType": "RAW",
       "status": "READY"
     }
   ],
   "kind": "compute#imageList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions.json b/libcloud/test/compute/fixtures/gce/regions.json
index d5e98c5..f6d12c0 100644
--- a/libcloud/test/compute/fixtures/gce/regions.json
+++ b/libcloud/test/compute/fixtures/gce/regions.json
@@ -29,11 +29,11 @@
           "usage": 0.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b"
       ]
     },
     {
@@ -64,11 +64,11 @@
           "usage": 4.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
       ]
     },
     {
@@ -99,13 +99,13 @@
           "usage": 0.0
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central2",
       "status": "UP",
       "zones": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
       ]
     }
   ],
   "kind": "compute#regionList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
index 11539c4..65c5bd6 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses.json
@@ -8,8 +8,8 @@
       "id": "17634862894218443422",
       "kind": "compute#address",
       "name": "libcloud-demo-address",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
       "status": "RESERVED"
     },
     {
@@ -19,11 +19,11 @@
       "id": "11879548153827627972",
       "kind": "compute#address",
       "name": "testaddress",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/testaddress",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/testaddress",
       "status": "RESERVED"
     }
   ],
   "kind": "compute#addressList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
index fe72fdc..6579a2d 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress.json
@@ -5,7 +5,7 @@
   "id": "01531551729918243104",
   "kind": "compute#address",
   "name": "lcaddress",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "status": "RESERVED"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
index 7aef2a9..90fec9e 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_lcaddress_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_lcaddress_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
   "startTime": "2013-06-26T12:21:44.110-07:00",
   "status": "PENDING",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
index bc00fb5..3bcbf1e 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_addresses_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_addresses_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
   "startTime": "2013-06-26T12:21:40.358-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
index 0fe7a08..2eedb8a 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules.json
@@ -9,9 +9,9 @@
       "kind": "compute#forwardingRule",
       "name": "lcforwardingrule",
       "portRange": "8000-8500",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
-      "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+      "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     },
     {
       "IPAddress": "173.255.119.185",
@@ -21,11 +21,11 @@
       "kind": "compute#forwardingRule",
       "name": "libcloud-lb-demo-lb",
       "portRange": "80-80",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
-      "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+      "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     }
   ],
   "kind": "compute#forwardingRuleList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
index d29a715..6301a55 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule.json
@@ -6,7 +6,7 @@
   "kind": "compute#forwardingRule",
   "name": "lcforwardingrule",
   "portRange": "8000-8500",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
-  "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
index 807c24a..b12f003 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_lcforwardingrule_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "startTime": "2013-09-03T00:17:36.168-07:00",
   "status": "PENDING",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
index 970328d..7925845 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_libcloud-lb-demo-lb.json
@@ -6,7 +6,7 @@
   "kind": "compute#forwardingRule",
   "name": "libcloud-lb-demo-lb",
   "portRange": "80-80",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
-  "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+  "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
index 6194247..c65f283 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_forwardingRules_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_forwardingRules_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
   "startTime": "2013-09-03T00:17:25.434-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
index 0f25323..72584ec 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools.json
@@ -4,35 +4,35 @@
     {
       "creationTimestamp": "2013-09-03T00:51:05.300-07:00",
       "healthChecks": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+        "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
       ],
       "id": "13598380121688918358",
       "instances": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
       ],
       "kind": "compute#targetPool",
       "name": "lctargetpool",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
     },
     {
       "creationTimestamp": "2013-09-02T22:25:45.817-07:00",
       "healthChecks": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+        "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
       ],
       "id": "16862638289615591831",
       "instances": [
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
-        "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+        "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
       ],
       "kind": "compute#targetPool",
       "name": "libcloud-lb-demo-lb-tp",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
     }
   ],
   "kind": "compute#targetPoolList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
index 6349186..1875ed1 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool.json
@@ -1,15 +1,15 @@
 {
   "creationTimestamp": "2013-09-03T00:51:05.300-07:00",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
   ],
   "id": "13598380121688918358",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
   ],
   "kind": "compute#targetPool",
   "name": "lctargetpool",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
index 5c783ea..9db7b24 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "operationType": "addHealthCheck",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "startTime": "2013-09-03T01:28:40.838-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
index a2fa532..7f61c1d 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_addInstance_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "operationType": "addInstance",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "startTime": "2013-09-03T01:29:03.145-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
index 039ad00..276a465 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_delete",
   "operationType": "delete",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
   "startTime": "2013-09-03T00:51:06.840-07:00",
   "status": "PENDING",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
index 98e772e..eebae15 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "operationType": "removeHealthCheck",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "startTime": "2013-09-03T01:28:32.942-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
index 698018d..fc0c69f 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "operationType": "removeInstance",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "startTime": "2013-09-03T01:28:53.109-07:00",
   "status": "PENDING",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
index ddcab9b..44a7af5 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_libcloud-lb-demo-lb-tp.json
@@ -1,16 +1,16 @@
 {
   "creationTimestamp": "2013-09-02T22:25:45.817-07:00",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
   ],
   "id": "16862638289615591831",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-002",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000"
   ],
   "kind": "compute#targetPool",
   "name": "libcloud-lb-demo-lb-tp",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
index 5d1185c..6437bc7 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_post.json
@@ -5,10 +5,10 @@
   "name": "operation-regions_us-central1_targetPools_post",
   "operationType": "insert",
   "progress": 0,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
   "startTime": "2013-09-03T00:51:05.115-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
index 69e17d4..d41068f 100644
--- a/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
+++ b/libcloud/test/compute/fixtures/gce/regions_us-central1_targetPools_www-pool.json
@@ -2,16 +2,16 @@
   "creationTimestamp": "2013-08-19T14:43:25.289-07:00",
   "description": "",
   "healthChecks": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check"
+    "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check"
   ],
   "id": "09965129111508633746",
   "instances": [
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www1",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www2",
-    "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/www3"
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www1",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www2",
+    "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/www3"
   ],
   "kind": "compute#targetPool",
   "name": "www-pool",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/www-pool"
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/www-pool"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones.json b/libcloud/test/compute/fixtures/gce/zones.json
index 05b0b25..0d564e7 100644
--- a/libcloud/test/compute/fixtures/gce/zones.json
+++ b/libcloud/test/compute/fixtures/gce/zones.json
@@ -15,8 +15,8 @@
         }
       ],
       "name": "europe-west1-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a",
       "status": "UP"
     },
     {
@@ -33,8 +33,8 @@
         }
       ],
       "name": "europe-west1-b",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b",
       "status": "UP"
     },
     {
@@ -43,8 +43,8 @@
       "id": "13462829244527433283",
       "kind": "compute#zone",
       "name": "us-central1-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
       "status": "UP"
     },
     {
@@ -52,24 +52,15 @@
       "description": "us-central1-b",
       "id": "1045862591201432620",
       "kind": "compute#zone",
-      "maintenanceWindows": [
-        {
-          "beginTime": "2013-11-02T12:00:00.000-07:00",
-          "description": "maintenance zone",
-          "endTime": "2013-11-10T12:00:00.000-08:00",
-          "name": "2013-11-02-planned-outage"
-        }
-      ],
       "name": "us-central1-b",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b",
       "status": "UP"
     },
     {
       "creationTimestamp": "2013-02-05T16:19:23.257-08:00",
       "deprecated": {
-        "deprecated": "2013-10-24T10:46:00-00:00",
-        "replacement": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b",
         "state": "DEPRECATED"
       },
       "description": "us-central2-a",
@@ -84,11 +75,11 @@
         }
       ],
       "name": "us-central2-a",
-      "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a",
+      "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a",
       "status": "UP"
     }
   ],
   "kind": "compute#zoneList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones"
-}
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
index d6174cf..1dd88d6 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances.json
@@ -3,20 +3,21 @@
   "items": [
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:46:02.933-07:00",
+      "creationTimestamp": "2013-12-13T10:43:58.782-08:00",
       "disks": [
         {
+          "boot": true,
+          "deviceName": "libcloud-demo-europe-multiple-nodes-000",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "type": "SCRATCH"
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
+          "type": "PERSISTENT"
         }
       ],
-      "id": "04184465693678804555",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "10947706194464948790",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -28,16 +29,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.211.48",
+              "natIP": "192.158.28.252",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.141.92"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.122.85"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "W7t6ZyTyIrc=",
@@ -45,32 +50,33 @@
           "libcloud"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     },
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:44:57.127-07:00",
+      "creationTimestamp": "2013-12-13T10:43:12.706-08:00",
       "disks": [
         {
+          "boot": true,
+          "deviceName": "libcloud-demo-europe-np-node",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "type": "SCRATCH"
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+          "type": "PERSISTENT"
         },
         {
           "deviceName": "libcloud-demo-europe-attach-disk",
           "index": 1,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
           "type": "PERSISTENT"
         }
       ],
-      "id": "4450078356274958103",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "3421745795082776097",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -82,16 +88,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.208.52",
+              "natIP": "23.251.128.10",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.48.164"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.221.125"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "W7t6ZyTyIrc=",
@@ -99,11 +109,11 @@
           "libcloud"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     },
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-11-01T14:45:44.186-07:00",
+      "creationTimestamp": "2013-12-13T10:43:37.267-08:00",
       "disks": [
         {
           "boot": true,
@@ -111,14 +121,13 @@
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
           "type": "PERSISTENT"
         }
       ],
-      "id": "8051468456709756069",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+      "id": "517678477070693411",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
@@ -130,16 +139,20 @@
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "8.34.211.23",
+              "natIP": "23.251.128.32",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.188.108"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.240.204"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
       "status": "RUNNING",
       "tags": {
         "fingerprint": "EbZdwVRtKyg=",
@@ -148,9 +161,9 @@
           "newtag"
         ]
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
     }
   ],
   "kind": "compute#instanceList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
index f507829..710517c 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_instances_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_europe-west1-a_instances_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
   "startTime": "2013-06-26T20:57:34.453-07:00",
   "status": "PENDING",
   "targetId": "14308265828754333159",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
index b598068..e4e8fcf 100644
--- a/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
+++ b/libcloud/test/compute/fixtures/gce/zones_europe-west1-a_machineTypes_n1-standard-1.json
@@ -9,6 +9,6 @@
   "maximumPersistentDisksSizeGb": "10240",
   "memoryMb": 3840,
   "name": "n1-standard-1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
   "zone": "europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
index 9812bd8..c917966 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a.json
@@ -4,7 +4,7 @@
   "id": "13462829244527433283",
   "kind": "compute#zone",
   "name": "us-central1-a",
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a",
   "status": "UP"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
index ef0e4af..68d40fc 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks.json
@@ -2,36 +2,29 @@
   "id": "projects/project_name/zones/us-central1-a/disks",
   "items": [
     {
-      "creationTimestamp": "2013-06-26T10:06:04.007-07:00",
-      "id": "16109451798967042451",
+      "creationTimestamp": "2013-12-13T10:45:42.139-08:00",
+      "id": "08045379695757218000",
       "kind": "compute#disk",
       "name": "lcdisk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
       "sizeGb": "1",
       "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     },
     {
-      "creationTimestamp": "2013-06-26T09:47:09.178-07:00",
-      "id": "10880026303683859871",
+      "creationTimestamp": "2013-12-13T10:45:20.308-08:00",
+      "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+      "id": "0265567475385851075",
       "kind": "compute#disk",
-      "name": "libcloud-demo-boot-disk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/libcloud-demo-boot-disk",
+      "name": "node-name",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
       "sizeGb": "10",
+      "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+      "sourceImageId": "17312518942796567788",
       "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "creationTimestamp": "2013-06-25T10:57:34.305-07:00",
-      "id": "14383387450728762434",
-      "kind": "compute#disk",
-      "name": "test-disk",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/test-disk",
-      "sizeGb": "10",
-      "status": "READY",
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     }
   ],
   "kind": "compute#diskList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
index ae28c7f..d88ba6e 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk.json
@@ -3,8 +3,8 @@
   "id": "16109451798967042451",
   "kind": "compute#disk",
   "name": "lcdisk",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "sizeGb": "1",
   "status": "READY",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
index 19efa6a..84d222a 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_disks_lcdisk_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
   "startTime": "2013-06-26T10:06:12.006-07:00",
   "status": "PENDING",
   "targetId": "16109451798967042451",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
index 370a3fb..ed69408 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_post.json
@@ -5,10 +5,10 @@
   "name": "operation-zones_us-central1-a_disks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
   "startTime": "2013-06-26T16:48:17.479-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file


[39/44] git commit: Split up ex_create_multiple_nodes to make it a bit easier to read. Also, add poll_interval keyword.

Posted by to...@apache.org.
Split up ex_create_multiple_nodes to make it a bit easier to read.
Also, add poll_interval keyword.


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

Branch: refs/heads/trunk
Commit: 4876970e014e3078a0ac690b2afa09691155ee18
Parents: e138a1b
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 00:47:12 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 253 +++++++++++++++++++++++------------
 1 file changed, 165 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4876970e/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 5277fc3..5c569a4 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -23,6 +23,7 @@ import sys
 
 from libcloud.common.google import GoogleResponse
 from libcloud.common.google import GoogleBaseConnection
+from libcloud.common.google import GoogleBaseError
 from libcloud.common.google import ResourceNotFoundError
 from libcloud.common.google import ResourceExistsError
 
@@ -1394,10 +1395,144 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
+    def _multi_create_disk(self, status, node_attrs):
+        """Create disk for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        disk = None
+        # Check for existing disk
+        if node_attrs['use_existing_disk']:
+            try:
+                disk = self.ex_get_volume(status['name'],
+                                          node_attrs['location'])
+            except ResourceNotFoundError:
+                pass
+
+        if disk:
+            status['disk'] = disk
+        else:
+            # Create disk and return response object back in the status dict.
+            # Or, if there is an error, mark as failed.
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, status['name'], location=node_attrs['location'],
+                image=node_attrs['image'])
+            try:
+                disk_res = self.connection.request(
+                    disk_req, method='POST', data=disk_data,
+                    params=disk_params).object
+            except GoogleBaseError:
+                e = self._catch_error(
+                    ignore_errors=node_attrs['ignore_errors'])
+                error = e.value
+                code = e.code
+                disk_res = None
+                status['disk'] = GCEFailedDisk(status['name'],
+                                               error, code)
+            status['disk_response'] = disk_res
+
+    def _multi_check_disk(self, status, node_attrs):
+        """Check disk status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['disk_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['disk_response'] = None
+            if error:
+                status['disk'] = GCEFailedDisk(status['name'], error, code)
+            else:
+                status['disk'] = self.ex_get_volume(status['name'],
+                                                    node_attrs['location'])
+
+    def _multi_create_node(self, status, node_attrs):
+        """Create node for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        # If disk has an error, set the node as failed and return
+        if hasattr(status['disk'], 'error'):
+            status['node'] = status['disk']
+            return
+
+        # Create node and return response object in status dictionary.
+        # Or, if there is an error, mark as failed.
+        request, node_data = self._create_node_req(
+            status['name'], node_attrs['size'], node_attrs['image'],
+            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
+            node_attrs['metadata'], boot_disk=status['disk'])
+        try:
+            node_res = self.connection.request(
+                request, method='POST', data=node_data).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            node_res = None
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        status['node_response'] = node_res
+
+    def _multi_check_node(self, status, node_attrs):
+        """Check node status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['node_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['node_response'] = None
+        if error:
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        else:
+            status['node'] = self.ex_get_node(status['name'],
+                                              node_attrs['location'])
+
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
                                  ignore_errors=True, use_existing_disk=True,
+                                 poll_interval=2,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1418,8 +1553,6 @@ class GCENodeDriver(NodeDriver):
         :param  image: The image to use to create the nodes.
         :type   image: ``str`` or :class:`NodeImage`
 
-        return self.ex_get_snapshot(name)
-
         :param  number: The number of nodes to create.
         :type   number: ``int``
 
@@ -1445,6 +1578,9 @@ class GCENodeDriver(NodeDriver):
                                      disk instead of creating a new one.
         :type     use_existing_disk: ``bool``
 
+        :keyword  poll_interval: Number of seconds between status checks.
+        :type	  poll_interval: ``int``
+
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
         :type     timeout: ``int``
@@ -1452,7 +1588,6 @@ class GCENodeDriver(NodeDriver):
         :return:  A list of Node objects for the new nodes.
         :rtype:   ``list`` of :class:`Node`
         """
-        node_data = {}
         location = location or self.zone
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
@@ -1463,6 +1598,15 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
+        node_attrs = {'size': size,
+                      'image': image,
+                      'location': location,
+                      'network': ex_network,
+                      'tags': ex_tags,
+                      'metadata': ex_metadata,
+                      'ignore_errors': ignore_errors,
+                      'use_existing_disk': use_existing_disk}
+
         # List for holding the status information for disk/node creation.
         status_list = []
 
@@ -1475,34 +1619,12 @@ class GCENodeDriver(NodeDriver):
                       'disk_response': None,
                       'disk': None}
 
-            # Create disks for nodes
-            disk = None
-            if use_existing_disk:
-                try:
-                    disk = self.ex_get_volume(name, location)
-                except:
-                    pass
-
-            if disk:
-                status['disk'] = disk
-            else:
-                disk_req, disk_data, disk_params = self._create_vol_req(
-                    None, name, location=location, image=image)
-                try:
-                    disk_res = self.connection.request(
-                        disk_req, method='POST', data=disk_data,
-                        params=disk_params).object
-                except:
-                    e = self._catch_error(ignore_errors=ignore_errors)
-                    error = e.value
-                    code = e.code
-                    disk_res = None
-                    status['disk'] = GCEFailedDisk(status['name'],
-                                                   error, code)
-                status['disk_response'] = disk_res
-
             status_list.append(status)
 
+        # Create disks for nodes
+        for status in status_list:
+            self._multi_create_disk(status, node_attrs)
+
         start_time = time.time()
         complete = False
         while not complete:
@@ -1510,73 +1632,25 @@ class GCENodeDriver(NodeDriver):
                 raise Exception("Timeout (%s sec) while waiting for multiple "
                                 "instances")
             complete = True
-            time.sleep(2)
-            for i, status in enumerate(status_list):
+            time.sleep(poll_interval)
+            for status in status_list:
                 # If disk does not yet exist, check on its status
                 if not status['disk']:
-                    error = None
-                    try:
-                        response = self.connection.request(
-                            status['disk_response']['selfLink']).object
-                    except:
-                        e = self._catch_error(ignore_errors=ignore_errors)
-                        error = e.value
-                        code = e.code
-                        response = {'status': 'DONE'}
-                    if response['status'] == 'DONE':
-                        status['disk_response'] = None
-                        if error:
-                            status['disk'] = GCEFailedDisk(status['name'],
-                                                           error, code)
-                        else:
-                            status['disk'] = self.ex_get_volume(status['name'],
-                                                                location)
+                    self._multi_check_disk(status, node_attrs)
 
                 # If disk exists, but node does not, create the node or check
                 # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
-                        if hasattr(status['disk'], 'error'):
-                            status['node'] = status['disk']
-                            continue
-                        request, node_data = self._create_node_req(
-                            status['name'], size, image, location, ex_network,
-                            ex_tags, ex_metadata, boot_disk=status['disk'])
-                        try:
-                            node_res = self.connection.request(
-                                request, method='POST', data=node_data).object
-                        except:
-                            e = self._catch_error(ignore_errors=ignore_errors)
-                            error = e.value
-                            code = e.code
-                            node_res = None
-                            status['node'] = GCEFailedNode(status['name'],
-                                                           error, code)
-                        status['node_response'] = node_res
+                        self._multi_create_node(status, node_attrs)
                     else:
-                        error = None
-                        try:
-                            response = self.connection.request(
-                                status['node_response']['selfLink']).object
-                        except:
-                            e = self._catch_error(ignore_errors=ignore_errors)
-                            error = e.value
-                            code = e.code
-                            response = {'status': 'DONE'}
-                        if response['status'] == 'DONE':
-                            status['node_response'] = None
-                        if error:
-                            status['node'] = GCEFailedNode(status['name'],
-                                                           error, code)
-                        else:
-                            status['node'] = self.ex_get_node(status['name'],
-                                                              location)
-
+                        self._multi_check_node(status, node_attrs)
                 # If any of the nodes have not been created (or failed) we are
                 # not done yet.
                 if not status['node']:
                     complete = False
 
+        # Return list of nodes
         node_list = []
         for status in status_list:
             node_list.append(status['node'])
@@ -2249,7 +2323,7 @@ class GCENodeDriver(NodeDriver):
         return True
 
     def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
-                                  destroy_boot_disk=False,
+                                  destroy_boot_disk=False, poll_interval=2,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
@@ -2265,6 +2339,9 @@ class GCENodeDriver(NodeDriver):
                                      disks.
         :type     destroy_boot_disk: ``bool``
 
+        :keyword  poll_interval: Number of seconds between status checks.
+        :type     poll_interval: ``int``
+
         :keyword  timeout: Number of seconds to wait for all nodes to be
                            destroyed.
         :type     timeout: ``int``
@@ -2282,7 +2359,7 @@ class GCENodeDriver(NodeDriver):
             try:
                 response = self.connection.request(request,
                                                    method='DELETE').object
-            except:
+            except GoogleBaseError:
                 self._catch_error(ignore_errors=ignore_errors)
                 response = None
 
@@ -2308,7 +2385,7 @@ class GCENodeDriver(NodeDriver):
                     try:
                         response = self.connection.request(
                             operation['selfLink']).object
-                    except:
+                    except GoogleBaseError:
                         self._catch_error(ignore_errors=ignore_errors)
                         no_errors = False
                         response = {'status': 'DONE'}
@@ -2332,7 +2409,7 @@ class GCENodeDriver(NodeDriver):
                         try:
                             response = self.connection.request(
                                 request, method='DELETE').object
-                        except:
+                        except GoogleBaseError:
                             self._catch_error(ignore_errors=ignore_errors)
                             no_errors = False
                             response = None
@@ -2341,7 +2418,7 @@ class GCENodeDriver(NodeDriver):
                         status['disk_success'] = True
                 operation = status['node_response'] or status['disk_response']
                 if operation:
-                    time.sleep(2)
+                    time.sleep(poll_interval)
                     complete = False
 
         success = []


[14/44] git commit: Add support for reading/setting node scheduling options.

Posted by to...@apache.org.
Add support for reading/setting node scheduling options.


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

Branch: refs/heads/trunk
Commit: 40a18cb9f3fc0b1fb5a2e6b765fb5521efa22b6a
Parents: 0b9b7de
Author: Rick Wright <ri...@google.com>
Authored: Tue Dec 17 10:54:13 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Tue Dec 17 10:54:13 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 67 +++++++++++++++++++++++++++++++++++-
 1 file changed, 66 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/40a18cb9/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index ca157f6..df865b4 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1978,6 +1978,70 @@ class GCENodeDriver(NodeDriver):
         node.extra['tags_fingerprint'] = new_node.extra['tags_fingerprint']
         return True
 
+    def ex_set_node_scheduling(self, node, on_host_maintenance=None,
+                               automatic_restart=None):
+        """Set the maintenance behavior for the node.
+
+        See Scheduling_ documentation for more info.
+        _Scheduling:
+        https://developers.google.com/compute/docs/instances#onhostmaintenance
+
+        :param  node: Node object
+        :type   node: :class:`Node`
+
+        :keyword  on_host_maintenance: Defines whether node should be
+                                       terminated or migrated when host machine
+                                       goes down. Acceptable values are:
+                                       'MIGRATE' or 'TERMINATE' (If not
+                                       supplied, value will be reset to GCE
+                                       default value for the instance type.)
+        :type     on_host_maintenance: ``str``
+
+        :keyword  automatic_restart: Defines whether the instance should be
+                                     automatically restarted when it is
+                                     terminated by Compute Engine. (If not
+                                     supplied, value will be set to the GCE
+                                     default value for the instance type.)
+        :type     automatic_restart: ``bool``
+
+        :return:  True if successful.
+        :rtype:   ``bool``
+        """
+        if not hasattr(node, 'name'):
+            node = self.ex_get_node(node, 'all')
+        if on_host_maintenance is not None:
+            on_host_maintenance = on_host_maintenance.upper()
+            ohm_values = ['MIGRATE', 'TERMINATE']
+            if on_host_maintenance not in ohm_values:
+                raise ValueError('on_host_maintenence must be one of %s' %
+                                 ','.join(ohm_values))
+
+        request = '/zones/%s/instances/%s/setScheduling' % (
+            node.extra['zone'].name, node.name)
+
+        scheduling_data = {}
+        if on_host_maintenance is not None:
+            scheduling_data['onHostMaintenance'] = on_host_maintenance
+        if automatic_restart is not None:
+            scheduling_data['automaticRestart'] = automatic_restart
+
+        self.connection.async_request(request, method='POST',
+                                      data=scheduling_data)
+
+        new_node = self.ex_get_node(node.name, node.extra['zone'])
+        node.extra['scheduling'] = new_node.extra['scheduling']
+
+        ohm = node.extra['scheduling'].get('onHostMaintenance')
+        ar = node.extra['scheduling'].get('automaticRestart')
+
+        success = True
+        if on_host_maintenance not in [None, ohm]:
+            success = False
+        if automatic_restart not in [None, ar]:
+            success = False
+
+        return success
+
     def deploy_node(self, name, size, image, script, location=None,
                     ex_network='default', ex_tags=None):
         """
@@ -2771,8 +2835,9 @@ class GCENodeDriver(NodeDriver):
         extra['id'] = node['id']
         extra['selfLink'] = node.get('selfLink')
         extra['name'] = node['name']
-        extra['metadata'] = node.get('metadata')
+        extra['metadata'] = node.get('metadata', {})
         extra['tags_fingerprint'] = node['tags']['fingerprint']
+        extra['scheduling'] = node.get('scheduling', {})
 
         extra['boot_disk'] = None
         for disk in extra['disks']:


[10/44] git commit: Tests for Snapshots (plus fix for list_targetpools test)

Posted by to...@apache.org.
Tests for Snapshots (plus fix for list_targetpools test)


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

Branch: refs/heads/trunk
Commit: ea7662ac4909b72a837ebbd54cd61baee770d2f0
Parents: a0aa455
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 13:28:33 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 13:28:33 2013 -0800

----------------------------------------------------------------------
 .../compute/fixtures/gce/global_snapshots.json  | 31 +++++++++
 .../gce/global_snapshots_lcsnapshot.json        | 12 ++++
 .../gce/global_snapshots_lcsnapshot_delete.json | 14 ++++
 ...tion_global_snapshots_lcsnapshot_delete.json | 15 +++++
 ...ral1-a_disks_lcdisk_createSnapshot_post.json | 16 +++++
 ...ral1-a_disks_lcdisk_createSnapshot_post.json | 15 +++++
 libcloud/test/compute/test_gce.py               | 70 ++++++++++++++++++--
 7 files changed, 167 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/global_snapshots.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots.json b/libcloud/test/compute/fixtures/gce/global_snapshots.json
new file mode 100644
index 0000000..d839107
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots.json
@@ -0,0 +1,31 @@
+{
+  "id": "projects/project_name/global/snapshots",
+  "items": [
+    {
+      "creationTimestamp": "2013-12-16T13:03:51.345-08:00",
+      "description": "",
+      "diskSizeGb": "1",
+      "id": "17482266715940883688",
+      "kind": "compute#snapshot",
+      "name": "lcsnapshot",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+      "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+      "sourceDiskId": "-2511816066479461182",
+      "status": "READY"
+    },
+    {
+      "creationTimestamp": "2013-12-16T12:48:12.557-08:00",
+      "description": "",
+      "diskSizeGb": "10",
+      "id": "3341332334980930052",
+      "kind": "compute#snapshot",
+      "name": "libcloud-demo-snapshot",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/libcloud-demo-snapshot",
+      "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-snap-template",
+      "sourceDiskId": "-6245698478147030397",
+      "status": "READY"
+    }
+  ],
+  "kind": "compute#snapshotList",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
new file mode 100644
index 0000000..9b071a9
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
@@ -0,0 +1,12 @@
+{
+  "creationTimestamp": "2013-12-16T13:03:51.345-08:00",
+  "description": "",
+  "diskSizeGb": "1",
+  "id": "17482266715940883688",
+  "kind": "compute#snapshot",
+  "name": "lcsnapshot",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "sourceDiskId": "-2511816066479461182",
+  "status": "READY"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
new file mode 100644
index 0000000..59cd70c
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
@@ -0,0 +1,14 @@
+{
+  "id": "5994251357251874363",
+  "insertTime": "2013-12-16T13:04:03.831-08:00",
+  "kind": "compute#operation",
+  "name": "operation-global_snapshots_lcsnapshot_delete",
+  "operationType": "delete",
+  "progress": 0,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_snapshots_lcsnapshot_delete",
+  "startTime": "2013-12-16T13:04:03.924-08:00",
+  "status": "PENDING",
+  "targetId": "17482266715940883688",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
new file mode 100644
index 0000000..e869f26
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
@@ -0,0 +1,15 @@
+{
+  "endTime": "2013-12-16T13:04:11.565-08:00",
+  "id": "5994251357251874363",
+  "insertTime": "2013-12-16T13:04:03.831-08:00",
+  "kind": "compute#operation",
+  "name": "operation-global_snapshots_lcsnapshot_delete",
+  "operationType": "delete",
+  "progress": 100,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_snapshots_lcsnapshot_delete",
+  "startTime": "2013-12-16T13:04:03.924-08:00",
+  "status": "DONE",
+  "targetId": "17482266715940883688",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
new file mode 100644
index 0000000..f765ebf
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
@@ -0,0 +1,16 @@
+{
+  "endTime": "2013-12-16T13:04:01.580-08:00",
+  "id": "0158330665043557584",
+  "insertTime": "2013-12-16T13:03:51.000-08:00",
+  "kind": "compute#operation",
+  "name": "operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "operationType": "createSnapshot",
+  "progress": 100,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "startTime": "2013-12-16T13:03:51.042-08:00",
+  "status": "DONE",
+  "targetId": "07494414044179227172",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
new file mode 100644
index 0000000..97be56a
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
@@ -0,0 +1,15 @@
+{
+  "id": "0158330665043557584",
+  "insertTime": "2013-12-16T13:03:51.000-08:00",
+  "kind": "compute#operation",
+  "name": "operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "operationType": "createSnapshot",
+  "progress": 0,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "startTime": "2013-12-16T13:03:51.042-08:00",
+  "status": "PENDING",
+  "targetId": "07494414044179227172",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7662ac/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 3462f64..31f35bf 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -168,15 +168,20 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(regions), 3)
         self.assertEqual(regions[0].name, 'europe-west1')
 
-    def ex_list_targetpools(self):
+    def test_ex_list_snapshots(self):
+        snapshots = self.driver.ex_list_snapshots()
+        self.assertEqual(len(snapshots), 2)
+        self.assertEqual(snapshots[0].name, 'lcsnapshot')
+
+    def test_ex_list_targetpools(self):
         target_pools = self.driver.ex_list_targetpools()
         target_pools_all = self.driver.ex_list_targetpools('all')
         target_pools_uc1 = self.driver.ex_list_targetpools('us-central1')
-        self.assertEqual(len(target_pools), 3)
-        self.assertEqual(len(target_pools_all), 4)
-        self.assertEqual(len(target_pools_uc1), 3)
-        self.assertEqual(target_pools[0].name, 'www-pool')
-        self.assertEqual(target_pools_uc1[0].name, 'www-pool')
+        self.assertEqual(len(target_pools), 2)
+        self.assertEqual(len(target_pools_all), 3)
+        self.assertEqual(len(target_pools_uc1), 2)
+        self.assertEqual(target_pools[0].name, 'lctargetpool')
+        self.assertEqual(target_pools_uc1[0].name, 'lctargetpool')
         names = [t.name for t in target_pools_all]
         self.assertTrue('www-pool' in names)
 
@@ -319,6 +324,13 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(targetpool.nodes), len(nodes))
         self.assertEqual(targetpool.region.name, region)
 
+    def test_ex_create_volume_snapshot(self):
+        snapshot_name = 'lcsnapshot'
+        volume = self.driver.ex_get_volume('lcdisk')
+        snapshot = volume.snapshot(snapshot_name)
+        self.assertEqual(snapshot.name, snapshot_name)
+        self.assertEqual(snapshot.size, '1')
+
     def test_create_volume(self):
         volume_name = 'lcdisk'
         size = 1
@@ -442,6 +454,11 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         destroyed = disk.destroy()
         self.assertTrue(destroyed)
 
+    def test_destroy_volume_snapshot(self):
+        snapshot = self.driver.ex_get_snapshot('lcsnapshot')
+        destroyed = snapshot.destroy()
+        self.assertTrue(destroyed)
+
     def test_ex_get_address(self):
         address_name = 'lcaddress'
         address = self.driver.ex_get_address(address_name)
@@ -535,6 +552,13 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(targetpool.nodes), 2)
         self.assertEqual(targetpool.region.name, 'us-central1')
 
+    def test_ex_get_snapshot(self):
+        snapshot_name = 'lcsnapshot'
+        snapshot = self.driver.ex_get_snapshot(snapshot_name)
+        self.assertEqual(snapshot.name, snapshot_name)
+        self.assertEqual(snapshot.size, '1')
+        self.assertEqual(snapshot.status, 'READY')
+
     def test_ex_get_volume(self):
         volume_name = 'lcdisk'
         volume = self.driver.ex_get_volume(volume_name)
@@ -593,6 +617,10 @@ class GCEMockHttp(MockHttpTestCase):
         body = self.fixtures.load('aggregated_machineTypes.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _aggregated_targetPools(self, method, url, body, headers):
+        body = self.fixtures.load('aggregated_targetPools.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _global_httpHealthChecks(self, method, url, body, headers):
         if method == 'POST':
             body = self.fixtures.load('global_httpHealthChecks_post.json')
@@ -673,6 +701,18 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('global_networks_lcnetwork.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _global_snapshots(self, method, url, body, headers):
+        body = self.fixtures.load('global_snapshots.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _global_snapshots_lcsnapshot(self, method, url, body, headers):
+        if method == 'DELETE':
+            body = self.fixtures.load(
+                'global_snapshots_lcsnapshot_delete.json')
+        else:
+            body = self.fixtures.load('global_snapshots_lcsnapshot.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _global_operations_operation_global_httpHealthChecks_lchealthcheck_delete(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -721,6 +761,12 @@ class GCEMockHttp(MockHttpTestCase):
             'operations_operation_global_networks_post.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _global_operations_operation_global_snapshots_lcsnapshot_delete(
+            self, method, url, body, headers):
+        body = self.fixtures.load(
+            'operations_operation_global_snapshots_lcsnapshot_delete.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _regions_us_central1_operations_operation_regions_us_central1_addresses_lcaddress_delete(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -787,6 +833,12 @@ class GCEMockHttp(MockHttpTestCase):
             'operations_operation_zones_us-central1-a_disks_lcdisk_delete.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_lcdisk_createSnapshot_post(
+            self, method, url, body, headers):
+        body = self.fixtures.load(
+            'operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_post(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -970,6 +1022,12 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('zones_us-central1-a_disks_lcdisk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_disks_lcdisk_createSnapshot(self, method, url,
+                                                         body, headers):
+        body = self.fixtures.load(
+            'zones_us-central1-a_disks_lcdisk_createSnapshot_post.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_us_central1_a_disks_node_name(self, method, url, body, headers):
         body = self.fixtures.load('generic_disk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])


[17/44] git commit: flake8 fixes

Posted by to...@apache.org.
flake8 fixes


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

Branch: refs/heads/trunk
Commit: 9ea6e7cdacf19789b30b1ea551aa26585d6040fd
Parents: dcf2a26
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 15:52:00 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Fri Dec 20 15:52:00 2013 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9ea6e7cd/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 01c3cb0..2206c25 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -167,7 +167,7 @@ class GoogleResponse(JsonResponse):
             err = body['error']['errors'][0]
         else:
             err = body['error']
-        
+
         if 'code' in err:
             code = err.get('code')
             message = err.get('message')
@@ -227,8 +227,8 @@ class GoogleResponse(JsonResponse):
             else:
                 message = body
                 code = None
-            raise InvalidRequestError(message, self.status, code) 
-                
+            raise InvalidRequestError(message, self.status, code)
+
         else:
             if (not json_error) and ('error' in body):
                 (code, message) = self._get_error(body)


[28/44] git commit: Add functionality to create_node & create_volume to use existing disks of the same name. Also some pep8 fixes.

Posted by to...@apache.org.
Add functionality to create_node & create_volume to use existing
disks of the same name.
Also some pep8 fixes.


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

Branch: refs/heads/trunk
Commit: 47b75008aefb6895f4113227dc51de0ac0ae3171
Parents: e58e323
Author: Rick Wright <ri...@google.com>
Authored: Wed Dec 4 17:12:15 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 99 ++++++++++++++++++++++++------------
 1 file changed, 66 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/47b75008/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index f2417cf..c4827eb 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1310,7 +1310,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None):
+                    ex_boot_disk=None, use_existing_disk=False):
         """
         Create a new node and return a node object for the node.
 
@@ -1340,6 +1340,11 @@ class GCENodeDriver(NodeDriver):
         :keyword  ex_boot_disk: The boot disk to attach to the instance.
         :type     ex_boot_disk: :class:`StorageVolume` or ``str``
 
+        :keyword  use_existing_disk: If True and if an existing disk with the
+                                     same name/location is found, use that
+                                     disk instead of creating a new one.
+        :type     use_existing_disk: ``bool``
+
         :return:  A Node object for the new node.
         :rtype:   :class:`Node`
         """
@@ -1355,7 +1360,8 @@ class GCENodeDriver(NodeDriver):
 
         if not ex_boot_disk:
             ex_boot_disk = self.create_volume(None, name, location=location,
-                                              image=image)
+                                              image=image,
+                                              use_existing=use_existing_disk)
 
         request, node_data = self._create_node_req(name, size, image,
                                                    location, ex_network,
@@ -1365,11 +1371,10 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
-
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True,
+                                 ignore_errors=True, use_existing_disk=False,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1410,6 +1415,11 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails.
         :type     ignore_errors: ``bool``
 
+        :keyword  use_existing_disk: If True and if an existing disk with the
+                                     same name/location is found, use that
+                                     disk instead of creating a new one.
+        :type     use_existing_disk: ``bool``
+
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
         :type     timeout: ``int``
@@ -1429,22 +1439,36 @@ class GCENodeDriver(NodeDriver):
             image = self.ex_get_image(image)
 
         # List for holding the status information for disk/node creation.
-        status_list = [None] * number
+        status_list = []
 
         for i in range(number):
             name = '%s-%03d' % (base_name, i)
 
+            status = {'name': name,
+                      'node_response': None,
+                      'node': None,
+                      'disk_response': None,
+                      'disk': None}
+
             # Create disks for nodes
-            disk_req, disk_data, disk_params = self._create_vol_req(
-                None, name, location=location, image=image)
-            disk_res = self.connection.request(disk_req, method='POST',
-                                               data=disk_data,
-                                               params=disk_params).object
-            status_list[i] = {'name': name,
-                              'node_response': None,
-                              'node': None,
-                              'disk_response': disk_res,
-                              'disk': None}
+            disk = None
+            if use_existing_disk:
+                try:
+                    disk = self.ex_get_volume(name, location)
+                except:
+                    pass
+
+            if disk:
+                status['disk'] = disk
+            else:
+                disk_req, disk_data, disk_params = self._create_vol_req(
+                    None, name, location=location, image=image)
+                disk_res = self.connection.request(disk_req, method='POST',
+                                                   data=disk_data,
+                                                   params=disk_params).object
+                status['disk_response'] = disk_res
+
+            status_list.append(status)
 
         start_time = time.time()
         complete = False
@@ -1471,22 +1495,18 @@ class GCENodeDriver(NodeDriver):
                             status['disk'] = GCEFailedDisk(status['name'],
                                                            error, code)
                         else:
-                            status['disk'] = self.ex_get_volume(status['name'], location)
+                            status['disk'] = self.ex_get_volume(status['name'],
+                                                                location)
 
-                # If disk exists, but node does not, create the node or check on
-                # its status if already in progress.
+                # If disk exists, but node does not, create the node or check
+                # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
-                        request, node_data = self._create_node_req(status['name'], size,
-                                                                   image,
-                                                                   location,
-                                                                   ex_network,
-                                                                   ex_tags,
-                                                                   ex_metadata,
-                                                                   boot_disk=status['disk'])
-                        node_res = self.connection.request(request,
-                                                           method='POST',
-                                                           data=node_data).object
+                        request, node_data = self._create_node_req(
+                            status['name'], size, image, location, ex_network,
+                            ex_tags, ex_metadata, boot_disk=status['disk'])
+                        node_res = self.connection.request(
+                            request, method='POST', data=node_data).object
                         status['node_response'] = node_res
                     else:
                         error = None
@@ -1503,7 +1523,8 @@ class GCENodeDriver(NodeDriver):
                             status['node'] = GCEFailedNode(status['name'],
                                                            error, code)
                         else:
-                            status['node'] = self.ex_get_node(status['name'], location)
+                            status['node'] = self.ex_get_node(status['name'],
+                                                              location)
 
                 # If any of the nodes have not been created (or failed) we are
                 # not done yet.
@@ -1589,8 +1610,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
-        :return:  Tuple containg the request string, the data dictionary and the
-                  URL parameters
+        :return:  Tuple containg the request string, the data dictionary and
+                  the URL parameters
         :rtype:   ``tuple``
         """
         volume_data = {}
@@ -1614,9 +1635,8 @@ class GCENodeDriver(NodeDriver):
 
         return request, volume_data, params
 
-
     def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None):
+                      snapshot=None, use_existing=False):
         """
         Create a volume (disk).
 
@@ -1637,9 +1657,22 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
+        :keyword  use_existing: If True and a disk with the given name already
+                                exists, return an object for that disk instead
+                                of attempting to create a new disk.
+        :type     use_existing: ``bool``
+
         :return:  Storage Volume object
         :rtype:   :class:`StorageVolume`
         """
+        vol = None
+        if use_existing:
+            try:
+                vol = self.ex_get_volume(name, location)
+            except:
+                pass
+        if vol:
+            return vol
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
         self.connection.async_request(request, method='POST', data=volume_data,


[35/44] git commit: Rename nodelist to node_list

Posted by to...@apache.org.
Rename nodelist to node_list


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

Branch: refs/heads/trunk
Commit: 9e6caa7579e1874daf31fefbc8084915abd4b192
Parents: 4876970
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 08:48:58 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9e6caa75/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 5c569a4..71d2d1f 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2322,14 +2322,14 @@ class GCENodeDriver(NodeDriver):
             node.extra['boot_disk'].destroy()
         return True
 
-    def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
+    def ex_destroy_multiple_nodes(self, node_list, ignore_errors=True,
                                   destroy_boot_disk=False, poll_interval=2,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
 
-        :param  nodelist: List of nodes to destroy
-        :type   nodelist: ``list`` of :class:`Node`
+        :param  node_list: List of nodes to destroy
+        :type   node_list: ``list`` of :class:`Node`
 
         :keyword  ignore_errors: If true, don't raise an exception if one or
                                  more nodes fails to be destroyed.
@@ -2353,7 +2353,7 @@ class GCENodeDriver(NodeDriver):
         status_list = []
         complete = False
         start_time = time.time()
-        for node in nodelist:
+        for node in node_list:
             request = '/zones/%s/instances/%s' % (node.extra['zone'].name,
                                                   node.name)
             try:


[20/44] git commit: Reorder methods to put them in public/private/internal order.

Posted by to...@apache.org.
Reorder methods to put them in public/private/internal order.


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

Branch: refs/heads/trunk
Commit: c54682654dabf399a88f54372dd5278ebcdb2636
Parents: aa0bd99
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 22:58:36 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 30 22:58:36 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 938 +++++++++++++++++------------------
 1 file changed, 469 insertions(+), 469 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c5468265/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 242fe89..6315b6a 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -88,10 +88,6 @@ class GCEAddress(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEAddress id="%s" name="%s" address="%s">' % (
-            self.id, self.name, self.address)
-
     def destroy(self):
         """
         Destroy this address.
@@ -101,6 +97,10 @@ class GCEAddress(UuidMixin):
         """
         return self.driver.ex_destroy_address(address=self)
 
+    def __repr__(self):
+        return '<GCEAddress id="%s" name="%s" address="%s">' % (
+            self.id, self.name, self.address)
+
 
 class GCEFailedDisk(object):
     """Dummy Node object for disks that are not created."""
@@ -142,10 +142,6 @@ class GCEHealthCheck(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEHealthCheck id="%s" name="%s" path="%s" port="%s">' % (
-            self.id, self.name, self.path, self.port)
-
     def destroy(self):
         """
         Destroy this Health Check.
@@ -164,6 +160,10 @@ class GCEHealthCheck(UuidMixin):
         """
         return self.driver.ex_update_healthcheck(healthcheck=self)
 
+    def __repr__(self):
+        return '<GCEHealthCheck id="%s" name="%s" path="%s" port="%s">' % (
+            self.id, self.name, self.path, self.port)
+
 
 class GCEFirewall(UuidMixin):
     """A GCE Firewall rule class."""
@@ -179,10 +179,6 @@ class GCEFirewall(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEFirewall id="%s" name="%s" network="%s">' % (
-            self.id, self.name, self.network.name)
-
     def destroy(self):
         """
         Destroy this firewall.
@@ -201,6 +197,10 @@ class GCEFirewall(UuidMixin):
         """
         return self.driver.ex_update_firewall(firewall=self)
 
+    def __repr__(self):
+        return '<GCEFirewall id="%s" name="%s" network="%s">' % (
+            self.id, self.name, self.network.name)
+
 
 class GCEForwardingRule(UuidMixin):
     def __init__(self, id, name, region, address, protocol, targetpool, driver,
@@ -215,10 +215,6 @@ class GCEForwardingRule(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCEForwardingRule id="%s" name="%s" address="%s">' % (
-            self.id, self.name, self.address)
-
     def destroy(self):
         """
         Destroy this Forwarding Rule
@@ -228,6 +224,10 @@ class GCEForwardingRule(UuidMixin):
         """
         return self.driver.ex_destroy_forwarding_rule(forwarding_rule=self)
 
+    def __repr__(self):
+        return '<GCEForwardingRule id="%s" name="%s" address="%s">' % (
+            self.id, self.name, self.address)
+
 
 class GCENetwork(UuidMixin):
     """A GCE Network object class."""
@@ -239,10 +239,6 @@ class GCENetwork(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCENetwork id="%s" name="%s" cidr="%s">' % (
-            self.id, self.name, self.cidr)
-
     def destroy(self):
         """
         Destroy this newtwork
@@ -252,6 +248,10 @@ class GCENetwork(UuidMixin):
         """
         return self.driver.ex_destroy_network(network=self)
 
+    def __repr__(self):
+        return '<GCENetwork id="%s" name="%s" cidr="%s">' % (
+            self.id, self.name, self.cidr)
+
 
 class GCENodeSize(NodeSize):
     """A GCE Node Size (MachineType) class."""
@@ -314,10 +314,6 @@ class GCETargetPool(UuidMixin):
         self.extra = extra
         UuidMixin.__init__(self)
 
-    def __repr__(self):
-        return '<GCETargetPool id="%s" name="%s" region="%s">' % (
-            self.id, self.name, self.region.name)
-
     def add_node(self, node):
         """
         Add a node to this target pool.
@@ -378,6 +374,10 @@ class GCETargetPool(UuidMixin):
         """
         return self.driver.ex_destroy_targetpool(targetpool=self)
 
+    def __repr__(self):
+        return '<GCETargetPool id="%s" name="%s" region="%s">' % (
+            self.id, self.name, self.region.name)
+
 
 class GCEZone(NodeLocation):
     """Subclass of NodeLocation to provide additional information."""
@@ -391,6 +391,22 @@ class GCEZone(NodeLocation):
         super(GCEZone, self).__init__(id=str(id), name=name, country=country,
                                       driver=driver)
 
+    @property
+    def time_until_mw(self):
+        """
+        Returns the time until the next Maintenance Window as a
+        datetime.timedelta object.
+        """
+        return self._get_time_until_mw()
+
+    @property
+    def next_mw_duration(self):
+        """
+        Returns the duration of the next Maintenance Window as a
+        datetime.timedelta object.
+        """
+        return self._get_next_mw_duration()
+
     def _now(self):
         """
         Returns current UTC time.
@@ -455,22 +471,6 @@ class GCEZone(NodeLocation):
         next_end = timestamp_to_datetime(next_window['endTime'])
         return next_end - next_begin
 
-    @property
-    def time_until_mw(self):
-        """
-        Returns the time until the next Maintenance Window as a
-        datetime.timedelta object.
-        """
-        return self._get_time_until_mw()
-
-    @property
-    def next_mw_duration(self):
-        """
-        Returns the duration of the next Maintenance Window as a
-        datetime.timedelta object.
-        """
-        return self._get_next_mw_duration()
-
     def __repr__(self):
         return '<GCEZone id="%s" name="%s" status="%s">' % (self.id, self.name,
                                                             self.status)
@@ -558,182 +558,6 @@ class GCENodeDriver(NodeDriver):
         else:
             self.region = None
 
-    def _ex_connection_class_kwargs(self):
-        return {'auth_type': self.auth_type,
-                'project': self.project}
-
-    def _catch_error(self, ignore_errors=False):
-        """
-        Catch an exception and raise it unless asked to ignore it.
-
-        :keyword  ignore_errors: If true, just return the error.  Otherwise,
-                                 raise the error.
-        :type     ignore_errors: ``bool``
-
-        :return:  The exception that was raised.
-        :rtype:   :class:`Exception`
-        """
-        e = sys.exc_info()[1]
-        if ignore_errors:
-            return e
-        else:
-            raise e
-
-    def _get_components_from_path(self, path):
-        """
-        Return a dictionary containing name & zone/region from a request path.
-
-        :param  path: HTTP request path (e.g.
-                      '/project/pjt-name/zones/us-central1-a/instances/mynode')
-        :type   path: ``str``
-
-        :return:  Dictionary containing name and zone/region of resource
-        :rtype    ``dict``
-        """
-        region = None
-        zone = None
-        glob = False
-        components = path.split('/')
-        name = components[-1]
-        if components[-4] == 'regions':
-            region = components[-3]
-        elif components[-4] == 'zones':
-            zone = components[-3]
-        elif components[-3] == 'global':
-            glob = True
-
-        return {'name': name, 'region': region, 'zone': zone, 'global': glob}
-
-    def _get_region_from_zone(self, zone):
-        """
-        Return the Region object that contains the given Zone object.
-
-        :param  zone: Zone object
-        :type   zone: :class:`GCEZone`
-
-        :return:  Region object that contains the zone
-        :rtype:   :class:`GCERegion`
-        """
-        for region in self.region_list:
-            zones = [z.name for z in region.zones]
-            if zone.name in zones:
-                return region
-
-    def _find_zone_or_region(self, name, res_type, region=False,
-                             res_name=None):
-        """
-        Find the zone or region for a named resource.
-
-        :param  name: Name of resource to find
-        :type   name: ``str``
-
-        :param  res_type: Type of resource to find.
-                          Examples include: 'disks', 'instances' or 'addresses'
-        :type   res_type: ``str``
-
-        :keyword  region: If True, search regions instead of zones
-        :type     region: ``bool``
-
-        :keyword  res_name: The name of the resource type for error messages.
-                            Examples: 'Volume', 'Node', 'Address'
-        :keyword  res_name: ``str``
-
-        :return:  Zone/Region object for the zone/region for the resource.
-        :rtype:   :class:`GCEZone` or :class:`GCERegion`
-        """
-        if region:
-            rz = 'region'
-        else:
-            rz = 'zone'
-        rz_name = None
-        res_name = res_name or res_type
-        request = '/aggregated/%s' % (res_type)
-        res_list = self.connection.request(request).object
-        for k, v in res_list['items'].items():
-            for res in v.get(res_type, []):
-                if res['name'] == name:
-                    rz_name = k.replace('%ss/' % (rz), '')
-                    break
-        if not rz_name:
-            raise ResourceNotFoundError(
-                '%s \'%s\' not found in any %s.' % (res_name, name, rz),
-                None, None)
-        else:
-            getrz = getattr(self, 'ex_get_%s' % (rz))
-            return getrz(rz_name)
-
-    def _match_images(self, project, partial_name):
-        """
-        Find the latest image, given a partial name.
-
-        For example, providing 'debian-7' will return the image object for the
-        most recent image with a name that starts with 'debian-7' in the
-        supplied project.  If no project is given, it will search your own
-        project.
-
-        :param  project:  The name of the project to search for images.
-                          Examples include: 'debian-cloud' and 'centos-cloud'.
-        :type   project:  ``str`` or ``None``
-
-        :param  partial_name: The full name or beginning of a name for an
-                              image.
-        :type   partial_name: ``str``
-
-        :return:  The latest image object that maches the partial name or None
-                  if no matching image is found.
-        :rtype:   :class:`NodeImage` or ``None``
-        """
-        project_images = self.list_images(project)
-        partial_match = []
-        for image in project_images:
-            if image.name == partial_name:
-                return image
-            if image.name.startswith(partial_name):
-                ts = timestamp_to_datetime(image.extra['creationTimestamp'])
-                if not partial_match or partial_match[0] < ts:
-                    partial_match = [ts, image]
-
-        if partial_match:
-            return partial_match[1]
-
-    def _set_region(self, region):
-        """
-        Return the region to use for listing resources.
-
-        :param  region: A name, region object, None, or 'all'
-        :type   region: ``str`` or :class:`GCERegion` or ``None``
-
-        :return:  A region object or None if all regions should be considered
-        :rtype:   :class:`GCERegion` or ``None``
-        """
-        region = region or self.region
-
-        if region == 'all' or region is None:
-            return None
-
-        if not hasattr(region, 'name'):
-            region = self.ex_get_region(region)
-        return region
-
-    def _set_zone(self, zone):
-        """
-        Return the zone to use for listing resources.
-
-        :param  zone: A name, zone object, None, or 'all'
-        :type   region: ``str`` or :class:`GCEZone` or ``None``
-
-        :return:  A zone object or None if all zones should be considered
-        :rtype:   :class:`GCEZone` or ``None``
-        """
-        zone = zone or self.zone
-
-        if zone == 'all' or zone is None:
-            return None
-
-        if not hasattr(zone, 'name'):
-            zone = self.ex_get_zone(zone)
-        return zone
-
     def ex_list_addresses(self, region=None):
         """
         Return a list of static addreses for a region or all.
@@ -1267,71 +1091,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_network(name)
 
-    def _create_node_req(self, name, size, image, location, network,
-                         tags=None, metadata=None, boot_disk=None):
-        """
-        Returns a request and body to create a new node.  This is a helper
-        method to suppor both :class:`create_node` and
-        :class:`ex_create_multiple_nodes`.
-
-        :param  name: The name of the node to create.
-        :type   name: ``str``
-
-        :param  size: The machine type to use.
-        :type   size: :class:`GCENodeSize`
-
-        :param  image: The image to use to create the node (or, if using a
-                       persistent disk, the image the disk was created from).
-        :type   image: :class:`NodeImage`
-
-        :param  location: The location (zone) to create the node in.
-        :type   location: :class:`NodeLocation` or :class:`GCEZone`
-
-        :param  network: The network to associate with the node.
-        :type   network: :class:`GCENetwork`
-
-        :keyword  tags: A list of tags to assiciate with the node.
-        :type     tags: ``list`` of ``str``
-
-        :keyword  metadata: Metadata dictionary for instance.
-        :type     metadata: ``dict``
-
-        :keyword  boot_disk:  Persistent boot disk to attach.
-        :type     :class:`StorageVolume`
-
-        :return:  A tuple containing a request string and a node_data dict.
-        :rtype:   ``tuple`` of ``str`` and ``dict``
-        """
-        node_data = {}
-        node_data['machineType'] = size.extra['selfLink']
-        node_data['name'] = name
-        if tags:
-            node_data['tags'] = {'items': tags}
-        if metadata:
-            node_data['metadata'] = metadata
-
-        if boot_disk:
-            disks = [{'kind': 'compute#attachedDisk',
-                      'boot': True,
-                      'type': 'PERSISTENT',
-                      'mode': 'READ_WRITE',
-                      'deviceName': boot_disk.name,
-                      'zone': boot_disk.extra['zone'].extra['selfLink'],
-                      'source': boot_disk.extra['selfLink']}]
-            node_data['disks'] = disks
-        else:
-            node_data['image'] = image.extra['selfLink']
-
-        ni = [{'kind': 'compute#instanceNetworkInterface',
-               'accessConfigs': [{'name': 'External NAT',
-                                  'type': 'ONE_TO_ONE_NAT'}],
-               'network': network.extra['selfLink']}]
-        node_data['networkInterfaces'] = ni
-
-        request = '/zones/%s/instances' % (location.name)
-
-        return request, node_data
-
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
                     ex_boot_disk=None, use_existing_disk=True):
@@ -1395,139 +1154,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
-    def _multi_create_disk(self, status, node_attrs):
-        """Create disk for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        disk = None
-        # Check for existing disk
-        if node_attrs['use_existing_disk']:
-            try:
-                disk = self.ex_get_volume(status['name'],
-                                          node_attrs['location'])
-            except ResourceNotFoundError:
-                pass
-
-        if disk:
-            status['disk'] = disk
-        else:
-            # Create disk and return response object back in the status dict.
-            # Or, if there is an error, mark as failed.
-            disk_req, disk_data, disk_params = self._create_vol_req(
-                None, status['name'], location=node_attrs['location'],
-                image=node_attrs['image'])
-            try:
-                disk_res = self.connection.request(
-                    disk_req, method='POST', data=disk_data,
-                    params=disk_params).object
-            except GoogleBaseError:
-                e = self._catch_error(
-                    ignore_errors=node_attrs['ignore_errors'])
-                error = e.value
-                code = e.code
-                disk_res = None
-                status['disk'] = GCEFailedDisk(status['name'],
-                                               error, code)
-            status['disk_response'] = disk_res
-
-    def _multi_check_disk(self, status, node_attrs):
-        """Check disk status for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        error = None
-        try:
-            response = self.connection.request(
-                status['disk_response']['selfLink']).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            response = {'status': 'DONE'}
-        if response['status'] == 'DONE':
-            status['disk_response'] = None
-            if error:
-                status['disk'] = GCEFailedDisk(status['name'], error, code)
-            else:
-                status['disk'] = self.ex_get_volume(status['name'],
-                                                    node_attrs['location'])
-
-    def _multi_create_node(self, status, node_attrs):
-        """Create node for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        # If disk has an error, set the node as failed and return
-        if hasattr(status['disk'], 'error'):
-            status['node'] = status['disk']
-            return
-
-        # Create node and return response object in status dictionary.
-        # Or, if there is an error, mark as failed.
-        request, node_data = self._create_node_req(
-            status['name'], node_attrs['size'], node_attrs['image'],
-            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
-            node_attrs['metadata'], boot_disk=status['disk'])
-        try:
-            node_res = self.connection.request(
-                request, method='POST', data=node_data).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            node_res = None
-            status['node'] = GCEFailedNode(status['name'],
-                                           error, code)
-        status['node_response'] = node_res
-
-    def _multi_check_node(self, status, node_attrs):
-        """Check node status for ex_create_multiple_nodes.
-
-        :param  status: Dictionary for holding node/disk creation status.
-                        (This dictionary is modified by this method)
-        :type   status: ``dict``
-
-        :param  node_attrs: Dictionary for holding node attribute information.
-                            (size, image, location, etc.)
-        :type   node_attrs: ``dict``
-        """
-        error = None
-        try:
-            response = self.connection.request(
-                status['node_response']['selfLink']).object
-        except GoogleBaseError:
-            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
-            error = e.value
-            code = e.code
-            response = {'status': 'DONE'}
-        if response['status'] == 'DONE':
-            status['node_response'] = None
-        if error:
-            status['node'] = GCEFailedNode(status['name'],
-                                           error, code)
-        else:
-            status['node'] = self.ex_get_node(status['name'],
-                                              node_attrs['location'])
-
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
@@ -1706,61 +1332,6 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def _create_vol_req(self, size, name, location=None, snapshot=None,
-                        image=None):
-        """
-        Assemble the request/data for creating a volume.
-
-        Used by create_volume and ex_create_multiple_nodes
-
-        :param  size: Size of volume to create (in GB). Can be None if image
-                      or snapshot is supplied.
-        :type   size: ``int`` or ``str`` or ``None``
-
-        :param  name: Name of volume to create
-        :type   name: ``str``
-
-        :keyword  location: Location (zone) to create the volume in
-        :type     location: ``str`` or :class:`GCEZone` or
-                            :class:`NodeLocation` or ``None``
-
-        :keyword  snapshot: Snapshot to create image from
-        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
-
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
-        :return:  Tuple containg the request string, the data dictionary and
-                  the URL parameters
-        :rtype:   ``tuple``
-        """
-        volume_data = {}
-        params = None
-        volume_data['name'] = name
-        if size:
-            volume_data['sizeGb'] = str(size)
-        if image:
-            if not hasattr(image, 'name'):
-                image = self.ex_get_image(image)
-            params = {'sourceImage': image.extra['selfLink']}
-            volume_data['description'] = 'Image: %s' % (
-                image.extra['selfLink'])
-        if snapshot:
-            if not hasattr(snapshot, 'name'):
-                # Check for full URI to not break backward-compatibility
-                if snapshot.startswith('https'):
-                    snapshot = self._get_components_from_path(snapshot)['name']
-                snapshot = self.ex_get_snapshot(snapshot)
-            snapshot_link = snapshot.extra['selfLink']
-            volume_data['sourceSnapshot'] = snapshot_link
-            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
-        location = location or self.zone
-        if not hasattr(location, 'name'):
-            location = self.ex_get_zone(location)
-        request = '/zones/%s/disks' % (location.name)
-
-        return request, volume_data, params
-
     def create_volume(self, size, name, location=None, snapshot=None,
                       image=None, use_existing=True):
         """
@@ -2734,6 +2305,435 @@ class GCENodeDriver(NodeDriver):
             return None
         return self._to_zone(response)
 
+    def _ex_connection_class_kwargs(self):
+        return {'auth_type': self.auth_type,
+                'project': self.project}
+
+    def _catch_error(self, ignore_errors=False):
+        """
+        Catch an exception and raise it unless asked to ignore it.
+
+        :keyword  ignore_errors: If true, just return the error.  Otherwise,
+                                 raise the error.
+        :type     ignore_errors: ``bool``
+
+        :return:  The exception that was raised.
+        :rtype:   :class:`Exception`
+        """
+        e = sys.exc_info()[1]
+        if ignore_errors:
+            return e
+        else:
+            raise e
+
+    def _get_components_from_path(self, path):
+        """
+        Return a dictionary containing name & zone/region from a request path.
+
+        :param  path: HTTP request path (e.g.
+                      '/project/pjt-name/zones/us-central1-a/instances/mynode')
+        :type   path: ``str``
+
+        :return:  Dictionary containing name and zone/region of resource
+        :rtype    ``dict``
+        """
+        region = None
+        zone = None
+        glob = False
+        components = path.split('/')
+        name = components[-1]
+        if components[-4] == 'regions':
+            region = components[-3]
+        elif components[-4] == 'zones':
+            zone = components[-3]
+        elif components[-3] == 'global':
+            glob = True
+
+        return {'name': name, 'region': region, 'zone': zone, 'global': glob}
+
+    def _get_region_from_zone(self, zone):
+        """
+        Return the Region object that contains the given Zone object.
+
+        :param  zone: Zone object
+        :type   zone: :class:`GCEZone`
+
+        :return:  Region object that contains the zone
+        :rtype:   :class:`GCERegion`
+        """
+        for region in self.region_list:
+            zones = [z.name for z in region.zones]
+            if zone.name in zones:
+                return region
+
+    def _find_zone_or_region(self, name, res_type, region=False,
+                             res_name=None):
+        """
+        Find the zone or region for a named resource.
+
+        :param  name: Name of resource to find
+        :type   name: ``str``
+
+        :param  res_type: Type of resource to find.
+                          Examples include: 'disks', 'instances' or 'addresses'
+        :type   res_type: ``str``
+
+        :keyword  region: If True, search regions instead of zones
+        :type     region: ``bool``
+
+        :keyword  res_name: The name of the resource type for error messages.
+                            Examples: 'Volume', 'Node', 'Address'
+        :keyword  res_name: ``str``
+
+        :return:  Zone/Region object for the zone/region for the resource.
+        :rtype:   :class:`GCEZone` or :class:`GCERegion`
+        """
+        if region:
+            rz = 'region'
+        else:
+            rz = 'zone'
+        rz_name = None
+        res_name = res_name or res_type
+        request = '/aggregated/%s' % (res_type)
+        res_list = self.connection.request(request).object
+        for k, v in res_list['items'].items():
+            for res in v.get(res_type, []):
+                if res['name'] == name:
+                    rz_name = k.replace('%ss/' % (rz), '')
+                    break
+        if not rz_name:
+            raise ResourceNotFoundError(
+                '%s \'%s\' not found in any %s.' % (res_name, name, rz),
+                None, None)
+        else:
+            getrz = getattr(self, 'ex_get_%s' % (rz))
+            return getrz(rz_name)
+
+    def _match_images(self, project, partial_name):
+        """
+        Find the latest image, given a partial name.
+
+        For example, providing 'debian-7' will return the image object for the
+        most recent image with a name that starts with 'debian-7' in the
+        supplied project.  If no project is given, it will search your own
+        project.
+
+        :param  project:  The name of the project to search for images.
+                          Examples include: 'debian-cloud' and 'centos-cloud'.
+        :type   project:  ``str`` or ``None``
+
+        :param  partial_name: The full name or beginning of a name for an
+                              image.
+        :type   partial_name: ``str``
+
+        :return:  The latest image object that maches the partial name or None
+                  if no matching image is found.
+        :rtype:   :class:`NodeImage` or ``None``
+        """
+        project_images = self.list_images(project)
+        partial_match = []
+        for image in project_images:
+            if image.name == partial_name:
+                return image
+            if image.name.startswith(partial_name):
+                ts = timestamp_to_datetime(image.extra['creationTimestamp'])
+                if not partial_match or partial_match[0] < ts:
+                    partial_match = [ts, image]
+
+        if partial_match:
+            return partial_match[1]
+
+    def _set_region(self, region):
+        """
+        Return the region to use for listing resources.
+
+        :param  region: A name, region object, None, or 'all'
+        :type   region: ``str`` or :class:`GCERegion` or ``None``
+
+        :return:  A region object or None if all regions should be considered
+        :rtype:   :class:`GCERegion` or ``None``
+        """
+        region = region or self.region
+
+        if region == 'all' or region is None:
+            return None
+
+        if not hasattr(region, 'name'):
+            region = self.ex_get_region(region)
+        return region
+
+    def _set_zone(self, zone):
+        """
+        Return the zone to use for listing resources.
+
+        :param  zone: A name, zone object, None, or 'all'
+        :type   region: ``str`` or :class:`GCEZone` or ``None``
+
+        :return:  A zone object or None if all zones should be considered
+        :rtype:   :class:`GCEZone` or ``None``
+        """
+        zone = zone or self.zone
+
+        if zone == 'all' or zone is None:
+            return None
+
+        if not hasattr(zone, 'name'):
+            zone = self.ex_get_zone(zone)
+        return zone
+
+    def _create_node_req(self, name, size, image, location, network,
+                         tags=None, metadata=None, boot_disk=None):
+        """
+        Returns a request and body to create a new node.  This is a helper
+        method to suppor both :class:`create_node` and
+        :class:`ex_create_multiple_nodes`.
+
+        :param  name: The name of the node to create.
+        :type   name: ``str``
+
+        :param  size: The machine type to use.
+        :type   size: :class:`GCENodeSize`
+
+        :param  image: The image to use to create the node (or, if using a
+                       persistent disk, the image the disk was created from).
+        :type   image: :class:`NodeImage`
+
+        :param  location: The location (zone) to create the node in.
+        :type   location: :class:`NodeLocation` or :class:`GCEZone`
+
+        :param  network: The network to associate with the node.
+        :type   network: :class:`GCENetwork`
+
+        :keyword  tags: A list of tags to assiciate with the node.
+        :type     tags: ``list`` of ``str``
+
+        :keyword  metadata: Metadata dictionary for instance.
+        :type     metadata: ``dict``
+
+        :keyword  boot_disk:  Persistent boot disk to attach.
+        :type     :class:`StorageVolume`
+
+        :return:  A tuple containing a request string and a node_data dict.
+        :rtype:   ``tuple`` of ``str`` and ``dict``
+        """
+        node_data = {}
+        node_data['machineType'] = size.extra['selfLink']
+        node_data['name'] = name
+        if tags:
+            node_data['tags'] = {'items': tags}
+        if metadata:
+            node_data['metadata'] = metadata
+
+        if boot_disk:
+            disks = [{'kind': 'compute#attachedDisk',
+                      'boot': True,
+                      'type': 'PERSISTENT',
+                      'mode': 'READ_WRITE',
+                      'deviceName': boot_disk.name,
+                      'zone': boot_disk.extra['zone'].extra['selfLink'],
+                      'source': boot_disk.extra['selfLink']}]
+            node_data['disks'] = disks
+        else:
+            node_data['image'] = image.extra['selfLink']
+
+        ni = [{'kind': 'compute#instanceNetworkInterface',
+               'accessConfigs': [{'name': 'External NAT',
+                                  'type': 'ONE_TO_ONE_NAT'}],
+               'network': network.extra['selfLink']}]
+        node_data['networkInterfaces'] = ni
+
+        request = '/zones/%s/instances' % (location.name)
+
+        return request, node_data
+
+    def _multi_create_disk(self, status, node_attrs):
+        """Create disk for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        disk = None
+        # Check for existing disk
+        if node_attrs['use_existing_disk']:
+            try:
+                disk = self.ex_get_volume(status['name'],
+                                          node_attrs['location'])
+            except ResourceNotFoundError:
+                pass
+
+        if disk:
+            status['disk'] = disk
+        else:
+            # Create disk and return response object back in the status dict.
+            # Or, if there is an error, mark as failed.
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, status['name'], location=node_attrs['location'],
+                image=node_attrs['image'])
+            try:
+                disk_res = self.connection.request(
+                    disk_req, method='POST', data=disk_data,
+                    params=disk_params).object
+            except GoogleBaseError:
+                e = self._catch_error(
+                    ignore_errors=node_attrs['ignore_errors'])
+                error = e.value
+                code = e.code
+                disk_res = None
+                status['disk'] = GCEFailedDisk(status['name'],
+                                               error, code)
+            status['disk_response'] = disk_res
+
+    def _multi_check_disk(self, status, node_attrs):
+        """Check disk status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['disk_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['disk_response'] = None
+            if error:
+                status['disk'] = GCEFailedDisk(status['name'], error, code)
+            else:
+                status['disk'] = self.ex_get_volume(status['name'],
+                                                    node_attrs['location'])
+
+    def _multi_create_node(self, status, node_attrs):
+        """Create node for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        # If disk has an error, set the node as failed and return
+        if hasattr(status['disk'], 'error'):
+            status['node'] = status['disk']
+            return
+
+        # Create node and return response object in status dictionary.
+        # Or, if there is an error, mark as failed.
+        request, node_data = self._create_node_req(
+            status['name'], node_attrs['size'], node_attrs['image'],
+            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
+            node_attrs['metadata'], boot_disk=status['disk'])
+        try:
+            node_res = self.connection.request(
+                request, method='POST', data=node_data).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            node_res = None
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        status['node_response'] = node_res
+
+    def _multi_check_node(self, status, node_attrs):
+        """Check node status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['node_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['node_response'] = None
+        if error:
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        else:
+            status['node'] = self.ex_get_node(status['name'],
+                                              node_attrs['location'])
+
+    def _create_vol_req(self, size, name, location=None, snapshot=None,
+                        image=None):
+        """
+        Assemble the request/data for creating a volume.
+
+        Used by create_volume and ex_create_multiple_nodes
+
+        :param  size: Size of volume to create (in GB). Can be None if image
+                      or snapshot is supplied.
+        :type   size: ``int`` or ``str`` or ``None``
+
+        :param  name: Name of volume to create
+        :type   name: ``str``
+
+        :keyword  location: Location (zone) to create the volume in
+        :type     location: ``str`` or :class:`GCEZone` or
+                            :class:`NodeLocation` or ``None``
+
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
+
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
+        :return:  Tuple containg the request string, the data dictionary and
+                  the URL parameters
+        :rtype:   ``tuple``
+        """
+        volume_data = {}
+        params = None
+        volume_data['name'] = name
+        if size:
+            volume_data['sizeGb'] = str(size)
+        if image:
+            if not hasattr(image, 'name'):
+                image = self.ex_get_image(image)
+            params = {'sourceImage': image.extra['selfLink']}
+            volume_data['description'] = 'Image: %s' % (
+                image.extra['selfLink'])
+        if snapshot:
+            if not hasattr(snapshot, 'name'):
+                # Check for full URI to not break backward-compatibility
+                if snapshot.startswith('https'):
+                    snapshot = self._get_components_from_path(snapshot)['name']
+                snapshot = self.ex_get_snapshot(snapshot)
+            snapshot_link = snapshot.extra['selfLink']
+            volume_data['sourceSnapshot'] = snapshot_link
+            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
+        location = location or self.zone
+        if not hasattr(location, 'name'):
+            location = self.ex_get_zone(location)
+        request = '/zones/%s/disks' % (location.name)
+
+        return request, volume_data, params
+
     def _to_address(self, address):
         """
         Return an Address object from the json-response dictionary.


[12/44] git commit: One more lint fix

Posted by to...@apache.org.
One more lint fix


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

Branch: refs/heads/trunk
Commit: fc59dd82ed110bc7830067c284cb380b15f95c48
Parents: 53de72e
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 14:13:47 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 14:13:47 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/fc59dd82/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index fd6c2e7..ca157f6 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1498,7 +1498,7 @@ class GCENodeDriver(NodeDriver):
                     code = e.code
                     disk_res = None
                     status['disk'] = GCEFailedDisk(status['name'],
-                                                    error, code)
+                                                   error, code)
                 status['disk_response'] = disk_res
 
             status_list.append(status)


[21/44] git commit: Add list_volume_snapshots method to help fill out the API. This is not an efficient method, but in GCE snapshots are not keyed on the volumes they are created from.

Posted by to...@apache.org.
Add list_volume_snapshots method to help fill out the API.
This is not an efficient method, but in GCE snapshots are not keyed on the volumes they are created from.


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

Branch: refs/heads/trunk
Commit: ce2fc3cb54436e95d78b6823febb596acbbfbf6c
Parents: c546826
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 23:40:22 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 30 23:40:22 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce2fc3cb/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 6315b6a..6573590 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1393,6 +1393,28 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_snapshot(name)
 
+    def list_volume_snapshots(self, volume):
+        """
+        List snapshots created from the provided volume.
+
+        For GCE, snapshots are global, but while the volume they were
+        created from still exists, the source disk for the snapshot is
+        tracked.
+
+        :param  volume: A StorageVolume object
+        :type   volume: :class:`StorageVolume`
+
+        :return:  A list of Snapshot objects
+        :rtype:   ``list`` of :class:`GCESnapshot`
+        """
+        volume_snapshots = []
+        volume_link = volume.extra['selfLink']
+        all_snapshots = self.ex_list_snapshots()
+        for snapshot in all_snapshots:
+            if snapshot.extra['sourceDisk'] == volume_link:
+                volume_snapshots.append(snapshot)
+        return volume_snapshots
+
     def ex_update_healthcheck(self, healthcheck):
         """
         Update a health check with new values.


[26/44] git commit: Add Snapshots to demo code and a snapshot fix

Posted by to...@apache.org.
Add Snapshots to demo code and a snapshot fix


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

Branch: refs/heads/trunk
Commit: 65f8c2db12ecb67b7cae1c259710a98f8f52d0a9
Parents: adb9aca
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 10:30:49 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 demos/gce_demo.py               | 34 ++++++++++++++++++++++++++--------
 libcloud/compute/drivers/gce.py | 13 ++++++-------
 2 files changed, 32 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/65f8c2db/demos/gce_demo.py
----------------------------------------------------------------------
diff --git a/demos/gce_demo.py b/demos/gce_demo.py
index b6f2cb4..5f45c68 100755
--- a/demos/gce_demo.py
+++ b/demos/gce_demo.py
@@ -180,14 +180,17 @@ def main():
     zones = gce.ex_list_zones()
     display('Zones', zones)
 
+    snapshots = gce.ex_list_snapshots()
+    display('Snapshots', snapshots)
+
     # == Clean up any old demo resources ==
     print('Cleaning up any "%s" resources:' % DEMO_BASE_NAME)
     clean_up(gce, DEMO_BASE_NAME, all_nodes,
-             all_addresses + all_volumes + firewalls + networks)
+             all_addresses + all_volumes + firewalls + networks + snapshots)
 
-    # == Create Node with non-persistent disk ==
+    # == Create Node with disk auto-created ==
     if MAX_NODES > 1:
-        print('Creating Node with non-persistent disk:')
+        print('Creating Node with auto-created disk:')
         name = '%s-np-node' % DEMO_BASE_NAME
         node_1 = gce.create_node(name, 'n1-standard-1', 'debian-7',
                                  ex_tags=['libcloud'])
@@ -205,17 +208,29 @@ def main():
             if gce.detach_volume(volume, ex_node=node_1):
                 print('   Detached %s from %s' % (volume.name, node_1.name))
 
-    # == Create Node with persistent disk ==
-    print('Creating Node with Persistent disk:')
+    # == Create Snapshot ==
+    print('Creating a snapshot from existing disk:')
+    # Create a disk to snapshot
+    vol_name = '%s-snap-template' % DEMO_BASE_NAME
+    image = gce.ex_get_image('debian-7')
+    vol = gce.create_volume(None, vol_name, image=image)
+    print('   Created disk %s to shapshot' % DEMO_BASE_NAME)
+    # Snapshot volume
+    snapshot = vol.snapshot('%s-snapshot' % DEMO_BASE_NAME)
+    print('   Snapshot %s created' % snapshot.name)
+
+    # == Create Node with existing disk ==
+    print('Creating Node with existing disk:')
     name = '%s-persist-node' % DEMO_BASE_NAME
     # Use objects this time instead of names
     # Get latest Debian 7 image
     image = gce.ex_get_image('debian-7')
     # Get Machine Size
     size = gce.ex_get_size('n1-standard-1')
-    # Create Disk.  Size is None to just take default of image
+    # Create Disk from Snapshot created above
     volume_name = '%s-boot-disk' % DEMO_BASE_NAME
-    volume = gce.create_volume(None, volume_name, image=image)
+    volume = gce.create_volume(None, volume_name, snapshot=snapshot)
+    print('   Created %s from snapshot' % volume.name)
     # Create Node with Disk
     node_2 = gce.create_node(name, size, image, ex_tags=['libcloud'],
                              ex_boot_disk=volume)
@@ -282,10 +297,13 @@ def main():
     networks = gce.ex_list_networks()
     display('Networks', networks)
 
+    snapshots = gce.ex_list_snapshots()
+    display('Snapshots', snapshots)
+
     if CLEANUP:
         print('Cleaning up %s resources created.' % DEMO_BASE_NAME)
         clean_up(gce, DEMO_BASE_NAME, nodes,
-                 addresses + volumes + firewalls + networks)
+                 addresses + volumes + firewalls + networks + snapshots)
 
 if __name__ == '__main__':
     main()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/65f8c2db/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index cc1ef36..fef1b98 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1653,13 +1653,12 @@ class GCENodeDriver(NodeDriver):
             volume_data['description'] = 'Image: %s' % (
                 image.extra['selfLink'])
         if snapshot:
-            # Check for full URI to not break backward-compatibility
-            if snapshot.startswith('https'):
-                snapshot_link = snapshot
-            else:
-                if not hasattr(snapshot, 'name'):
-                    snapshot = self.ex_get_snapshot(snapshot)
-                snapshot_link = snapshot.extra['selfLink']
+            if not hasattr(snapshot, 'name'):
+                # Check for full URI to not break backward-compatibility
+                if snapshot.startswith('https'):
+                    snapshot = self._get_components_from_path(snapshot)['name']
+                snapshot = self.ex_get_snapshot(snapshot)
+            snapshot_link = snapshot.extra['selfLink']
             volume_data['sourceSnapshot'] = snapshot_link
             volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
         location = location or self.zone


[23/44] git commit: Tests for Snapshots (plus fix for list_targetpools test)

Posted by to...@apache.org.
Tests for Snapshots (plus fix for list_targetpools test)


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

Branch: refs/heads/trunk
Commit: 5ea7189303d52708c661374b69b9b7bd91cb596a
Parents: 6e3c105
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 13:28:33 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 .../compute/fixtures/gce/global_snapshots.json  | 31 +++++++++
 .../gce/global_snapshots_lcsnapshot.json        | 12 ++++
 .../gce/global_snapshots_lcsnapshot_delete.json | 14 ++++
 ...tion_global_snapshots_lcsnapshot_delete.json | 15 +++++
 ...ral1-a_disks_lcdisk_createSnapshot_post.json | 16 +++++
 ...ral1-a_disks_lcdisk_createSnapshot_post.json | 15 +++++
 libcloud/test/compute/test_gce.py               | 70 ++++++++++++++++++--
 7 files changed, 167 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/global_snapshots.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots.json b/libcloud/test/compute/fixtures/gce/global_snapshots.json
new file mode 100644
index 0000000..d839107
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots.json
@@ -0,0 +1,31 @@
+{
+  "id": "projects/project_name/global/snapshots",
+  "items": [
+    {
+      "creationTimestamp": "2013-12-16T13:03:51.345-08:00",
+      "description": "",
+      "diskSizeGb": "1",
+      "id": "17482266715940883688",
+      "kind": "compute#snapshot",
+      "name": "lcsnapshot",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+      "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+      "sourceDiskId": "-2511816066479461182",
+      "status": "READY"
+    },
+    {
+      "creationTimestamp": "2013-12-16T12:48:12.557-08:00",
+      "description": "",
+      "diskSizeGb": "10",
+      "id": "3341332334980930052",
+      "kind": "compute#snapshot",
+      "name": "libcloud-demo-snapshot",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/libcloud-demo-snapshot",
+      "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-snap-template",
+      "sourceDiskId": "-6245698478147030397",
+      "status": "READY"
+    }
+  ],
+  "kind": "compute#snapshotList",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
new file mode 100644
index 0000000..9b071a9
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot.json
@@ -0,0 +1,12 @@
+{
+  "creationTimestamp": "2013-12-16T13:03:51.345-08:00",
+  "description": "",
+  "diskSizeGb": "1",
+  "id": "17482266715940883688",
+  "kind": "compute#snapshot",
+  "name": "lcsnapshot",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "sourceDisk": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "sourceDiskId": "-2511816066479461182",
+  "status": "READY"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
new file mode 100644
index 0000000..59cd70c
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/global_snapshots_lcsnapshot_delete.json
@@ -0,0 +1,14 @@
+{
+  "id": "5994251357251874363",
+  "insertTime": "2013-12-16T13:04:03.831-08:00",
+  "kind": "compute#operation",
+  "name": "operation-global_snapshots_lcsnapshot_delete",
+  "operationType": "delete",
+  "progress": 0,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_snapshots_lcsnapshot_delete",
+  "startTime": "2013-12-16T13:04:03.924-08:00",
+  "status": "PENDING",
+  "targetId": "17482266715940883688",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
new file mode 100644
index 0000000..e869f26
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_snapshots_lcsnapshot_delete.json
@@ -0,0 +1,15 @@
+{
+  "endTime": "2013-12-16T13:04:11.565-08:00",
+  "id": "5994251357251874363",
+  "insertTime": "2013-12-16T13:04:03.831-08:00",
+  "kind": "compute#operation",
+  "name": "operation-global_snapshots_lcsnapshot_delete",
+  "operationType": "delete",
+  "progress": 100,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_snapshots_lcsnapshot_delete",
+  "startTime": "2013-12-16T13:04:03.924-08:00",
+  "status": "DONE",
+  "targetId": "17482266715940883688",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/snapshots/lcsnapshot",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
new file mode 100644
index 0000000..f765ebf
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
@@ -0,0 +1,16 @@
+{
+  "endTime": "2013-12-16T13:04:01.580-08:00",
+  "id": "0158330665043557584",
+  "insertTime": "2013-12-16T13:03:51.000-08:00",
+  "kind": "compute#operation",
+  "name": "operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "operationType": "createSnapshot",
+  "progress": 100,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "startTime": "2013-12-16T13:03:51.042-08:00",
+  "status": "DONE",
+  "targetId": "07494414044179227172",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
new file mode 100644
index 0000000..97be56a
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_disks_lcdisk_createSnapshot_post.json
@@ -0,0 +1,15 @@
+{
+  "id": "0158330665043557584",
+  "insertTime": "2013-12-16T13:03:51.000-08:00",
+  "kind": "compute#operation",
+  "name": "operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "operationType": "createSnapshot",
+  "progress": 0,
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_createSnapshot_post",
+  "startTime": "2013-12-16T13:03:51.042-08:00",
+  "status": "PENDING",
+  "targetId": "07494414044179227172",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "user": "487551519631-t6qvu2na6p4u9ptm46bsdujf0ohbdro7@developer.gserviceaccount.com",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5ea71893/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 3462f64..31f35bf 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -168,15 +168,20 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(regions), 3)
         self.assertEqual(regions[0].name, 'europe-west1')
 
-    def ex_list_targetpools(self):
+    def test_ex_list_snapshots(self):
+        snapshots = self.driver.ex_list_snapshots()
+        self.assertEqual(len(snapshots), 2)
+        self.assertEqual(snapshots[0].name, 'lcsnapshot')
+
+    def test_ex_list_targetpools(self):
         target_pools = self.driver.ex_list_targetpools()
         target_pools_all = self.driver.ex_list_targetpools('all')
         target_pools_uc1 = self.driver.ex_list_targetpools('us-central1')
-        self.assertEqual(len(target_pools), 3)
-        self.assertEqual(len(target_pools_all), 4)
-        self.assertEqual(len(target_pools_uc1), 3)
-        self.assertEqual(target_pools[0].name, 'www-pool')
-        self.assertEqual(target_pools_uc1[0].name, 'www-pool')
+        self.assertEqual(len(target_pools), 2)
+        self.assertEqual(len(target_pools_all), 3)
+        self.assertEqual(len(target_pools_uc1), 2)
+        self.assertEqual(target_pools[0].name, 'lctargetpool')
+        self.assertEqual(target_pools_uc1[0].name, 'lctargetpool')
         names = [t.name for t in target_pools_all]
         self.assertTrue('www-pool' in names)
 
@@ -319,6 +324,13 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(targetpool.nodes), len(nodes))
         self.assertEqual(targetpool.region.name, region)
 
+    def test_ex_create_volume_snapshot(self):
+        snapshot_name = 'lcsnapshot'
+        volume = self.driver.ex_get_volume('lcdisk')
+        snapshot = volume.snapshot(snapshot_name)
+        self.assertEqual(snapshot.name, snapshot_name)
+        self.assertEqual(snapshot.size, '1')
+
     def test_create_volume(self):
         volume_name = 'lcdisk'
         size = 1
@@ -442,6 +454,11 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         destroyed = disk.destroy()
         self.assertTrue(destroyed)
 
+    def test_destroy_volume_snapshot(self):
+        snapshot = self.driver.ex_get_snapshot('lcsnapshot')
+        destroyed = snapshot.destroy()
+        self.assertTrue(destroyed)
+
     def test_ex_get_address(self):
         address_name = 'lcaddress'
         address = self.driver.ex_get_address(address_name)
@@ -535,6 +552,13 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         self.assertEqual(len(targetpool.nodes), 2)
         self.assertEqual(targetpool.region.name, 'us-central1')
 
+    def test_ex_get_snapshot(self):
+        snapshot_name = 'lcsnapshot'
+        snapshot = self.driver.ex_get_snapshot(snapshot_name)
+        self.assertEqual(snapshot.name, snapshot_name)
+        self.assertEqual(snapshot.size, '1')
+        self.assertEqual(snapshot.status, 'READY')
+
     def test_ex_get_volume(self):
         volume_name = 'lcdisk'
         volume = self.driver.ex_get_volume(volume_name)
@@ -593,6 +617,10 @@ class GCEMockHttp(MockHttpTestCase):
         body = self.fixtures.load('aggregated_machineTypes.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _aggregated_targetPools(self, method, url, body, headers):
+        body = self.fixtures.load('aggregated_targetPools.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _global_httpHealthChecks(self, method, url, body, headers):
         if method == 'POST':
             body = self.fixtures.load('global_httpHealthChecks_post.json')
@@ -673,6 +701,18 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('global_networks_lcnetwork.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _global_snapshots(self, method, url, body, headers):
+        body = self.fixtures.load('global_snapshots.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _global_snapshots_lcsnapshot(self, method, url, body, headers):
+        if method == 'DELETE':
+            body = self.fixtures.load(
+                'global_snapshots_lcsnapshot_delete.json')
+        else:
+            body = self.fixtures.load('global_snapshots_lcsnapshot.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _global_operations_operation_global_httpHealthChecks_lchealthcheck_delete(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -721,6 +761,12 @@ class GCEMockHttp(MockHttpTestCase):
             'operations_operation_global_networks_post.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _global_operations_operation_global_snapshots_lcsnapshot_delete(
+            self, method, url, body, headers):
+        body = self.fixtures.load(
+            'operations_operation_global_snapshots_lcsnapshot_delete.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _regions_us_central1_operations_operation_regions_us_central1_addresses_lcaddress_delete(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -787,6 +833,12 @@ class GCEMockHttp(MockHttpTestCase):
             'operations_operation_zones_us-central1-a_disks_lcdisk_delete.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_lcdisk_createSnapshot_post(
+            self, method, url, body, headers):
+        body = self.fixtures.load(
+            'operations_operation_zones_us-central1-a_disks_lcdisk_createSnapshot_post.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_post(
             self, method, url, body, headers):
         body = self.fixtures.load(
@@ -970,6 +1022,12 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('zones_us-central1-a_disks_lcdisk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_disks_lcdisk_createSnapshot(self, method, url,
+                                                         body, headers):
+        body = self.fixtures.load(
+            'zones_us-central1-a_disks_lcdisk_createSnapshot_post.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_us_central1_a_disks_node_name(self, method, url, body, headers):
         body = self.fixtures.load('generic_disk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])


[06/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json b/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
index b92af77..e8da4f8 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
@@ -4,40 +4,119 @@
     "zones/europe-west1-a": {
       "machineTypes": [
         {
-          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
-          "description": "8 vCPUs, 7.2 GB RAM",
-          "guestCpus": 8,
-          "id": "01206886442411821831",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "04759000181765218034",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "02507333096579477005",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8-d",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "guestCpus": 1,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/f1-micro",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "zone": "europe-west1-a"
         },
         {
           "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
           "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
           "guestCpus": 1,
           "id": "10583029372018866711",
@@ -52,44 +131,30 @@
               "diskGb": 420
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1-d",
-          "zone": "europe-west1-a"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
-          "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
           "guestCpus": 2,
-          "id": "00770157291441082211",
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
           "zone": "europe-west1-a"
         },
         {
           "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
           "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
           "id": "07181827135536388552",
@@ -107,48 +172,83 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "15178384466070744001",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4-d",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
+          "guestCpus": 2,
+          "id": "05438694236916301519",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
           "zone": "europe-west1-a"
         },
         {
@@ -162,198 +262,237 @@
           "maximumPersistentDisksSizeGb": "3072",
           "memoryMb": 1740,
           "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/g1-small",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "16898271314080235997",
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
+          "scratchDisks": [
+            {
+              "diskGb": 870
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
           "guestCpus": 4,
-          "id": "11556032176405786676",
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
-          "guestCpus": 1,
-          "id": "1133568312750571513",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
+          "description": "8 vCPUs, 7.2 GB RAM",
+          "guestCpus": 8,
+          "id": "01206886442411821831",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/f1-micro",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
+          "guestCpus": 4,
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "06313284160910191442",
+          "id": "15178384466070744001",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "01151097524490134507",
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4-d",
           "zone": "europe-west1-a"
-        },
+        }
+      ]
+    },
+    "zones/europe-west1-b": {
+      "machineTypes": [
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
-          "zone": "europe-west1-a"
-        },
-        {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4-d",
+          "zone": "europe-west1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
-          "zone": "europe-west1-a"
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8-d",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
           "guestCpus": 1,
-          "id": "11077240422128681563",
-          "imageSpaceGb": 10,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
-          "zone": "europe-west1-a"
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/f1-micro",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4-d",
-          "zone": "europe-west1-a"
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2-d",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
-          "description": "4 vCPUs, 3.6 GB RAM",
-          "guestCpus": 4,
-          "id": "04759000181765218034",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
-          "zone": "europe-west1-a"
-        }
-      ]
-    },
-    "zones/europe-west1-b": {
-      "machineTypes": [
-        {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
+          "guestCpus": 2,
+          "id": "05438694236916301519",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
           "zone": "europe-west1-b"
         },
         {
           "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
           "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
           "id": "15178384466070744001",
@@ -368,21 +507,21 @@
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/g1-small",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
           "zone": "europe-west1-b"
         },
         {
@@ -396,130 +535,116 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
           "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
-          "guestCpus": 4,
-          "id": "11556032176405786676",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
+          "guestCpus": 1,
+          "id": "1500265464823777597",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/g1-small",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
-          "zone": "europe-west1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "07181827135536388552",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8-d",
-          "zone": "europe-west1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
-          "guestCpus": 2,
-          "id": "16898271314080235997",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4-d",
           "zone": "europe-west1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
           "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
           "guestCpus": 1,
           "id": "10583029372018866711",
@@ -534,195 +659,222 @@
               "diskGb": 420
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
           "guestCpus": 4,
-          "id": "01151097524490134507",
+          "id": "04759000181765218034",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4-d",
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
+          "guestCpus": 2,
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "00770157291441082211",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
+          "guestCpus": 4,
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "06313284160910191442",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
-              "diskGb": 870
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
-          "description": "4 vCPUs, 3.6 GB RAM",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
           "guestCpus": 4,
-          "id": "04759000181765218034",
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
           "zone": "europe-west1-b"
-        },
+        }
+      ]
+    },
+    "zones/us-central1-a": {
+      "machineTypes": [
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+          "zone": "us-central1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "15178384466070744001",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4-d",
-          "zone": "europe-west1-b"
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+          "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
           "guestCpus": 1,
-          "id": "1133568312750571513",
+          "id": "1500265464823777597",
           "imageSpaceGb": 0,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 4,
           "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/f1-micro",
-          "zone": "europe-west1-b"
-        }
-      ]
-    },
-    "zones/us-central1-a": {
-      "machineTypes": [
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+          "zone": "us-central1-a"
+        },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "15178384466070744001",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
-          "guestCpus": 2,
-          "id": "16898271314080235997",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "guestCpus": 1,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
           "zone": "us-central1-a"
         },
         {
@@ -736,86 +888,73 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 3686,
           "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
-          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
-          "guestCpus": 1,
-          "id": "10583029372018866711",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1-d",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
           "scratchDisks": [
             {
-              "diskGb": 420
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
-          "guestCpus": 1,
-          "id": "1133568312750571513",
-          "imageSpaceGb": 0,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
-          "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "06313284160910191442",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
           "scratchDisks": [
             {
-              "diskGb": 870
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "02507333096579477005",
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
@@ -824,63 +963,59 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
-          "guestCpus": 4,
-          "id": "11556032176405786676",
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
+          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
+          "guestCpus": 1,
+          "id": "10583029372018866711",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+          "memoryMb": 3840,
+          "name": "n1-standard-1-d",
+          "scratchDisks": [
+            {
+              "diskGb": 420
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
+          "guestCpus": 2,
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
           "zone": "us-central1-a"
         },
         {
@@ -894,105 +1029,105 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
           "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
           "guestCpus": 4,
-          "id": "05095504563332567951",
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "01151097524490134507",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
           "guestCpus": 2,
-          "id": "00770157291441082211",
+          "id": "05438694236916301519",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "07181827135536388552",
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
@@ -1001,7 +1136,7 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
           "zone": "us-central1-a"
         }
       ]
@@ -1009,59 +1144,68 @@
     "zones/us-central1-b": {
       "machineTypes": [
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
+          "guestCpus": 1,
+          "id": "1500265464823777597",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/g1-small",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "05438694236916301519",
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2",
-          "zone": "us-central1-b"
-        },
-        {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+          "name": "n1-highmem-2-d",
+          "scratchDisks": [
+            {
+              "diskGb": 870
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
-          "description": "8 vCPUs, 7.2 GB RAM",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "01206886442411821831",
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
-          "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
+          "name": "n1-highcpu-8-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8-d",
           "zone": "us-central1-b"
         },
         {
@@ -1075,26 +1219,35 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 1843,
           "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "15178384466070744001",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
+          "guestCpus": 4,
+          "id": "11556032176405786676",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4",
           "zone": "us-central1-b"
         },
         {
@@ -1108,33 +1261,16 @@
           "maximumPersistentDisksSizeGb": "3072",
           "memoryMb": 614,
           "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/f1-micro",
-          "zone": "us-central1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/f1-micro",
           "zone": "us-central1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
           "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
           "id": "00523085164784013586",
@@ -1149,113 +1285,171 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
-          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
-          "guestCpus": 1,
-          "id": "10583029372018866711",
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "15178384466070744001",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
-              "diskGb": 420
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "07181827135536388552",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/g1-small",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
+          "guestCpus": 4,
+          "id": "04759000181765218034",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
+          "description": "8 vCPUs, 7.2 GB RAM",
           "guestCpus": 8,
-          "id": "01717932668777642040",
+          "id": "01206886442411821831",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "09494636486174545828",
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8-d",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
+          "guestCpus": 4,
+          "id": "09494636486174545828",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
           "zone": "us-central1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
           "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
           "id": "06313284160910191442",
@@ -127

<TRUNCATED>

[40/44] git commit: Initialize PyCrypto's RNG (We don't actually use the RNG, but this should prevent certain errors if libcloud is running in a fork of an application that has already imported the Crypto library.)

Posted by to...@apache.org.
Initialize PyCrypto's RNG
(We don't actually use the RNG, but this should prevent certain errors if
libcloud is running in a fork of an application that has already imported the
Crypto library.)


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

Branch: refs/heads/trunk
Commit: 98636e3dd3b29d5f333a99cb97fd279cb5754178
Parents: d08d96b
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 15:52:19 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/98636e3d/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 549ba8b..da3b66d 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -82,6 +82,8 @@ try:
     from Crypto.Hash import SHA256
     from Crypto.PublicKey import RSA
     from Crypto.Signature import PKCS1_v1_5
+    import Crypto.Random
+    Crypto.Random.atfork()
 except ImportError:
     # The pycrypto library is unavailable
     SHA256 = None


[41/44] git commit: Catch some additional errors from the authentication. Also, update the docs to reflect the new console.

Posted by to...@apache.org.
Catch some additional errors from the authentication.
Also, update the docs to reflect the new console.


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

Branch: refs/heads/trunk
Commit: 64ad1cd1934d5d571e579e1347bab7ff784103e6
Parents: 6456cde
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 15:36:30 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 43 +++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/64ad1cd1/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index da3b66d..01c3cb0 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -21,15 +21,17 @@ Information about setting up your Google OAUTH2 credentials:
 For libcloud, there are two basic methods for authenticating to Google using
 OAUTH2: Service Accounts and Client IDs for Installed Applications.
 
-Both are initially set up from the
-U{API Console<https://code.google.com/apis/console#access>}
+Both are initially set up from the Cloud Console_
+_Console: https://cloud.google.com/console
 
 Setting up Service Account authentication (note that you need the PyCrypto
 package installed to use this):
-    - Go to the API Console
-    - Click on "Create another client ID..."
-    - Select "Service account" and click on "Create client ID"
-    - Download the Private Key
+    - Go to the Console
+    - Go to your project and then to "APIs & auth" on the left
+    - Click on "Credentials"
+    - Click on "Create New Client ID..."
+    - Select "Service account" and click on "Create Client ID"
+    - Download the Private Key (should happen automatically).
     - The key that you download is a PKCS12 key.  It needs to be converted to
       the PEM format.
     - Convert the key using OpenSSL (the default password is 'notasecret'):
@@ -40,9 +42,11 @@ package installed to use this):
       address" in as the user_id and the path to the .pem file as the key.
 
 Setting up Installed Application authentication:
-    - Go to the API Connsole
-    - Click on "Create another client ID..."
-    - Select "Installed application" and click on "Create client ID"
+    - Go to the Connsole
+    - Go to your projcet and then to "APIs & auth" on the left
+    - Click on "Credentials"
+    - Select "Installed application" and "Other" then click on
+      "Create Client ID"
     - To Authenticate, pass in the "Client ID" as the user_id and the "Client
       secret" as the key
     - The first time that you do this, the libcloud will give you a URL to
@@ -108,6 +112,10 @@ class GoogleBaseError(ProviderError):
         super(GoogleBaseError, self).__init__(value, http_code, driver)
 
 
+class InvalidRequestError(GoogleBaseError):
+    pass
+
+
 class JsonParseError(GoogleBaseError):
     pass
 
@@ -159,9 +167,14 @@ class GoogleResponse(JsonResponse):
             err = body['error']['errors'][0]
         else:
             err = body['error']
+        
+        if 'code' in err:
+            code = err.get('code')
+            message = err.get('message')
+        else:
+            code = None
+            message = body.get('error_description', err)
 
-        code = err.get('code')
-        message = err.get('message')
         return (code, message)
 
     def parse_body(self):
@@ -208,6 +221,14 @@ class GoogleResponse(JsonResponse):
                 code = None
             raise ResourceNotFoundError(message, self.status, code)
 
+        elif self.status == httplib.BAD_REQUEST:
+            if (not json_error) and ('error' in body):
+                (code, message) = self._get_error(body)
+            else:
+                message = body
+                code = None
+            raise InvalidRequestError(message, self.status, code) 
+                
         else:
             if (not json_error) and ('error' in body):
                 (code, message) = self._get_error(body)


[27/44] git commit: Update API to v1 and remove traces of ephemeral disks. The primary change here is updating ex_create_multiple_nodes to create disks and nodes in parallel.

Posted by to...@apache.org.
Update API to v1 and remove traces of ephemeral disks.
The primary change here is updating ex_create_multiple_nodes to create disks and
nodes in parallel.


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

Branch: refs/heads/trunk
Commit: e58e3231c6adb799a7845048bce39a1424547ac3
Parents: b7f709f
Author: Rick Wright <ri...@google.com>
Authored: Wed Dec 4 13:17:25 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 196 ++++++++++++++++++++++++-----------
 1 file changed, 137 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e58e3231/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 6d74ee3..f2417cf 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -30,7 +30,7 @@ from libcloud.compute.base import NodeSize, StorageVolume, UuidMixin
 from libcloud.compute.providers import Provider
 from libcloud.compute.types import NodeState
 
-API_VERSION = 'v1beta16'
+API_VERSION = 'v1'
 DEFAULT_TASK_COMPLETION_TIMEOUT = 180
 
 
@@ -99,6 +99,18 @@ class GCEAddress(UuidMixin):
         return self.driver.ex_destroy_address(address=self)
 
 
+class GCEFailedDisk(object):
+    """Dummy Node object for disks that are not created."""
+    def __init__(self, name, error, code):
+        self.name = name
+        self.error = error
+        self.code = code
+
+    def __repr__(self):
+        return '<GCEFailedDisk name="%s" error_code="%s">' % (
+            self.name, self.code)
+
+
 class GCEFailedNode(object):
     """Dummy Node object for nodes that are not created."""
     def __init__(self, name, error, code):
@@ -1232,8 +1244,7 @@ class GCENodeDriver(NodeDriver):
         return self.ex_get_network(name)
 
     def _create_node_req(self, name, size, image, location, network,
-                         tags=None, metadata=None, boot_disk=None,
-                         persistent_disk=False):
+                         tags=None, metadata=None, boot_disk=None):
         """
         Returns a request and body to create a new node.  This is a helper
         method to suppor both :class:`create_node` and
@@ -1264,11 +1275,6 @@ class GCENodeDriver(NodeDriver):
         :keyword  boot_disk:  Persistent boot disk to attach.
         :type     :class:`StorageVolume`
 
-        :keyword  persistent_disk: If True, create a persistent disk instead of
-                                   an ephemeral one.  Has no effect if
-                                   boot_disk is specified.
-        :type     persistent_disk: ``bool``
-
         :return:  A tuple containing a request string and a node_data dict.
         :rtype:   ``tuple`` of ``str`` and ``dict``
         """
@@ -1279,9 +1285,7 @@ class GCENodeDriver(NodeDriver):
             node_data['tags'] = {'items': tags}
         if metadata:
             node_data['metadata'] = metadata
-        if (not boot_disk) and persistent_disk:
-            boot_disk = self.create_volume(None, name, location=location,
-                                           image=image)
+
         if boot_disk:
             disks = [{'kind': 'compute#attachedDisk',
                       'boot': True,
@@ -1291,7 +1295,6 @@ class GCENodeDriver(NodeDriver):
                       'zone': boot_disk.extra['zone'].extra['selfLink'],
                       'source': boot_disk.extra['selfLink']}]
             node_data['disks'] = disks
-            node_data['kernel'] = image.extra['preferredKernel']
         else:
             node_data['image'] = image.extra['selfLink']
 
@@ -1307,7 +1310,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None, ex_persistent_disk=False):
+                    ex_boot_disk=None):
         """
         Create a new node and return a node object for the node.
 
@@ -1337,11 +1340,6 @@ class GCENodeDriver(NodeDriver):
         :keyword  ex_boot_disk: The boot disk to attach to the instance.
         :type     ex_boot_disk: :class:`StorageVolume` or ``str``
 
-        :keyword  ex_persistent_disk: If True, create a persistent_disk instead
-                                      of a ephemeral one.  Has no effect if
-                                      ex_boot_disk is specified.
-        :type     ex_persistent_disk: ``bool``
-
         :return:  A Node object for the new node.
         :rtype:   :class:`Node`
         """
@@ -1355,19 +1353,23 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
+        if not ex_boot_disk:
+            ex_boot_disk = self.create_volume(None, name, location=location,
+                                              image=image)
+
         request, node_data = self._create_node_req(name, size, image,
                                                    location, ex_network,
                                                    ex_tags, ex_metadata,
-                                                   ex_boot_disk,
-                                                   ex_persistent_disk)
+                                                   ex_boot_disk)
         self.connection.async_request(request, method='POST', data=node_data)
 
         return self.ex_get_node(name, location.name)
 
+
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True, ex_persistent_disk=False,
+                                 ignore_errors=True,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1408,12 +1410,9 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails.
         :type     ignore_errors: ``bool``
 
-        :keyword  persistent_disk: If True, create persistent boot disks
-                                   instead of ephemeral ones.
-        :type     persistent_disk: ``bool``
-
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
+        :type     timeout: ``int``
 
         :return:  A list of Node objects for the new nodes.
         :rtype:   ``list`` of :class:`Node`
@@ -1429,16 +1428,23 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
-        node_list = [None] * number
-        responses = []
+        # List for holding the status information for disk/node creation.
+        status_list = [None] * number
+
         for i in range(number):
             name = '%s-%03d' % (base_name, i)
-            request, node_data = self._create_node_req(
-                name, size, image, location, ex_network, ex_tags, ex_metadata,
-                persistent_disk=ex_persistent_disk)
-            response = self.connection.request(request, method='POST',
-                                               data=node_data)
-            responses.append(response.object)
+
+            # Create disks for nodes
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, name, location=location, image=image)
+            disk_res = self.connection.request(disk_req, method='POST',
+                                               data=disk_data,
+                                               params=disk_params).object
+            status_list[i] = {'name': name,
+                              'node_response': None,
+                              'node': None,
+                              'disk_response': disk_res,
+                              'disk': None}
 
         start_time = time.time()
         complete = False
@@ -1447,27 +1453,66 @@ class GCENodeDriver(NodeDriver):
                 raise Exception("Timeout (%s sec) while waiting for multiple "
                                 "instances")
             complete = True
-            for i, operation in enumerate(responses):
-                if operation is None:
-                    continue
-                error = None
-                try:
-                    response = self.connection.request(
-                        operation['selfLink']).object
-                except:
-                    e = self._catch_error(ignore_errors=ignore_errors)
-                    error = e.value
-                    code = e.code
-                if response['status'] == 'DONE':
-                    responses[i] = None
-                    name = '%s-%03d' % (base_name, i)
-                    if error:
-                        node_list[i] = GCEFailedNode(name, error, code)
+            time.sleep(2)
+            for i, status in enumerate(status_list):
+                # If disk does not yet exist, check on its status
+                if not status['disk']:
+                    error = None
+                    try:
+                        response = self.connection.request(
+                            status['disk_response']['selfLink']).object
+                    except:
+                        e = self._catch_error(ignore_errors=ignore_errors)
+                        error = e.value
+                        code = e.code
+                    if response['status'] == 'DONE':
+                        status['disk_response'] = None
+                        if error:
+                            status['disk'] = GCEFailedDisk(status['name'],
+                                                           error, code)
+                        else:
+                            status['disk'] = self.ex_get_volume(status['name'], location)
+
+                # If disk exists, but node does not, create the node or check on
+                # its status if already in progress.
+                if status['disk'] and not status['node']:
+                    if not status['node_response']:
+                        request, node_data = self._create_node_req(status['name'], size,
+                                                                   image,
+                                                                   location,
+                                                                   ex_network,
+                                                                   ex_tags,
+                                                                   ex_metadata,
+                                                                   boot_disk=status['disk'])
+                        node_res = self.connection.request(request,
+                                                           method='POST',
+                                                           data=node_data).object
+                        status['node_response'] = node_res
                     else:
-                        node_list[i] = self.ex_get_node(name, location.name)
-                else:
+                        error = None
+                        try:
+                            response = self.connection.request(
+                                status['node_response']['selfLink']).object
+                        except:
+                            e = self._catch_error(ignore_errors=ignore_errors)
+                            error = e.value
+                            code = e.code
+                        if response['status'] == 'DONE':
+                            status['node_response'] = None
+                        if error:
+                            status['node'] = GCEFailedNode(status['name'],
+                                                           error, code)
+                        else:
+                            status['node'] = self.ex_get_node(status['name'], location)
+
+                # If any of the nodes have not been created (or failed) we are
+                # not done yet.
+                if not status['node']:
                     complete = False
-                    time.sleep(2)
+
+        node_list = []
+        for status in status_list:
+            node_list.append(status['node'])
         return node_list
 
     def ex_create_targetpool(self, name, region=None, healthchecks=None,
@@ -1520,10 +1565,12 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None):
+    def _create_vol_req(self, size, name, location=None, image=None,
+                        snapshot=None):
         """
-        Create a volume (disk).
+        Assemble the request/data for creating a volume.
+
+        Used by create_volume and ex_create_multiple_nodes
 
         :param  size: Size of volume to create (in GB). Can be None if image
                       or snapshot is supplied.
@@ -1542,8 +1589,9 @@ class GCENodeDriver(NodeDriver):
         :keyword  snapshot: Snapshot to create image from (needs full URI)
         :type     snapshot: ``str``
 
-        :return:  Storage Volume object
-        :rtype:   :class:`StorageVolume`
+        :return:  Tuple containg the request string, the data dictionary and the
+                  URL parameters
+        :rtype:   ``tuple``
         """
         volume_data = {}
         params = None
@@ -1563,8 +1611,38 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
         request = '/zones/%s/disks' % (location.name)
-        self.connection.async_request(request, method='POST',
-                                      data=volume_data,
+
+        return request, volume_data, params
+
+
+    def create_volume(self, size, name, location=None, image=None,
+                      snapshot=None):
+        """
+        Create a volume (disk).
+
+        :param  size: Size of volume to create (in GB). Can be None if image
+                      or snapshot is supplied.
+        :type   size: ``int`` or ``str`` or ``None``
+
+        :param  name: Name of volume to create
+        :type   name: ``str``
+
+        :keyword  location: Location (zone) to create the volume in
+        :type     location: ``str`` or :class:`GCEZone` or
+                            :class:`NodeLocation` or ``None``
+
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
+        :keyword  snapshot: Snapshot to create image from (needs full URI)
+        :type     snapshot: ``str``
+
+        :return:  Storage Volume object
+        :rtype:   :class:`StorageVolume`
+        """
+        request, volume_data, params = self._create_vol_req(
+            size, name, location, image, snapshot)
+        self.connection.async_request(request, method='POST', data=volume_data,
                                       params=params)
 
         return self.ex_get_volume(name, location)


[05/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json b/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
index 99195da..565e323 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
@@ -18,43 +18,43 @@
         {
           "creationTimestamp": "2013-11-01T14:50:04.620-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
           ],
           "id": "6918395933376220338",
           "instances": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
           ],
           "kind": "compute#targetPool",
           "name": "libcloud-lb-demo-lb-tp",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         },
         {
           "creationTimestamp": "2013-11-01T14:51:45.822-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
           ],
           "id": "2277093827336176997",
           "instances": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
           ],
           "kind": "compute#targetPool",
           "name": "lctargetpool",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
         },
         {
           "creationTimestamp": "2013-11-01T12:09:45.831-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check"
           ],
           "id": "03531496913089065061",
           "kind": "compute#targetPool",
           "name": "www-pool",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/www-pool",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/www-pool",
           "sessionAffinity": "NONE"
         }
       ]
@@ -73,5 +73,5 @@
     }
   },
   "kind": "compute#targetPoolAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/targetPools"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/targetPools"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/generic_disk.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/generic_disk.json b/libcloud/test/compute/fixtures/gce/generic_disk.json
new file mode 100644
index 0000000..b0d646b
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/generic_disk.json
@@ -0,0 +1,13 @@
+{
+  "creationTimestamp": "2013-12-13T10:54:04.074-08:00",
+  "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+  "id": "3535838963674672928",
+  "kind": "compute#disk",
+  "name": "genericdisk",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/genericdisk",
+  "sizeGb": "10",
+  "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+  "sourceImageId": "17312518942796567788",
+  "status": "READY",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_firewalls.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls.json b/libcloud/test/compute/fixtures/gce/global_firewalls.json
index e678e7d..8348658 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls.json
@@ -18,8 +18,8 @@
       "id": "5399576268464751692",
       "kind": "compute#firewall",
       "name": "default-allow-internal",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/default-allow-internal",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/default-allow-internal",
       "sourceRanges": [
         "10.240.0.0/16"
       ]
@@ -38,8 +38,8 @@
       "id": "8063006729705804986",
       "kind": "compute#firewall",
       "name": "default-ssh",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/default-ssh",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/default-ssh",
       "sourceRanges": [
         "0.0.0.0/0"
       ]
@@ -57,8 +57,8 @@
       "id": "13827675544891616808",
       "kind": "compute#firewall",
       "name": "libcloud-demo-europe-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/libcloud-demo-europe-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/libcloud-demo-europe-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -79,8 +79,8 @@
       "id": "1648761630208029546",
       "kind": "compute#firewall",
       "name": "libcloud-demo-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/libcloud-demo-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/libcloud-demo-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -102,8 +102,8 @@
       "id": "01326795494450101956",
       "kind": "compute#firewall",
       "name": "www-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/www-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/www-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -113,5 +113,5 @@
     }
   ],
   "kind": "compute#firewallList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
index 068721e..51f1d91 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
@@ -11,8 +11,8 @@
   "id": "0565629596395414121",
   "kind": "compute#firewall",
   "name": "lcfirewall",
-  "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "sourceTags": [
     "libcloud"
   ]

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
index b2ae795..cc0a508 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_firewalls_lcfirewall_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
   "startTime": "2013-06-26T10:04:53.508-07:00",
   "status": "PENDING",
   "targetId": "0565629596395414121",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
index b38aa5d..47f9d8f 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
@@ -5,10 +5,10 @@
   "name": "operation-global_firewalls_lcfirewall_put",
   "operationType": "update",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
   "startTime": "2013-06-26T20:52:00.410-07:00",
   "status": "PENDING",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_post.json b/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
index f7cac33..5e77ca1 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_firewalls_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_post",
   "startTime": "2013-06-26T20:51:06.128-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
index 35d0f6f..e1f25a6 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
@@ -12,24 +12,38 @@
       "name": "basic-check",
       "port": 80,
       "requestPath": "/",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check",
       "timeoutSec": 5,
       "unhealthyThreshold": 2
     },
     {
+      "checkIntervalSec": 10,
+      "creationTimestamp": "2013-12-13T10:52:46.800-08:00",
+      "healthyThreshold": 3,
+      "host": "lchost",
+      "id": "022194976205566532",
+      "kind": "compute#httpHealthCheck",
+      "name": "lchealthcheck",
+      "port": 9000,
+      "requestPath": "/lc",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/lchealthcheck",
+      "timeoutSec": 10,
+      "unhealthyThreshold": 4
+    },
+    {
       "checkIntervalSec": 5,
-      "creationTimestamp": "2013-09-02T22:25:44.759-07:00",
+      "creationTimestamp": "2013-12-13T10:51:42.762-08:00",
       "healthyThreshold": 2,
-      "id": "16372093408499501663",
+      "id": "08359377740909791076",
       "kind": "compute#httpHealthCheck",
       "name": "libcloud-lb-demo-healthcheck",
       "port": 80,
       "requestPath": "/",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
       "timeoutSec": 5,
       "unhealthyThreshold": 2
     }
   ],
   "kind": "compute#httpHealthCheckList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
index bbfb868..c29f271 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
@@ -9,7 +9,7 @@
   "name": "basic-check",
   "port": 80,
   "requestPath": "/",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check",
   "timeoutSec": 5,
   "unhealthyThreshold": 2
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
index 805d0e0..80c9aeb 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
@@ -8,7 +8,7 @@
   "name": "lchealthcheck",
   "port": 8000,
   "requestPath": "/lc",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/lchealthcheck",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/lchealthcheck",
   "timeoutSec": 10,
   "unhealthyThreshold": 4
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
index df1c973..e8463ec 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
   "startTime": "2013-09-02T22:18:02.558-07:00",
   "status": "PENDING",
   "targetId": "06860603312991823381",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
index 6173d3b..8ddeae3 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_put",
   "operationType": "update",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
   "startTime": "2013-09-03T02:19:55.628-07:00",
   "status": "PENDING",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
index 72c0a6a..188f9e0 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
@@ -7,7 +7,7 @@
   "name": "libcloud-lb-demo-healthcheck",
   "port": 80,
   "requestPath": "/",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
   "timeoutSec": 5,
   "unhealthyThreshold": 2
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
index f0d5ab8..5cd564f 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_httpHealthChecks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
   "startTime": "2013-09-03T02:19:54.718-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_images.json b/libcloud/test/compute/fixtures/gce/global_images.json
index bfddba5..5c25596 100644
--- a/libcloud/test/compute/fixtures/gce/global_images.json
+++ b/libcloud/test/compute/fixtures/gce/global_images.json
@@ -7,12 +7,12 @@
       "id": "1549141992333368759",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "preferredKernel": "https://www.googleapis.com/compute/v1/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
@@ -21,16 +21,16 @@
       "id": "1539141992335368259",
       "kind": "compute#image",
       "name": "centos-6-v20131118",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "preferredKernel": "https://www.googleapis.com/compute/v1/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/centos-6-v20131118",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/centos-6-v20131118",
       "sourceType": "RAW",
       "status": "READY"
     }
   ],
   "kind": "compute#imageList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/images"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/images"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks.json b/libcloud/test/compute/fixtures/gce/global_networks.json
index cc6f3e9..dc7ca55 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks.json
@@ -8,7 +8,7 @@
       "id": "08257021638942464470",
       "kind": "compute#network",
       "name": "default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default"
     },
     {
       "IPv4Range": "10.10.0.0/16",
@@ -17,7 +17,7 @@
       "id": "13254259054875092094",
       "kind": "compute#network",
       "name": "libcloud-demo-europe-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network"
     },
     {
       "IPv4Range": "10.10.0.0/16",
@@ -26,9 +26,9 @@
       "id": "17172579178188075621",
       "kind": "compute#network",
       "name": "libcloud-demo-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network"
     }
   ],
   "kind": "compute#networkList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_default.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_default.json b/libcloud/test/compute/fixtures/gce/global_networks_default.json
index 85b9210..a7ddd3e 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_default.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_default.json
@@ -5,5 +5,5 @@
   "id": "08257021638942464470",
   "kind": "compute#network",
   "name": "default",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
index 77bd710..5ba0d9e 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
@@ -5,5 +5,5 @@
   "id": "16211908079305042870",
   "kind": "compute#network",
   "name": "lcnetwork",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
index cf4f669..ea6b1bb 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_networks_lcnetwork_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
   "startTime": "2013-06-26T10:05:11.273-07:00",
   "status": "PENDING",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
index 25eaf57..ecb80e6 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
@@ -5,5 +5,5 @@
   "id": "13254259054875092094",
   "kind": "compute#network",
   "name": "libcloud-demo-europe-network",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
index 733fc54..5d26325 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
@@ -5,5 +5,5 @@
   "id": "17172579178188075621",
   "kind": "compute#network",
   "name": "libcloud-demo-network",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/global_networks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_post.json b/libcloud/test/compute/fixtures/gce/global_networks_post.json
index 4141991..77aa7c5 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_networks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_post",
   "startTime": "2013-06-26T10:05:03.315-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
index c6852a5..d50c5e0 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_lcfirewall_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
   "startTime": "2013-06-26T10:04:53.508-07:00",
   "status": "DONE",
   "targetId": "0565629596395414121",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
index 1629dc3..225c061 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_lcfirewall_put",
   "operationType": "update",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
   "startTime": "2013-06-26T20:52:00.410-07:00",
   "status": "DONE",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
index c74816b..4b87327 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_post",
   "startTime": "2013-06-26T20:51:06.128-07:00",
   "status": "DONE",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
index f8bf93c..59f3d81 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
   "startTime": "2013-09-02T22:18:02.558-07:00",
   "status": "DONE",
   "targetId": "06860603312991823381",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
index ef0ce96..396ffc1 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
@@ -6,10 +6,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_put",
   "operationType": "update",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
   "startTime": "2013-09-03T02:19:55.628-07:00",
   "status": "DONE",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
index 3013faa..5ea8836 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
   "startTime": "2013-09-03T02:19:54.718-07:00",
   "status": "DONE",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
index dbdd02a..6cf88f7 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
@@ -6,10 +6,10 @@
   "name": "operation-global_networks_lcnetwork_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
   "startTime": "2013-06-26T10:05:11.273-07:00",
   "status": "DONE",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
index b4e7d9a..5b5888b 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
@@ -6,10 +6,10 @@
   "name": "operation-global_networks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_post",
   "startTime": "2013-06-26T10:05:03.315-07:00",
   "status": "DONE",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
index 9176604..f808760 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_lcaddress_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
   "startTime": "2013-06-26T12:21:44.110-07:00",
   "status": "DONE",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
index 3f85b87..a68d628 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
   "startTime": "2013-06-26T12:21:40.358-07:00",
   "status": "DONE",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
index 0138b45..eb43122 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "startTime": "2013-09-03T00:17:36.168-07:00",
   "status": "DONE",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
index fb6e5aa..fd2fc18 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_forwardingRules_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
   "startTime": "2013-09-03T00:17:25.434-07:00",
   "status": "DONE",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
index b9adfea..482edee 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "operationType": "addHealthCheck",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "startTime": "2013-09-03T01:28:40.838-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
index 6c16ec6..b9a28dc 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "operationType": "addInstance",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "startTime": "2013-09-03T01:29:03.145-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
index d6cb9a8..d281fe0 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
   "startTime": "2013-09-03T00:51:06.840-07:00",
   "status": "DONE",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
index 3a08f52..5beb4a4 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "operationType": "removeHealthCheck",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "startTime": "2013-09-03T01:28:32.942-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
index 58a1e51..4add404 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "operationType": "removeInstance",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "startTime": "2013-09-03T01:28:53.109-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
index e95babf..5b7b4d9 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
   "startTime": "2013-09-03T00:51:05.115-07:00",
   "status": "DONE",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
index 449789b..c9fff8f 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
@@ -15,11 +15,11 @@
   "name": "operation-zones_europe-west1-a_instances_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
   "startTime": "2013-06-26T20:57:34.453-07:00",
   "status": "DONE",
   "targetId": "14308265828754333159",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
index 181efac..e892ab5 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_disks_lcdisk_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
   "startTime": "2013-06-26T10:06:12.006-07:00",
   "status": "DONE",
   "targetId": "16109451798967042451",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
index 680697e..2962730 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_disks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
   "startTime": "2013-06-26T16:48:17.479-07:00",
   "status": "DONE",
   "targetId": "03196637868764498730",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
index fdf102f..3dd003e 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-000_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
   "startTime": "2013-06-26T16:13:12.948-07:00",
   "status": "DONE",
   "targetId": "5390075309006132922",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
index 7c02137..f07a581 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-001_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
   "startTime": "2013-06-26T16:13:40.620-07:00",
   "status": "DONE",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
index ec89003..1962a1c 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "operationType": "attachDisk",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "startTime": "2013-06-26T16:48:27.762-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
index 3eacbba..b813751 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
   "startTime": "2013-06-26T10:05:40.405-07:00",
   "status": "DONE",
   "targetId": "07410051435384876224",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
index 6b98bea..3659387 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "operationType": "detachDisk",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "startTime": "2013-06-26T16:48:35.398-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
index 651ef6d..bbdcbac 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_reset_post",
   "operationType": "reset",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
   "startTime": "2013-06-26T15:03:02.813-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
index 5ddaf68..0733627 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_setTags_post",
   "operationType": "setTags",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
   "startTime": "2013-06-26T21:20:04.103-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
index 8b37d33..40d2857 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
   "startTime": "2013-06-26T16:12:51.537-07:00",
   "status": "DONE",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/project.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/project.json b/libcloud/test/compute/fixtures/gce/project.json
index d96f916..6b65499 100644
--- a/libcloud/test/compute/fixtures/gce/project.json
+++ b/libcloud/test/compute/fixtures/gce/project.json
@@ -55,5 +55,5 @@
       "usage": 1.0
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name"
 }
\ No newline at end of file


[24/44] git commit: Lint fixes

Posted by to...@apache.org.
Lint fixes


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

Branch: refs/heads/trunk
Commit: aa6f73393f4adccde88d5d71cf6d9388192870b4
Parents: 5ea7189
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 14:02:26 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/aa6f7339/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 421c0ca..d80c37b 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1493,11 +1493,11 @@ class GCENodeDriver(NodeDriver):
                         disk_req, method='POST', data=disk_data,
                         params=disk_params).object
                 except:
-                     e = self._catch_error(ignore_errors=ignore_errors)
-                     error = e.value
-                     code = e.code
-                     disk_res = None
-                     status['disk'] = GCEFailedDisk(status['name'],
+                    e = self._catch_error(ignore_errors=ignore_errors)
+                    error = e.value
+                    code = e.code
+                    disk_res = None
+                    status['disk'] = GCEFailedDisk(status['name'],
                                                     error, code)
                 status['disk_response'] = disk_res
 
@@ -1717,7 +1717,6 @@ class GCENodeDriver(NodeDriver):
         :return:  Storage Volume object
         :rtype:   :class:`StorageVolume`
         """
-        vol = None
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
         try:


[31/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json b/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
index 99195da..565e323 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_targetPools.json
@@ -18,43 +18,43 @@
         {
           "creationTimestamp": "2013-11-01T14:50:04.620-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
           ],
           "id": "6918395933376220338",
           "instances": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
           ],
           "kind": "compute#targetPool",
           "name": "libcloud-lb-demo-lb-tp",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         },
         {
           "creationTimestamp": "2013-11-01T14:51:45.822-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck"
           ],
           "id": "2277093827336176997",
           "instances": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+            "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001"
           ],
           "kind": "compute#targetPool",
           "name": "lctargetpool",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool"
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool"
         },
         {
           "creationTimestamp": "2013-11-01T12:09:45.831-07:00",
           "healthChecks": [
-            "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check"
+            "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check"
           ],
           "id": "03531496913089065061",
           "kind": "compute#targetPool",
           "name": "www-pool",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/www-pool",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/www-pool",
           "sessionAffinity": "NONE"
         }
       ]
@@ -73,5 +73,5 @@
     }
   },
   "kind": "compute#targetPoolAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/targetPools"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/targetPools"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/generic_disk.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/generic_disk.json b/libcloud/test/compute/fixtures/gce/generic_disk.json
new file mode 100644
index 0000000..b0d646b
--- /dev/null
+++ b/libcloud/test/compute/fixtures/gce/generic_disk.json
@@ -0,0 +1,13 @@
+{
+  "creationTimestamp": "2013-12-13T10:54:04.074-08:00",
+  "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+  "id": "3535838963674672928",
+  "kind": "compute#disk",
+  "name": "genericdisk",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/genericdisk",
+  "sizeGb": "10",
+  "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+  "sourceImageId": "17312518942796567788",
+  "status": "READY",
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_firewalls.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls.json b/libcloud/test/compute/fixtures/gce/global_firewalls.json
index e678e7d..8348658 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls.json
@@ -18,8 +18,8 @@
       "id": "5399576268464751692",
       "kind": "compute#firewall",
       "name": "default-allow-internal",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/default-allow-internal",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/default-allow-internal",
       "sourceRanges": [
         "10.240.0.0/16"
       ]
@@ -38,8 +38,8 @@
       "id": "8063006729705804986",
       "kind": "compute#firewall",
       "name": "default-ssh",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/default-ssh",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/default-ssh",
       "sourceRanges": [
         "0.0.0.0/0"
       ]
@@ -57,8 +57,8 @@
       "id": "13827675544891616808",
       "kind": "compute#firewall",
       "name": "libcloud-demo-europe-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/libcloud-demo-europe-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/libcloud-demo-europe-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -79,8 +79,8 @@
       "id": "1648761630208029546",
       "kind": "compute#firewall",
       "name": "libcloud-demo-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/libcloud-demo-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/libcloud-demo-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -102,8 +102,8 @@
       "id": "01326795494450101956",
       "kind": "compute#firewall",
       "name": "www-firewall",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/www-firewall",
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/www-firewall",
       "sourceRanges": [
         "0.0.0.0/0"
       ],
@@ -113,5 +113,5 @@
     }
   ],
   "kind": "compute#firewallList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
index 068721e..51f1d91 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall.json
@@ -11,8 +11,8 @@
   "id": "0565629596395414121",
   "kind": "compute#firewall",
   "name": "lcfirewall",
-  "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "sourceTags": [
     "libcloud"
   ]

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
index b2ae795..cc0a508 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_firewalls_lcfirewall_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
   "startTime": "2013-06-26T10:04:53.508-07:00",
   "status": "PENDING",
   "targetId": "0565629596395414121",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
index b38aa5d..47f9d8f 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_lcfirewall_put.json
@@ -5,10 +5,10 @@
   "name": "operation-global_firewalls_lcfirewall_put",
   "operationType": "update",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
   "startTime": "2013-06-26T20:52:00.410-07:00",
   "status": "PENDING",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_firewalls_post.json b/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
index f7cac33..5e77ca1 100644
--- a/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_firewalls_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_firewalls_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_post",
   "startTime": "2013-06-26T20:51:06.128-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
index 35d0f6f..e1f25a6 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks.json
@@ -12,24 +12,38 @@
       "name": "basic-check",
       "port": 80,
       "requestPath": "/",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check",
       "timeoutSec": 5,
       "unhealthyThreshold": 2
     },
     {
+      "checkIntervalSec": 10,
+      "creationTimestamp": "2013-12-13T10:52:46.800-08:00",
+      "healthyThreshold": 3,
+      "host": "lchost",
+      "id": "022194976205566532",
+      "kind": "compute#httpHealthCheck",
+      "name": "lchealthcheck",
+      "port": 9000,
+      "requestPath": "/lc",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/lchealthcheck",
+      "timeoutSec": 10,
+      "unhealthyThreshold": 4
+    },
+    {
       "checkIntervalSec": 5,
-      "creationTimestamp": "2013-09-02T22:25:44.759-07:00",
+      "creationTimestamp": "2013-12-13T10:51:42.762-08:00",
       "healthyThreshold": 2,
-      "id": "16372093408499501663",
+      "id": "08359377740909791076",
       "kind": "compute#httpHealthCheck",
       "name": "libcloud-lb-demo-healthcheck",
       "port": 80,
       "requestPath": "/",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
       "timeoutSec": 5,
       "unhealthyThreshold": 2
     }
   ],
   "kind": "compute#httpHealthCheckList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
index bbfb868..c29f271 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_basic-check.json
@@ -9,7 +9,7 @@
   "name": "basic-check",
   "port": 80,
   "requestPath": "/",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/basic-check",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/basic-check",
   "timeoutSec": 5,
   "unhealthyThreshold": 2
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
index 805d0e0..80c9aeb 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck.json
@@ -8,7 +8,7 @@
   "name": "lchealthcheck",
   "port": 8000,
   "requestPath": "/lc",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/lchealthcheck",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/lchealthcheck",
   "timeoutSec": 10,
   "unhealthyThreshold": 4
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
index df1c973..e8463ec 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
   "startTime": "2013-09-02T22:18:02.558-07:00",
   "status": "PENDING",
   "targetId": "06860603312991823381",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
index 6173d3b..8ddeae3 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_lchealthcheck_put.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_put",
   "operationType": "update",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
   "startTime": "2013-09-03T02:19:55.628-07:00",
   "status": "PENDING",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
index 72c0a6a..188f9e0 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_libcloud-lb-demo-healthcheck.json
@@ -7,7 +7,7 @@
   "name": "libcloud-lb-demo-healthcheck",
   "port": 80,
   "requestPath": "/",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/httpHealthChecks/libcloud-lb-demo-healthcheck",
   "timeoutSec": 5,
   "unhealthyThreshold": 2
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
index f0d5ab8..5cd564f 100644
--- a/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_httpHealthChecks_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_httpHealthChecks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
   "startTime": "2013-09-03T02:19:54.718-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_images.json b/libcloud/test/compute/fixtures/gce/global_images.json
index bfddba5..5c25596 100644
--- a/libcloud/test/compute/fixtures/gce/global_images.json
+++ b/libcloud/test/compute/fixtures/gce/global_images.json
@@ -7,12 +7,12 @@
       "id": "1549141992333368759",
       "kind": "compute#image",
       "name": "debian-7-wheezy-v20130617",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "preferredKernel": "https://www.googleapis.com/compute/v1/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
       "sourceType": "RAW",
       "status": "READY"
     },
@@ -21,16 +21,16 @@
       "id": "1539141992335368259",
       "kind": "compute#image",
       "name": "centos-6-v20131118",
-      "preferredKernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "preferredKernel": "https://www.googleapis.com/compute/v1/projects/google/global/kernels/gce-v20130603",
       "rawDisk": {
         "containerType": "TAR",
         "source": ""
       },
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/centos-6-v20131118",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/centos-6-v20131118",
       "sourceType": "RAW",
       "status": "READY"
     }
   ],
   "kind": "compute#imageList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/images"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/images"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks.json b/libcloud/test/compute/fixtures/gce/global_networks.json
index cc6f3e9..dc7ca55 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks.json
@@ -8,7 +8,7 @@
       "id": "08257021638942464470",
       "kind": "compute#network",
       "name": "default",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default"
     },
     {
       "IPv4Range": "10.10.0.0/16",
@@ -17,7 +17,7 @@
       "id": "13254259054875092094",
       "kind": "compute#network",
       "name": "libcloud-demo-europe-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network"
     },
     {
       "IPv4Range": "10.10.0.0/16",
@@ -26,9 +26,9 @@
       "id": "17172579178188075621",
       "kind": "compute#network",
       "name": "libcloud-demo-network",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network"
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network"
     }
   ],
   "kind": "compute#networkList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_default.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_default.json b/libcloud/test/compute/fixtures/gce/global_networks_default.json
index 85b9210..a7ddd3e 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_default.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_default.json
@@ -5,5 +5,5 @@
   "id": "08257021638942464470",
   "kind": "compute#network",
   "name": "default",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
index 77bd710..5ba0d9e 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork.json
@@ -5,5 +5,5 @@
   "id": "16211908079305042870",
   "kind": "compute#network",
   "name": "lcnetwork",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
index cf4f669..ea6b1bb 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_lcnetwork_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_networks_lcnetwork_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
   "startTime": "2013-06-26T10:05:11.273-07:00",
   "status": "PENDING",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
index 25eaf57..ecb80e6 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-europe-network.json
@@ -5,5 +5,5 @@
   "id": "13254259054875092094",
   "kind": "compute#network",
   "name": "libcloud-demo-europe-network",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-europe-network"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-europe-network"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
index 733fc54..5d26325 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_libcloud-demo-network.json
@@ -5,5 +5,5 @@
   "id": "17172579178188075621",
   "kind": "compute#network",
   "name": "libcloud-demo-network",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/libcloud-demo-network"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/libcloud-demo-network"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/global_networks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/global_networks_post.json b/libcloud/test/compute/fixtures/gce/global_networks_post.json
index 4141991..77aa7c5 100644
--- a/libcloud/test/compute/fixtures/gce/global_networks_post.json
+++ b/libcloud/test/compute/fixtures/gce/global_networks_post.json
@@ -5,9 +5,9 @@
   "name": "operation-global_networks_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_post",
   "startTime": "2013-06-26T10:05:03.315-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
index c6852a5..d50c5e0 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_delete.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_lcfirewall_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_delete",
   "startTime": "2013-06-26T10:04:53.508-07:00",
   "status": "DONE",
   "targetId": "0565629596395414121",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
index 1629dc3..225c061 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_lcfirewall_put.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_lcfirewall_put",
   "operationType": "update",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_lcfirewall_put",
   "startTime": "2013-06-26T20:52:00.410-07:00",
   "status": "DONE",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
index c74816b..4b87327 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_firewalls_post.json
@@ -6,10 +6,10 @@
   "name": "operation-global_firewalls_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_firewalls_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_firewalls_post",
   "startTime": "2013-06-26T20:51:06.128-07:00",
   "status": "DONE",
   "targetId": "10942695305090163011",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/firewalls/lcfirewall",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/firewalls/lcfirewall",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
index f8bf93c..59f3d81 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_delete.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_delete",
   "startTime": "2013-09-02T22:18:02.558-07:00",
   "status": "DONE",
   "targetId": "06860603312991823381",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
index ef0ce96..396ffc1 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_lchealthcheck_put.json
@@ -6,10 +6,10 @@
   "name": "operation-global_httpHealthChecks_lchealthcheck_put",
   "operationType": "update",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_lchealthcheck_put",
   "startTime": "2013-09-03T02:19:55.628-07:00",
   "status": "DONE",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
index 3013faa..5ea8836 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_httpHealthChecks_post.json
@@ -5,10 +5,10 @@
   "name": "operation-global_httpHealthChecks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_httpHealthChecks_post",
   "startTime": "2013-09-03T02:19:54.718-07:00",
   "status": "DONE",
   "targetId": "0742691415598204878",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/healthChecks/lchealthcheck",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/healthChecks/lchealthcheck",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
index dbdd02a..6cf88f7 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_lcnetwork_delete.json
@@ -6,10 +6,10 @@
   "name": "operation-global_networks_lcnetwork_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_lcnetwork_delete",
   "startTime": "2013-06-26T10:05:11.273-07:00",
   "status": "DONE",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
index b4e7d9a..5b5888b 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_global_networks_post.json
@@ -6,10 +6,10 @@
   "name": "operation-global_networks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/operations/operation-global_networks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/operations/operation-global_networks_post",
   "startTime": "2013-06-26T10:05:03.315-07:00",
   "status": "DONE",
   "targetId": "16211908079305042870",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/lcnetwork",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/lcnetwork",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
index 9176604..f808760 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_lcaddress_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_lcaddress_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_lcaddress_delete",
   "startTime": "2013-06-26T12:21:44.110-07:00",
   "status": "DONE",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
index 3f85b87..a68d628 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_addresses_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_addresses_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_addresses_post",
   "startTime": "2013-06-26T12:21:40.358-07:00",
   "status": "DONE",
   "targetId": "01531551729918243104",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
   "user": "897001307951@developer.gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
index 0138b45..eb43122 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_lcforwardingrule_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_lcforwardingrule_delete",
   "startTime": "2013-09-03T00:17:36.168-07:00",
   "status": "DONE",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
index fb6e5aa..fd2fc18 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_forwardingRules_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_forwardingRules_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_forwardingRules_post",
   "startTime": "2013-09-03T00:17:25.434-07:00",
   "status": "DONE",
   "targetId": "10901665092293158938",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
index b9adfea..482edee 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addHealthCheck_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "operationType": "addHealthCheck",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addHealthCheck_post",
   "startTime": "2013-09-03T01:28:40.838-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
index 6c16ec6..b9a28dc 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_addInstance_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "operationType": "addInstance",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_addInstance_post",
   "startTime": "2013-09-03T01:29:03.145-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
index d6cb9a8..d281fe0 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_delete",
   "operationType": "delete",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_delete",
   "startTime": "2013-09-03T00:51:06.840-07:00",
   "status": "DONE",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
index 3a08f52..5beb4a4 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "operationType": "removeHealthCheck",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeHealthCheck_post",
   "startTime": "2013-09-03T01:28:32.942-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
index 58a1e51..4add404 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_lctargetpool_removeInstance_post.json
@@ -6,11 +6,11 @@
   "name": "operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "operationType": "removeInstance",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_lctargetpool_removeInstance_post",
   "startTime": "2013-09-03T01:28:53.109-07:00",
   "status": "DONE",
   "targetId": "16862638289615591831",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
index e95babf..5b7b4d9 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_regions_us-central1_targetPools_post.json
@@ -5,11 +5,11 @@
   "name": "operation-regions_us-central1_targetPools_post",
   "operationType": "insert",
   "progress": 100,
-  "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
+  "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/operations/operation-regions_us-central1_targetPools_post",
   "startTime": "2013-09-03T00:51:05.115-07:00",
   "status": "DONE",
   "targetId": "13598380121688918358",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/lctargetpool",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/lctargetpool",
   "user": "user@gserviceaccount.com"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
index 449789b..c9fff8f 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_europe-west1-a_instances_post.json
@@ -15,11 +15,11 @@
   "name": "operation-zones_europe-west1-a_instances_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/operations/operation-zones_europe-west1-a_instances_post",
   "startTime": "2013-06-26T20:57:34.453-07:00",
   "status": "DONE",
   "targetId": "14308265828754333159",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
index 181efac..e892ab5 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_lcdisk_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_disks_lcdisk_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_lcdisk_delete",
   "startTime": "2013-06-26T10:06:12.006-07:00",
   "status": "DONE",
   "targetId": "16109451798967042451",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
index 680697e..2962730 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_disks_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_disks_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_disks_post",
   "startTime": "2013-06-26T16:48:17.479-07:00",
   "status": "DONE",
   "targetId": "03196637868764498730",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/lcdisk",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcdisk",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
index fdf102f..3dd003e 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-000_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-000_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
   "startTime": "2013-06-26T16:13:12.948-07:00",
   "status": "DONE",
   "targetId": "5390075309006132922",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
index 7c02137..f07a581 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_lcnode-001_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-001_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
   "startTime": "2013-06-26T16:13:40.620-07:00",
   "status": "DONE",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
index ec89003..1962a1c 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_attachDisk_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "operationType": "attachDisk",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "startTime": "2013-06-26T16:48:27.762-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
index 3eacbba..b813751 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_delete.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_delete",
   "operationType": "delete",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
   "startTime": "2013-06-26T10:05:40.405-07:00",
   "status": "DONE",
   "targetId": "07410051435384876224",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
index 6b98bea..3659387 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_detachDisk_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "operationType": "detachDisk",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "startTime": "2013-06-26T16:48:35.398-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
index 651ef6d..bbdcbac 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_reset_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_reset_post",
   "operationType": "reset",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
   "startTime": "2013-06-26T15:03:02.813-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
index 5ddaf68..0733627 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_node-name_setTags_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_setTags_post",
   "operationType": "setTags",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
   "startTime": "2013-06-26T21:20:04.103-07:00",
   "status": "DONE",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
index 8b37d33..40d2857 100644
--- a/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/operations_operation_zones_us-central1-a_instances_post.json
@@ -6,11 +6,11 @@
   "name": "operation-zones_us-central1-a_instances_post",
   "operationType": "insert",
   "progress": 100,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
   "startTime": "2013-06-26T16:12:51.537-07:00",
   "status": "DONE",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/project.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/project.json b/libcloud/test/compute/fixtures/gce/project.json
index d96f916..6b65499 100644
--- a/libcloud/test/compute/fixtures/gce/project.json
+++ b/libcloud/test/compute/fixtures/gce/project.json
@@ -55,5 +55,5 @@
       "usage": 1.0
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name"
 }
\ No newline at end of file


[16/44] git commit: Catch some additional errors from the authentication. Also, update the docs to reflect the new console.

Posted by to...@apache.org.
Catch some additional errors from the authentication.
Also, update the docs to reflect the new console.


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

Branch: refs/heads/trunk
Commit: dcf2a2669d2531f80dd71120244b238edadc80bf
Parents: b700762
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 15:36:30 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Fri Dec 20 15:36:30 2013 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 43 +++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/dcf2a266/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index da3b66d..01c3cb0 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -21,15 +21,17 @@ Information about setting up your Google OAUTH2 credentials:
 For libcloud, there are two basic methods for authenticating to Google using
 OAUTH2: Service Accounts and Client IDs for Installed Applications.
 
-Both are initially set up from the
-U{API Console<https://code.google.com/apis/console#access>}
+Both are initially set up from the Cloud Console_
+_Console: https://cloud.google.com/console
 
 Setting up Service Account authentication (note that you need the PyCrypto
 package installed to use this):
-    - Go to the API Console
-    - Click on "Create another client ID..."
-    - Select "Service account" and click on "Create client ID"
-    - Download the Private Key
+    - Go to the Console
+    - Go to your project and then to "APIs & auth" on the left
+    - Click on "Credentials"
+    - Click on "Create New Client ID..."
+    - Select "Service account" and click on "Create Client ID"
+    - Download the Private Key (should happen automatically).
     - The key that you download is a PKCS12 key.  It needs to be converted to
       the PEM format.
     - Convert the key using OpenSSL (the default password is 'notasecret'):
@@ -40,9 +42,11 @@ package installed to use this):
       address" in as the user_id and the path to the .pem file as the key.
 
 Setting up Installed Application authentication:
-    - Go to the API Connsole
-    - Click on "Create another client ID..."
-    - Select "Installed application" and click on "Create client ID"
+    - Go to the Connsole
+    - Go to your projcet and then to "APIs & auth" on the left
+    - Click on "Credentials"
+    - Select "Installed application" and "Other" then click on
+      "Create Client ID"
     - To Authenticate, pass in the "Client ID" as the user_id and the "Client
       secret" as the key
     - The first time that you do this, the libcloud will give you a URL to
@@ -108,6 +112,10 @@ class GoogleBaseError(ProviderError):
         super(GoogleBaseError, self).__init__(value, http_code, driver)
 
 
+class InvalidRequestError(GoogleBaseError):
+    pass
+
+
 class JsonParseError(GoogleBaseError):
     pass
 
@@ -159,9 +167,14 @@ class GoogleResponse(JsonResponse):
             err = body['error']['errors'][0]
         else:
             err = body['error']
+        
+        if 'code' in err:
+            code = err.get('code')
+            message = err.get('message')
+        else:
+            code = None
+            message = body.get('error_description', err)
 
-        code = err.get('code')
-        message = err.get('message')
         return (code, message)
 
     def parse_body(self):
@@ -208,6 +221,14 @@ class GoogleResponse(JsonResponse):
                 code = None
             raise ResourceNotFoundError(message, self.status, code)
 
+        elif self.status == httplib.BAD_REQUEST:
+            if (not json_error) and ('error' in body):
+                (code, message) = self._get_error(body)
+            else:
+                message = body
+                code = None
+            raise InvalidRequestError(message, self.status, code) 
+                
         else:
             if (not json_error) and ('error' in body):
                 (code, message) = self._get_error(body)


[15/44] git commit: Fix signature for create_volume to align with the base API

Posted by to...@apache.org.
Fix signature for create_volume to align with the base API


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

Branch: refs/heads/trunk
Commit: b700762960ab4d8810fd3cc26aa49ac86beaeee8
Parents: 40a18cb
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 14:20:40 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Fri Dec 20 14:20:40 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b7007629/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index df865b4..25bafcf 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1632,8 +1632,8 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_targetpool(name, region)
 
-    def _create_vol_req(self, size, name, location=None, image=None,
-                        snapshot=None):
+    def _create_vol_req(self, size, name, location=None, snapshot=None,
+                        image=None):
         """
         Assemble the request/data for creating a volume.
 
@@ -1650,12 +1650,12 @@ class GCENodeDriver(NodeDriver):
         :type     location: ``str`` or :class:`GCEZone` or
                             :class:`NodeLocation` or ``None``
 
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
         :keyword  snapshot: Snapshot to create image from
         :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
         :return:  Tuple containg the request string, the data dictionary and
                   the URL parameters
         :rtype:   ``tuple``
@@ -1687,8 +1687,8 @@ class GCENodeDriver(NodeDriver):
 
         return request, volume_data, params
 
-    def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None, use_existing=True):
+    def create_volume(self, size, name, location=None, snapshot=None,
+                      image=None, use_existing=True):
         """
         Create a volume (disk).
 
@@ -1703,12 +1703,12 @@ class GCENodeDriver(NodeDriver):
         :type     location: ``str`` or :class:`GCEZone` or
                             :class:`NodeLocation` or ``None``
 
-        :keyword  image: Image to create disk from.
-        :type     image: :class:`NodeImage` or ``str`` or ``None``
-
         :keyword  snapshot: Snapshot to create image from
         :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
+        :keyword  image: Image to create disk from.
+        :type     image: :class:`NodeImage` or ``str`` or ``None``
+
         :keyword  use_existing: If True and a disk with the given name already
                                 exists, return an object for that disk instead
                                 of attempting to create a new disk.
@@ -1718,7 +1718,7 @@ class GCENodeDriver(NodeDriver):
         :rtype:   :class:`StorageVolume`
         """
         request, volume_data, params = self._create_vol_req(
-            size, name, location, image, snapshot)
+            size, name, location, snapshot, image)
         try:
             self.connection.async_request(request, method='POST',
                                           data=volume_data, params=params)


[29/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
index b8a3555..9fccb06 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances.json
@@ -3,230 +3,53 @@
   "items": [
     {
       "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:00:12.021-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "1845312225624811608",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "node-name",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "173.255.115.146",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.113.94"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "42WmSpB8rSM="
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:19.247-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "8573880455005118258",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-multiple-nodes-000",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.81.107",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.224.165"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-multiple-nodes-000",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:19.662-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "17221721898919682654",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-multiple-nodes-001",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.81.166",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.223.109"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-multiple-nodes-001",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:10:09.700-07:00",
-      "disks": [
-        {
-          "index": 0,
-          "kind": "compute#attachedDisk",
-          "mode": "READ_WRITE",
-          "type": "SCRATCH"
-        }
-      ],
-      "id": "03138438763739542377",
-      "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-      "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-      "metadata": {
-        "fingerprint": "42WmSpB8rSM=",
-        "kind": "compute#metadata"
-      },
-      "name": "libcloud-demo-np-node",
-      "networkInterfaces": [
-        {
-          "accessConfigs": [
-            {
-              "kind": "compute#accessConfig",
-              "name": "External NAT",
-              "natIP": "108.59.80.244",
-              "type": "ONE_TO_ONE_NAT"
-            }
-          ],
-          "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.147.18"
-        }
-      ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-np-node",
-      "status": "RUNNING",
-      "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
-      },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-    },
-    {
-      "canIpForward": false,
-      "creationTimestamp": "2013-06-26T15:11:02.386-07:00",
+      "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
       "disks": [
         {
           "boot": true,
-          "deviceName": "libcloud-demo-boot-disk",
+          "deviceName": "persistent-disk-0",
           "index": 0,
           "kind": "compute#attachedDisk",
           "mode": "READ_WRITE",
-          "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/disks/libcloud-demo-boot-disk",
+          "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
           "type": "PERSISTENT"
         }
       ],
-      "id": "2378270030714524465",
-      "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+      "id": "4006034190819017667",
       "kind": "compute#instance",
-      "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+      "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
       "metadata": {
         "fingerprint": "42WmSpB8rSM=",
         "kind": "compute#metadata"
       },
-      "name": "libcloud-demo-persist-node",
+      "name": "node-name",
       "networkInterfaces": [
         {
           "accessConfigs": [
             {
               "kind": "compute#accessConfig",
               "name": "External NAT",
-              "natIP": "108.59.81.66",
+              "natIP": "23.236.58.15",
               "type": "ONE_TO_ONE_NAT"
             }
           ],
           "name": "nic0",
-          "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-          "networkIP": "10.240.192.190"
+          "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+          "networkIP": "10.240.72.75"
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/libcloud-demo-persist-node",
+      "scheduling": {
+        "automaticRestart": true,
+        "onHostMaintenance": "MIGRATE"
+      },
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
       "status": "RUNNING",
       "tags": {
-        "fingerprint": "W7t6ZyTyIrc=",
-        "items": [
-          "libcloud"
-        ]
+        "fingerprint": "42WmSpB8rSM="
       },
-      "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+      "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
     }
   ],
   "kind": "compute#instanceList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances"
-}
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
index eaefc2a..43661c2 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T16:12:30.443-07:00",
+  "creationTimestamp": "2013-12-13T10:54:07.687-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "lcnode-000",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-000",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "5390075309006132922",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "17170905942674172532",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "108.59.81.107",
+          "natIP": "173.255.114.35",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.106.153"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.160.66"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
index e1e5072..ffbf152 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-000_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-000_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-000_delete",
   "startTime": "2013-06-26T16:13:12.948-07:00",
   "status": "PENDING",
   "targetId": "5390075309006132922",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-000",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-000",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
index b4a670d..7cd6be9 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T16:12:51.782-07:00",
+  "creationTimestamp": "2013-12-13T10:54:08.639-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "lcnode-001",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/lcnode-001",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "16630486471904253898",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "09356229693786319079",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "108.59.81.166",
+          "natIP": "173.255.117.19",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.96.232"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.168.208"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
index f52765d..fa887ce 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_lcnode-001_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_lcnode-001_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_lcnode-001_delete",
   "startTime": "2013-06-26T16:13:40.620-07:00",
   "status": "PENDING",
   "targetId": "16630486471904253898",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
index 7845777..439e00b 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name.json
@@ -1,18 +1,20 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-06-26T15:00:12.021-07:00",
+  "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "persistent-disk-0",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "1845312225624811608",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
+  "id": "4006034190819017667",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "metadata": {
     "fingerprint": "42WmSpB8rSM=",
     "kind": "compute#metadata"
@@ -24,19 +26,23 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.115.146",
+          "natIP": "23.236.58.15",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.113.94"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.72.75"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "42WmSpB8rSM="
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
index e9e4964..e6167b5 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_attachDisk_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "operationType": "attachDisk",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_attachDisk_post",
   "startTime": "2013-06-26T16:48:27.762-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
index 0df1b9a..e74dbba 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_delete.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_delete",
   "operationType": "delete",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_delete",
   "startTime": "2013-06-26T10:05:40.405-07:00",
   "status": "PENDING",
   "targetId": "07410051435384876224",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
index 36ded09..d8d2e63 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_detachDisk_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "operationType": "detachDisk",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_detachDisk_post",
   "startTime": "2013-06-26T16:48:35.398-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
index d095030..240a255 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_reset_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_reset_post",
   "operationType": "reset",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_reset_post",
   "startTime": "2013-06-26T15:03:02.813-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
index 87e67ec..2dfdcd4 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_node-name_setTags_post.json
@@ -5,11 +5,11 @@
   "name": "operation-zones_us-central1-a_instances_node-name_setTags_post",
   "operationType": "setTags",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_node-name_setTags_post",
   "startTime": "2013-06-26T21:20:04.103-07:00",
   "status": "PENDING",
   "targetId": "1845312225624811608",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
index d6b8ad7..77c95e8 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_instances_post.json
@@ -5,10 +5,10 @@
   "name": "operation-zones_us-central1-a_instances_post",
   "operationType": "insert",
   "progress": 0,
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/operations/operation-zones_us-central1-a_instances_post",
   "startTime": "2013-06-26T16:12:51.537-07:00",
   "status": "PENDING",
-  "targetLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/lcnode-001",
+  "targetLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/lcnode-001",
   "user": "897001307951@developer.gserviceaccount.com",
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
index b4e795b..7cbae6f 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes.json
@@ -12,7 +12,7 @@
       "maximumPersistentDisksSizeGb": "3072",
       "memoryMb": 614,
       "name": "f1-micro",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
       "zone": "us-central1-a"
     },
     {
@@ -26,7 +26,7 @@
       "maximumPersistentDisksSizeGb": "3072",
       "memoryMb": 1740,
       "name": "g1-small",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
       "zone": "us-central1-a"
     },
     {
@@ -40,11 +40,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 1843,
       "name": "n1-highcpu-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "15178384466070744001",
@@ -59,7 +64,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -73,11 +78,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 3686,
       "name": "n1-highcpu-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "01151097524490134507",
@@ -92,7 +102,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -106,11 +116,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 7373,
       "name": "n1-highcpu-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "02507333096579477005",
@@ -128,7 +143,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
       "zone": "us-central1-a"
     },
     {
@@ -142,11 +157,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 13312,
       "name": "n1-highmem-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "00770157291441082211",
@@ -161,7 +181,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -175,11 +195,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 26624,
       "name": "n1-highmem-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "05095504563332567951",
@@ -194,7 +219,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -208,11 +233,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 53248,
       "name": "n1-highmem-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "07181827135536388552",
@@ -230,7 +260,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
       "zone": "us-central1-a"
     },
     {
@@ -244,11 +274,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 3840,
       "name": "n1-standard-1",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+        "state": "DEPRECATED"
+      },
       "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
       "guestCpus": 1,
       "id": "10583029372018866711",
@@ -263,7 +298,7 @@
           "diskGb": 420
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
       "zone": "us-central1-a"
     },
     {
@@ -277,11 +312,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 7680,
       "name": "n1-standard-2",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+        "state": "DEPRECATED"
+      },
       "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
       "guestCpus": 2,
       "id": "06313284160910191442",
@@ -296,7 +336,7 @@
           "diskGb": 870
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
       "zone": "us-central1-a"
     },
     {
@@ -310,11 +350,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 15360,
       "name": "n1-standard-4",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+        "state": "DEPRECATED"
+      },
       "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
       "guestCpus": 4,
       "id": "00523085164784013586",
@@ -329,7 +374,7 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
       "zone": "us-central1-a"
     },
     {
@@ -343,11 +388,16 @@
       "maximumPersistentDisksSizeGb": "10240",
       "memoryMb": 30720,
       "name": "n1-standard-8",
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
       "zone": "us-central1-a"
     },
     {
       "creationTimestamp": "2012-06-07T13:51:19.936-07:00",
+      "deprecated": {
+        "deprecated": "2013-12-02T20:00:00-08:00",
+        "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8",
+        "state": "DEPRECATED"
+      },
       "description": "8 vCPUs, 30 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
       "guestCpus": 8,
       "id": "00035824420671580077",
@@ -365,10 +415,10 @@
           "diskGb": 1770
         }
       ],
-      "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8-d",
+      "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-8-d",
       "zone": "us-central1-a"
     }
   ],
   "kind": "compute#machineTypeList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
index 961aa26..d1b3d74 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-a_machineTypes_n1-standard-1.json
@@ -9,6 +9,6 @@
   "maximumPersistentDisksSizeGb": "10240",
   "memoryMb": 3840,
   "name": "n1-standard-1",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
   "zone": "us-central1-a"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
index ad229a5..858b0de 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-000.json
@@ -1,21 +1,22 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-09-02T22:25:15.878-07:00",
+  "creationTimestamp": "2013-12-13T10:51:24.339-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "libcloud-lb-demo-www-000",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/libcloud-lb-demo-www-000",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "16051209904934263688",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
-  "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+  "id": "08447900841145802741",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
   "metadata": {
-    "fingerprint": "n9EGknQZPSA=",
+    "fingerprint": "IZjMMp0A_8k=",
     "items": [
       {
         "key": "startup-script",
@@ -31,16 +32,20 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.113.234",
+          "natIP": "23.236.58.15",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.138.154"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.104.11"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-000",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "XI0he92M8l8=",
@@ -48,5 +53,5 @@
       "libcloud-lb-demo-www"
     ]
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
index 3cc0dae..df6b0c6 100644
--- a/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
+++ b/libcloud/test/compute/fixtures/gce/zones_us-central1-b_instances_libcloud-lb-demo-www-001.json
@@ -1,21 +1,22 @@
 {
   "canIpForward": false,
-  "creationTimestamp": "2013-09-02T22:25:16.253-07:00",
+  "creationTimestamp": "2013-12-13T10:51:25.165-08:00",
   "disks": [
     {
+      "boot": true,
+      "deviceName": "libcloud-lb-demo-www-001",
       "index": 0,
       "kind": "compute#attachedDisk",
       "mode": "READ_WRITE",
-      "type": "SCRATCH"
+      "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/libcloud-lb-demo-www-001",
+      "type": "PERSISTENT"
     }
   ],
-  "id": "11204787063927654129",
-  "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130723",
-  "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+  "id": "11523404878553997348",
   "kind": "compute#instance",
-  "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+  "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
   "metadata": {
-    "fingerprint": "n9EGknQZPSA=",
+    "fingerprint": "09vSzO6KXcw=",
     "items": [
       {
         "key": "startup-script",
@@ -31,16 +32,20 @@
         {
           "kind": "compute#accessConfig",
           "name": "External NAT",
-          "natIP": "173.255.114.210",
+          "natIP": "23.236.58.59",
           "type": "ONE_TO_ONE_NAT"
         }
       ],
       "name": "nic0",
-      "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-      "networkIP": "10.240.0.123"
+      "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+      "networkIP": "10.240.94.107"
     }
   ],
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
+  "scheduling": {
+    "automaticRestart": true,
+    "onHostMaintenance": "MIGRATE"
+  },
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/instances/libcloud-lb-demo-www-001",
   "status": "RUNNING",
   "tags": {
     "fingerprint": "XI0he92M8l8=",
@@ -48,5 +53,5 @@
       "libcloud-lb-demo-www"
     ]
   },
-  "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
-}
\ No newline at end of file
+  "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 52c462a..3462f64 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -96,7 +96,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
     def test_match_images(self):
         project = 'debian-cloud'
         image = self.driver._match_images(project, 'debian-7')
-        self.assertEqual(image.name, 'debian-7-wheezy-v20131014')
+        self.assertEqual(image.name, 'debian-7-wheezy-v20131120')
         image = self.driver._match_images(project, 'debian-6')
         self.assertEqual(image.name, 'debian-6-squeeze-v20130926')
 
@@ -113,7 +113,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
 
     def test_ex_list_healthchecks(self):
         healthchecks = self.driver.ex_list_healthchecks()
-        self.assertEqual(len(healthchecks), 2)
+        self.assertEqual(len(healthchecks), 3)
         self.assertEqual(healthchecks[0].name, 'basic-check')
 
     def test_ex_list_firewalls(self):
@@ -137,7 +137,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         local_images = self.driver.list_images()
         debian_images = self.driver.list_images(ex_project='debian-cloud')
         self.assertEqual(len(local_images), 2)
-        self.assertEqual(len(debian_images), 17)
+        self.assertEqual(len(debian_images), 19)
         self.assertEqual(local_images[0].name, 'debian-7-wheezy-v20130617')
         self.assertEqual(local_images[1].name, 'centos-6-v20131118')
 
@@ -155,9 +155,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         nodes = self.driver.list_nodes()
         nodes_all = self.driver.list_nodes(ex_zone='all')
         nodes_uc1a = self.driver.list_nodes(ex_zone='us-central1-a')
-        self.assertEqual(len(nodes), 5)
+        self.assertEqual(len(nodes), 1)
         self.assertEqual(len(nodes_all), 8)
-        self.assertEqual(len(nodes_uc1a), 5)
+        self.assertEqual(len(nodes_uc1a), 1)
         self.assertEqual(nodes[0].name, 'node-name')
         self.assertEqual(nodes_uc1a[0].name, 'node-name')
         names = [n.name for n in nodes_all]
@@ -194,9 +194,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
         volumes = self.driver.list_volumes()
         volumes_all = self.driver.list_volumes('all')
         volumes_uc1a = self.driver.list_volumes('us-central1-a')
-        self.assertEqual(len(volumes), 3)
-        self.assertEqual(len(volumes_all), 5)
-        self.assertEqual(len(volumes_uc1a), 3)
+        self.assertEqual(len(volumes), 2)
+        self.assertEqual(len(volumes_all), 10)
+        self.assertEqual(len(volumes_uc1a), 2)
         self.assertEqual(volumes[0].name, 'lcdisk')
         self.assertEqual(volumes_uc1a[0].name, 'lcdisk')
         names = [v.name for v in volumes_all]
@@ -544,12 +544,10 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin):
 
     def test_ex_get_zone(self):
         zone_name = 'us-central1-b'
-        expected_time_until = datetime.timedelta(days=129)
-        expected_duration = datetime.timedelta(days=8, hours=1)
         zone = self.driver.ex_get_zone(zone_name)
         self.assertEqual(zone.name, zone_name)
-        self.assertEqual(zone.time_until_mw, expected_time_until)
-        self.assertEqual(zone.next_mw_duration, expected_duration)
+        self.assertFalse(zone.time_until_mw)
+        self.assertFalse(zone.next_mw_duration)
 
         zone_no_mw = self.driver.ex_get_zone('us-central1-a')
         self.assertEqual(zone_no_mw.time_until_mw, None)
@@ -972,6 +970,77 @@ class GCEMockHttp(MockHttpTestCase):
             body = self.fixtures.load('zones_us-central1-a_disks_lcdisk.json')
         return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
 
+    def _zones_us_central1_a_disks_node_name(self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_a_disks_lcnode_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_a_disks_lcnode_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central1_b_disks_libcloud_lb_demo_www_002(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_boot_disk(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_np_node(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_001(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks(self, method, url, body, headers):
+        if method == 'POST':
+            body = self.fixtures.load('zones_us-central1-a_disks_post.json')
+        else:
+            body = self.fixtures.load('zones_us-central1-a_disks.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_np_node(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_boot_disk(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
+    def _zones_europe_west1_a_disks_libcloud_demo_europe_multiple_nodes_000(
+            self, method, url, body, headers):
+        body = self.fixtures.load('generic_disk.json')
+        return (httplib.OK, body, self.json_hdr, httplib.responses[httplib.OK])
+
     def _zones_europe_west1_a_instances(self, method, url, body, headers):
         if method == 'POST':
             body = self.fixtures.load(

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/loadbalancer/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_gce.py b/libcloud/test/loadbalancer/test_gce.py
index 55e29cc..9b55a2a 100644
--- a/libcloud/test/loadbalancer/test_gce.py
+++ b/libcloud/test/loadbalancer/test_gce.py
@@ -50,7 +50,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
         self.driver = GCELBDriver(*GCE_PARAMS, **kwargs)
 
     def test_get_node_from_ip(self):
-        ip = '8.35.197.91'
+        ip = '23.236.58.15'
         expected_name = 'node-name'
         node = self.driver._get_node_from_ip(ip)
         self.assertEqual(node.name, expected_name)
@@ -139,7 +139,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
         members = balancer.list_members()
         self.assertEqual(len(members), 2)
         member_ips = [m.ip for m in members]
-        self.assertTrue('173.255.113.234' in member_ips)
+        self.assertTrue('23.236.58.15' in member_ips)
 
     def test_ex_create_healthcheck(self):
         healthcheck_name = 'lchealthcheck'
@@ -158,7 +158,7 @@ class GCELoadBalancerTest(LibcloudTestCase):
 
     def test_ex_list_healthchecks(self):
         healthchecks = self.driver.ex_list_healthchecks()
-        self.assertEqual(len(healthchecks), 2)
+        self.assertEqual(len(healthchecks), 3)
         self.assertEqual(healthchecks[0].name, 'basic-check')
 
     def test_ex_balancer_detach_attach_healthcheck(self):


[32/44] Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json b/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
index b92af77..e8da4f8 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_machineTypes.json
@@ -4,40 +4,119 @@
     "zones/europe-west1-a": {
       "machineTypes": [
         {
-          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
-          "description": "8 vCPUs, 7.2 GB RAM",
-          "guestCpus": 8,
-          "id": "01206886442411821831",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "04759000181765218034",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "02507333096579477005",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8-d",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "guestCpus": 1,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/f1-micro",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "zone": "europe-west1-a"
         },
         {
           "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
           "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
           "guestCpus": 1,
           "id": "10583029372018866711",
@@ -52,44 +131,30 @@
               "diskGb": 420
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1-d",
-          "zone": "europe-west1-a"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
-          "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
           "guestCpus": 2,
-          "id": "00770157291441082211",
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
           "zone": "europe-west1-a"
         },
         {
           "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
           "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
           "id": "07181827135536388552",
@@ -107,48 +172,83 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "15178384466070744001",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4-d",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
+          "guestCpus": 2,
+          "id": "05438694236916301519",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+          "zone": "europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
           "zone": "europe-west1-a"
         },
         {
@@ -162,198 +262,237 @@
           "maximumPersistentDisksSizeGb": "3072",
           "memoryMb": 1740,
           "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/g1-small",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "16898271314080235997",
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
+          "scratchDisks": [
+            {
+              "diskGb": 870
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
           "guestCpus": 4,
-          "id": "11556032176405786676",
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
-          "guestCpus": 1,
-          "id": "1133568312750571513",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
+          "description": "8 vCPUs, 7.2 GB RAM",
+          "guestCpus": 8,
+          "id": "01206886442411821831",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/f1-micro",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-8",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
+          "guestCpus": 4,
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "06313284160910191442",
+          "id": "15178384466070744001",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-2-d",
           "zone": "europe-west1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "01151097524490134507",
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4-d",
           "zone": "europe-west1-a"
-        },
+        }
+      ]
+    },
+    "zones/europe-west1-b": {
+      "machineTypes": [
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-8",
-          "zone": "europe-west1-a"
-        },
-        {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4-d",
+          "zone": "europe-west1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-4",
-          "zone": "europe-west1-a"
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8-d",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
           "guestCpus": 1,
-          "id": "11077240422128681563",
-          "imageSpaceGb": 10,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
-          "zone": "europe-west1-a"
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/f1-micro",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highmem-4-d",
-          "zone": "europe-west1-a"
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2-d",
+          "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
-          "description": "4 vCPUs, 3.6 GB RAM",
-          "guestCpus": 4,
-          "id": "04759000181765218034",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-highcpu-4",
-          "zone": "europe-west1-a"
-        }
-      ]
-    },
-    "zones/europe-west1-b": {
-      "machineTypes": [
-        {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
+          "guestCpus": 2,
+          "id": "05438694236916301519",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
           "zone": "europe-west1-b"
         },
         {
           "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
           "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
           "id": "15178384466070744001",
@@ -368,21 +507,21 @@
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/g1-small",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
           "zone": "europe-west1-b"
         },
         {
@@ -396,130 +535,116 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
           "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
-          "guestCpus": 4,
-          "id": "11556032176405786676",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
+          "guestCpus": 1,
+          "id": "1500265464823777597",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/g1-small",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2",
-          "zone": "europe-west1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "07181827135536388552",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8-d",
-          "zone": "europe-west1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
-          "guestCpus": 2,
-          "id": "16898271314080235997",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4-d",
           "zone": "europe-west1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
           "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
           "guestCpus": 1,
           "id": "10583029372018866711",
@@ -534,195 +659,222 @@
               "diskGb": 420
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-1",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
           "guestCpus": 4,
-          "id": "01151097524490134507",
+          "id": "04759000181765218034",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4-d",
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
+          "guestCpus": 2,
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-8",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-2",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "00770157291441082211",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
+          "guestCpus": 4,
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-2-d",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "06313284160910191442",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
-              "diskGb": 870
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-8-d",
           "zone": "europe-west1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
-          "description": "4 vCPUs, 3.6 GB RAM",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
           "guestCpus": 4,
-          "id": "04759000181765218034",
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-highcpu-4",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-b/machineTypes/n1-highmem-4",
           "zone": "europe-west1-b"
-        },
+        }
+      ]
+    },
+    "zones/us-central1-a": {
+      "machineTypes": [
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "09494636486174545828",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+          "zone": "us-central1-a"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "15178384466070744001",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
-              "diskGb": 1770
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/n1-standard-4-d",
-          "zone": "europe-west1-b"
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+          "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
           "guestCpus": 1,
-          "id": "1133568312750571513",
+          "id": "1500265464823777597",
           "imageSpaceGb": 0,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 4,
           "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-b/machineTypes/f1-micro",
-          "zone": "europe-west1-b"
-        }
-      ]
-    },
-    "zones/us-central1-a": {
-      "machineTypes": [
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+          "zone": "us-central1-a"
+        },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "15178384466070744001",
+          "id": "06313284160910191442",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
+          "memoryMb": 7680,
+          "name": "n1-standard-2-d",
           "scratchDisks": [
             {
               "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM",
-          "guestCpus": 2,
-          "id": "16898271314080235997",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
+          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
+          "guestCpus": 1,
+          "id": "1133568312750571513",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 614,
+          "name": "f1-micro",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
-          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "00523085164784013586",
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4-d",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
           "zone": "us-central1-a"
         },
         {
@@ -736,86 +888,73 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 3686,
           "name": "n1-highcpu-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
-          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
-          "guestCpus": 1,
-          "id": "10583029372018866711",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1-d",
+          "memoryMb": 13312,
+          "name": "n1-highmem-2-d",
           "scratchDisks": [
             {
-              "diskGb": 420
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2013-04-25T13:32:49.088-07:00",
-          "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
-          "guestCpus": 1,
-          "id": "1133568312750571513",
-          "imageSpaceGb": 0,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 614,
-          "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/f1-micro",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
-          "guestCpus": 2,
-          "id": "05438694236916301519",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "06313284160910191442",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2-d",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
           "scratchDisks": [
             {
-              "diskGb": 870
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "02507333096579477005",
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
@@ -824,63 +963,59 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
-          "description": "4 vCPUs, 26 GB RAM",
-          "guestCpus": 4,
-          "id": "11556032176405786676",
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
-          "guestCpus": 4,
-          "id": "09494636486174545828",
+          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+            "state": "DEPRECATED"
+          },
+          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
+          "guestCpus": 1,
+          "id": "10583029372018866711",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+          "memoryMb": 3840,
+          "name": "n1-standard-1-d",
+          "scratchDisks": [
+            {
+              "diskGb": 420
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
+          "creationTimestamp": "2012-11-16T11:46:10.572-08:00",
+          "description": "2 vCPUs, 1.8 GB RAM",
+          "guestCpus": 2,
+          "id": "16898271314080235997",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
-          "zone": "us-central1-a"
-        },
-        {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/g1-small",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-2",
           "zone": "us-central1-a"
         },
         {
@@ -894,105 +1029,105 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
           "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
           "guestCpus": 4,
-          "id": "05095504563332567951",
+          "id": "11556032176405786676",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4-d",
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-4",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
-          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "01151097524490134507",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3686,
-          "name": "n1-highcpu-4-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-4-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
-          "guestCpus": 8,
-          "id": "01717932668777642040",
+          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
+          "description": "1 vCPU, 3.75 GB RAM",
+          "guestCpus": 1,
+          "id": "11077240422128681563",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8",
+          "memoryMb": 3840,
+          "name": "n1-standard-1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
-          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
+          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
+          "description": "2 vCPUs, 13 GB RAM",
           "guestCpus": 2,
-          "id": "00770157291441082211",
+          "id": "05438694236916301519",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 13312,
-          "name": "n1-highmem-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2-d",
+          "name": "n1-highmem-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-2",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
+          "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "00523085164784013586",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-2",
+          "memoryMb": 15360,
+          "name": "n1-standard-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-4-d",
           "zone": "us-central1-a"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "07181827135536388552",
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
@@ -1001,7 +1136,7 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-highcpu-8-d",
           "zone": "us-central1-a"
         }
       ]
@@ -1009,59 +1144,68 @@
     "zones/us-central1-b": {
       "machineTypes": [
         {
-          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
-          "description": "2 vCPUs, 7.5 GB RAM",
-          "guestCpus": 2,
-          "id": "17936898073622676356",
-          "imageSpaceGb": 10,
+          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
+          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
+          "guestCpus": 1,
+          "id": "1500265464823777597",
+          "imageSpaceGb": 0,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7680,
-          "name": "n1-standard-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
+          "maximumPersistentDisks": 4,
+          "maximumPersistentDisksSizeGb": "3072",
+          "memoryMb": 1740,
+          "name": "g1-small",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/g1-small",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:40:06.129-08:00",
-          "description": "2 vCPUs, 13 GB RAM",
+          "creationTimestamp": "2012-11-16T11:40:59.630-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 13 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
-          "id": "05438694236916301519",
+          "id": "00770157291441082211",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 13312,
-          "name": "n1-highmem-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2",
-          "zone": "us-central1-b"
-        },
-        {
-          "creationTimestamp": "2012-06-07T13:48:14.670-07:00",
-          "description": "1 vCPU, 3.75 GB RAM",
-          "guestCpus": 1,
-          "id": "11077240422128681563",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1",
+          "name": "n1-highmem-2-d",
+          "scratchDisks": [
+            {
+              "diskGb": 870
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-2-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
-          "description": "8 vCPUs, 7.2 GB RAM",
+          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
           "guestCpus": 8,
-          "id": "01206886442411821831",
+          "id": "02507333096579477005",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 7373,
-          "name": "n1-highcpu-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
+          "name": "n1-highcpu-8-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8-d",
           "zone": "us-central1-b"
         },
         {
@@ -1075,26 +1219,35 @@
           "maximumPersistentDisksSizeGb": "10240",
           "memoryMb": 1843,
           "name": "n1-highcpu-2",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
-          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
-          "guestCpus": 2,
-          "id": "15178384466070744001",
+          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
+          "description": "8 vCPUs, 52 GB RAM",
+          "guestCpus": 8,
+          "id": "01717932668777642040",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 1843,
-          "name": "n1-highcpu-2-d",
-          "scratchDisks": [
-            {
-              "diskGb": 870
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:42:08.983-08:00",
+          "description": "4 vCPUs, 26 GB RAM",
+          "guestCpus": 4,
+          "id": "11556032176405786676",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4",
           "zone": "us-central1-b"
         },
         {
@@ -1108,33 +1261,16 @@
           "maximumPersistentDisksSizeGb": "3072",
           "memoryMb": 614,
           "name": "f1-micro",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/f1-micro",
-          "zone": "us-central1-b"
-        },
-        {
-          "creationTimestamp": "2012-11-16T11:51:04.549-08:00",
-          "description": "8 vCPUS, 7.2 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "02507333096579477005",
-          "imageSpaceGb": 10,
-          "kind": "compute#machineType",
-          "maximumPersistentDisks": 16,
-          "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 7373,
-          "name": "n1-highcpu-8-d",
-          "scratchDisks": [
-            {
-              "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
-            }
-          ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/f1-micro",
           "zone": "us-central1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:50:05.677-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
+            "state": "DEPRECATED"
+          },
           "description": "4 vCPUs, 15 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
           "id": "00523085164784013586",
@@ -1149,113 +1285,171 @@
               "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:48:34.258-07:00",
-          "description": "1 vCPU, 3.75 GB RAM, 1 scratch disk (420 GB)",
-          "guestCpus": 1,
-          "id": "10583029372018866711",
+          "creationTimestamp": "2012-11-16T11:47:07.825-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2",
+            "state": "DEPRECATED"
+          },
+          "description": "2 vCPUs, 1.8 GB RAM, 1 scratch disk (870 GB)",
+          "guestCpus": 2,
+          "id": "15178384466070744001",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 3840,
-          "name": "n1-standard-1-d",
+          "memoryMb": 1843,
+          "name": "n1-highcpu-2-d",
           "scratchDisks": [
             {
-              "diskGb": 420
+              "diskGb": 870
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-1-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-2-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
-          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
-          "guestCpus": 8,
-          "id": "07181827135536388552",
+          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
+          "guestCpus": 4,
+          "id": "05095504563332567951",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8-d",
+          "memoryMb": 26624,
+          "name": "n1-highmem-4-d",
           "scratchDisks": [
             {
               "diskGb": 1770
-            },
-            {
-              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2013-04-25T13:32:45.550-07:00",
-          "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
-          "guestCpus": 1,
-          "id": "1500265464823777597",
-          "imageSpaceGb": 0,
+          "creationTimestamp": "2012-06-07T13:48:56.867-07:00",
+          "description": "2 vCPUs, 7.5 GB RAM",
+          "guestCpus": 2,
+          "id": "17936898073622676356",
+          "imageSpaceGb": 10,
           "kind": "compute#machineType",
-          "maximumPersistentDisks": 4,
-          "maximumPersistentDisksSizeGb": "3072",
-          "memoryMb": 1740,
-          "name": "g1-small",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/g1-small",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 7680,
+          "name": "n1-standard-2",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:44:25.985-08:00",
-          "description": "8 vCPUs, 52 GB RAM",
+          "creationTimestamp": "2012-11-16T11:48:06.087-08:00",
+          "description": "4 vCPUs, 3.6 GB RAM",
+          "guestCpus": 4,
+          "id": "04759000181765218034",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-11-16T11:50:15.128-08:00",
+          "description": "8 vCPUs, 7.2 GB RAM",
           "guestCpus": 8,
-          "id": "01717932668777642040",
+          "id": "01206886442411821831",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 53248,
-          "name": "n1-highmem-8",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+          "memoryMb": 7373,
+          "name": "n1-highcpu-8",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-8",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
-          "description": "4 vCPUs, 15 GB RAM",
+          "creationTimestamp": "2012-11-16T11:49:07.563-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4",
+            "state": "DEPRECATED"
+          },
+          "description": "4 vCPUS, 3.6 GB RAM, 1 scratch disk (1770 GB)",
           "guestCpus": 4,
-          "id": "09494636486174545828",
+          "id": "01151097524490134507",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 15360,
-          "name": "n1-standard-4",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
+          "memoryMb": 3686,
+          "name": "n1-highcpu-4-d",
+          "scratchDisks": [
+            {
+              "diskGb": 1770
+            }
+          ],
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highcpu-4-d",
           "zone": "us-central1-b"
         },
         {
-          "creationTimestamp": "2012-11-16T11:43:17.400-08:00",
-          "description": "4 vCPUs, 26 GB RAM, 1 scratch disk (1770 GB)",
-          "guestCpus": 4,
-          "id": "05095504563332567951",
+          "creationTimestamp": "2012-11-16T11:45:08.195-08:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8",
+            "state": "DEPRECATED"
+          },
+          "description": "8 vCPUs, 52 GB RAM, 2 scratch disks (1770 GB, 1770 GB)",
+          "guestCpus": 8,
+          "id": "07181827135536388552",
           "imageSpaceGb": 10,
           "kind": "compute#machineType",
           "maximumPersistentDisks": 16,
           "maximumPersistentDisksSizeGb": "10240",
-          "memoryMb": 26624,
-          "name": "n1-highmem-4-d",
+          "memoryMb": 53248,
+          "name": "n1-highmem-8-d",
           "scratchDisks": [
             {
               "diskGb": 1770
+            },
+            {
+              "diskGb": 1770
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-4-d",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-highmem-8-d",
+          "zone": "us-central1-b"
+        },
+        {
+          "creationTimestamp": "2012-06-07T13:49:40.050-07:00",
+          "description": "4 vCPUs, 15 GB RAM",
+          "guestCpus": 4,
+          "id": "09494636486174545828",
+          "imageSpaceGb": 10,
+          "kind": "compute#machineType",
+          "maximumPersistentDisks": 16,
+          "maximumPersistentDisksSizeGb": "10240",
+          "memoryMb": 15360,
+          "name": "n1-standard-4",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-4",
           "zone": "us-central1-b"
         },
         {
           "creationTimestamp": "2012-06-07T13:49:19.448-07:00",
+          "deprecated": {
+            "deprecated": "2013-12-02T20:00:00-08:00",
+            "replacement": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/machineTypes/n1-standard-2",
+            "state": "DEPRECATED"
+          },
           "description": "2 vCPUs, 7.5 GB RAM, 1 scratch disk (870 GB)",
           "guestCpus": 2,
           "id": "06313284160910191442",
@@ -127

<TRUNCATED>

[25/44] git commit: One more lint fix

Posted by to...@apache.org.
One more lint fix


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

Branch: refs/heads/trunk
Commit: d08d96b3d936a7bbbed9ceea28d9583a10a233cd
Parents: aa6f733
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 14:13:47 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d08d96b3/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index d80c37b..0f5e13b 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1498,7 +1498,7 @@ class GCENodeDriver(NodeDriver):
                     code = e.code
                     disk_res = None
                     status['disk'] = GCEFailedDisk(status['name'],
-                                                    error, code)
+                                                   error, code)
                 status['disk_response'] = disk_res
 
             status_list.append(status)


[07/44] git commit: Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
Test updates for v1 plus additional changes:
  Add snapshot support
  Add .get() to many locations to make the conversion from json dictionary to
  libcloud objects more robust.


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

Branch: refs/heads/trunk
Commit: 2d3caa8cf79aae4ed7fead824178eeac5fa9ba82
Parents: 0d47758
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 13 13:07:26 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Fri Dec 13 13:07:26 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py                 |  270 ++-
 .../fixtures/gce/aggregated_addresses.json      |   18 +-
 .../compute/fixtures/gce/aggregated_disks.json  |  115 +-
 .../gce/aggregated_forwardingRules.json         |   32 +-
 .../fixtures/gce/aggregated_instances.json      |  260 +--
 .../fixtures/gce/aggregated_machineTypes.json   | 1825 ++++++++++--------
 .../fixtures/gce/aggregated_targetPools.json    |   28 +-
 .../test/compute/fixtures/gce/generic_disk.json |   13 +
 .../compute/fixtures/gce/global_firewalls.json  |   22 +-
 .../gce/global_firewalls_lcfirewall.json        |    4 +-
 .../gce/global_firewalls_lcfirewall_delete.json |    4 +-
 .../gce/global_firewalls_lcfirewall_put.json    |    4 +-
 .../fixtures/gce/global_firewalls_post.json     |    4 +-
 .../fixtures/gce/global_httpHealthChecks.json   |   24 +-
 .../global_httpHealthChecks_basic-check.json    |    2 +-
 .../global_httpHealthChecks_lchealthcheck.json  |    2 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ...althChecks_libcloud-lb-demo-healthcheck.json |    2 +-
 .../gce/global_httpHealthChecks_post.json       |    4 +-
 .../compute/fixtures/gce/global_images.json     |   10 +-
 .../compute/fixtures/gce/global_networks.json   |    8 +-
 .../fixtures/gce/global_networks_default.json   |    2 +-
 .../fixtures/gce/global_networks_lcnetwork.json |    2 +-
 .../gce/global_networks_lcnetwork_delete.json   |    4 +-
 ...l_networks_libcloud-demo-europe-network.json |    2 +-
 .../global_networks_libcloud-demo-network.json  |    2 +-
 .../fixtures/gce/global_networks_post.json      |    4 +-
 ...tion_global_firewalls_lcfirewall_delete.json |    4 +-
 ...eration_global_firewalls_lcfirewall_put.json |    4 +-
 ...rations_operation_global_firewalls_post.json |    4 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ..._operation_global_httpHealthChecks_post.json |    4 +-
 ...ration_global_networks_lcnetwork_delete.json |    4 +-
 ...erations_operation_global_networks_post.json |    4 +-
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 ...tion_regions_us-central1_addresses_post.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...on_regions_us-central1_targetPools_post.json |    6 +-
 ...ion_zones_europe-west1-a_instances_post.json |    6 +-
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 ...peration_zones_us-central1-a_disks_post.json |    6 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    6 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 ...tion_zones_us-central1-a_instances_post.json |    6 +-
 libcloud/test/compute/fixtures/gce/project.json |    2 +-
 .../projects_debian-cloud_global_images.json    |  172 +-
 libcloud/test/compute/fixtures/gce/regions.json |   18 +-
 .../gce/regions_us-central1_addresses.json      |   10 +-
 ...regions_us-central1_addresses_lcaddress.json |    4 +-
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 .../gce/regions_us-central1_addresses_post.json |    6 +-
 .../regions_us-central1_forwardingRules.json    |   14 +-
 ...ntral1_forwardingRules_lcforwardingrule.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...al1_forwardingRules_libcloud-lb-demo-lb.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 .../gce/regions_us-central1_targetPools.json    |   24 +-
 ...ns_us-central1_targetPools_lctargetpool.json |   10 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...ral1_targetPools_libcloud-lb-demo-lb-tp.json |   12 +-
 .../regions_us-central1_targetPools_post.json   |    6 +-
 ...egions_us-central1_targetPools_www-pool.json |   12 +-
 libcloud/test/compute/fixtures/gce/zones.json   |   35 +-
 .../gce/zones_europe-west1-a_instances.json     |   83 +-
 .../zones_europe-west1-a_instances_post.json    |    6 +-
 ...rope-west1-a_machineTypes_n1-standard-1.json |    2 +-
 .../fixtures/gce/zones_us-central1-a.json       |    4 +-
 .../fixtures/gce/zones_us-central1-a_disks.json |   33 +-
 .../gce/zones_us-central1-a_disks_lcdisk.json   |    4 +-
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 .../gce/zones_us-central1-a_disks_post.json     |    6 +-
 .../gce/zones_us-central1-a_instances.json      |  213 +-
 ...ones_us-central1-a_instances_lcnode-000.json |   28 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...ones_us-central1-a_instances_lcnode-001.json |   26 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...zones_us-central1-a_instances_node-name.json |   26 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    8 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 .../gce/zones_us-central1-a_instances_post.json |    6 +-
 .../gce/zones_us-central1-a_machineTypes.json   |   96 +-
 ...s-central1-a_machineTypes_n1-standard-1.json |    2 +-
 ...l1-b_instances_libcloud-lb-demo-www-000.json |   29 +-
 ...l1-b_instances_libcloud-lb-demo-www-001.json |   31 +-
 libcloud/test/compute/test_gce.py               |   93 +-
 libcloud/test/loadbalancer/test_gce.py          |    6 +-
 106 files changed, 2252 insertions(+), 1710 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 852b944..faa2905 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -24,9 +24,11 @@ import sys
 from libcloud.common.google import GoogleResponse
 from libcloud.common.google import GoogleBaseConnection
 from libcloud.common.google import ResourceNotFoundError
+from libcloud.common.google import ResourceExistsError
 
 from libcloud.compute.base import Node, NodeDriver, NodeImage, NodeLocation
-from libcloud.compute.base import NodeSize, StorageVolume, UuidMixin
+from libcloud.compute.base import NodeSize, StorageVolume, VolumeSnapshot
+from libcloud.compute.base import UuidMixin
 from libcloud.compute.providers import Provider
 from libcloud.compute.types import NodeState
 
@@ -292,6 +294,13 @@ class GCERegion(UuidMixin):
             self.id, self.name, self.status)
 
 
+class GCESnapshot(VolumeSnapshot):
+    def __init__(self, id, name, size, status, driver, extra=None):
+        self.name = name
+        self.status = status
+        super(GCESnapshot, self).__init__(id, driver, size, extra)
+
+
 class GCETargetPool(UuidMixin):
     def __init__(self, id, name, region, healthchecks, nodes, driver,
                  extra=None):
@@ -953,6 +962,20 @@ class GCENodeDriver(NodeDriver):
                 list_sizes = [self._to_node_size(s) for s in response['items']]
         return list_sizes
 
+    def ex_list_snapshots(self):
+        """
+        Return the list of disk snapshots in the project.
+
+        :return:  A list of snapshot objects
+        :rtype:   ``list`` of :class:`GCESnapshot`
+        """
+        list_snapshots = []
+        request = '/global/snapshots'
+        response = self.connection.request(request, method='GET').object
+        list_snapshots = [self._to_snapshot(s) for s in
+                          response.get('items', [])]
+        return list_snapshots
+
     def ex_list_targetpools(self, region=None):
         """
         Return the list of target pools.
@@ -1310,7 +1333,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None, use_existing_disk=False):
+                    ex_boot_disk=None, use_existing_disk=True):
         """
         Create a new node and return a node object for the node.
 
@@ -1374,7 +1397,7 @@ class GCENodeDriver(NodeDriver):
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True, use_existing_disk=False,
+                                 ignore_errors=True, use_existing_disk=True,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1395,6 +1418,8 @@ class GCENodeDriver(NodeDriver):
         :param  image: The image to use to create the nodes.
         :type   image: ``str`` or :class:`NodeImage`
 
+        return self.ex_get_snapshot(name)
+
         :param  number: The number of nodes to create.
         :type   number: ``int``
 
@@ -1489,6 +1514,7 @@ class GCENodeDriver(NodeDriver):
                         e = self._catch_error(ignore_errors=ignore_errors)
                         error = e.value
                         code = e.code
+                        response = {'status': 'DONE'}
                     if response['status'] == 'DONE':
                         status['disk_response'] = None
                         if error:
@@ -1517,6 +1543,7 @@ class GCENodeDriver(NodeDriver):
                             e = self._catch_error(ignore_errors=ignore_errors)
                             error = e.value
                             code = e.code
+                            response = {'status': 'DONE'}
                         if response['status'] == 'DONE':
                             status['node_response'] = None
                         if error:
@@ -1607,8 +1634,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  image: Image to create disk from.
         :type     image: :class:`NodeImage` or ``str`` or ``None``
 
-        :keyword  snapshot: Snapshot to create image from (needs full URI)
-        :type     snapshot: ``str``
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
         :return:  Tuple containg the request string, the data dictionary and
                   the URL parameters
@@ -1626,8 +1653,15 @@ class GCENodeDriver(NodeDriver):
             volume_data['description'] = 'Image: %s' % (
                 image.extra['selfLink'])
         if snapshot:
-            volume_data['sourceSnapshot'] = snapshot
-            volume_data['description'] = 'Snapshot: %s' % (snapshot)
+            # Check for full URI to not break backward-compatibility
+            if snapshot.startswith('https'):
+                snapshot_link = snapshot
+            else:
+                if not hasattr(snapshot, 'name'):
+                    snapshot = self.ex_get_snapshot(snapshot)
+                snapshot_link = snapshot.extra['selfLink']
+            volume_data['sourceSnapshot'] = snapshot_link
+            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
         location = location or self.zone
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
@@ -1636,7 +1670,7 @@ class GCENodeDriver(NodeDriver):
         return request, volume_data, params
 
     def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None, use_existing=False):
+                      snapshot=None, use_existing=True):
         """
         Create a volume (disk).
 
@@ -1654,8 +1688,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  image: Image to create disk from.
         :type     image: :class:`NodeImage` or ``str`` or ``None``
 
-        :keyword  snapshot: Snapshot to create image from (needs full URI)
-        :type     snapshot: ``str``
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
         :keyword  use_existing: If True and a disk with the given name already
                                 exists, return an object for that disk instead
@@ -1666,20 +1700,37 @@ class GCENodeDriver(NodeDriver):
         :rtype:   :class:`StorageVolume`
         """
         vol = None
-        if use_existing:
-            try:
-                vol = self.ex_get_volume(name, location)
-            except:
-                pass
-        if vol:
-            return vol
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
-        self.connection.async_request(request, method='POST', data=volume_data,
-                                      params=params)
+        try:
+            self.connection.async_request(request, method='POST',
+                                          data=volume_data, params=params)
+        except ResourceExistsError:
+            e = sys.exc_info()[1]
+            if not use_existing:
+                raise e
 
         return self.ex_get_volume(name, location)
 
+    def create_volume_snapshot(self, volume, name):
+        """
+        Create a snapshot of the provided Volume.
+
+        :param  volume: A StorageVolume object
+        :type   volume: :class:`StorageVolume`
+
+        :return:  A GCE Snapshot object
+        :rtype:   :class:`GCESnapshot`
+        """
+        snapshot_data = {}
+        snapshot_data['name'] = name
+        request = '/zones/%s/disks/%s/createSnapshot' % (
+            volume.extra['zone'].name, volume.name)
+        self.connection.async_request(request, method='POST',
+                                      data=snapshot_data)
+
+        return self.ex_get_snapshot(name)
+
     def ex_update_healthcheck(self, healthcheck):
         """
         Update a health check with new values.
@@ -2093,22 +2144,31 @@ class GCENodeDriver(NodeDriver):
         self.connection.async_request(request, method='DELETE')
         return True
 
-    def destroy_node(self, node):
+    def destroy_node(self, node, destroy_boot_disk=False):
         """
         Destroy a node.
 
         :param  node: Node object to destroy
         :type   node: :class:`Node`
 
+        :keyword  destroy_boot_disk: If true, also destroy the node's
+                                     boot disk. (Note that this keyword is not
+                                     accessible from the node's .destroy()
+                                     method.)
+        :type     destroy_boot_disk: ``bool``
+
         :return:  True if successful
         :rtype:   ``bool``
         """
         request = '/zones/%s/instances/%s' % (node.extra['zone'].name,
                                               node.name)
         self.connection.async_request(request, method='DELETE')
+        if destroy_boot_disk and node.extra['boot_disk']:
+            node.extra['boot_disk'].destroy()
         return True
 
     def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
+                                  destroy_boot_disk=False,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
@@ -2120,6 +2180,10 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails to be destroyed.
         :type     ignore_errors: ``bool``
 
+        :keyword  destroy_boot_disk: If true, also destroy the nodes' boot
+                                     disks.
+        :type     destroy_boot_disk: ``bool``
+
         :keyword  timeout: Number of seconds to wait for all nodes to be
                            destroyed.
         :type     timeout: ``int``
@@ -2194,8 +2258,21 @@ class GCENodeDriver(NodeDriver):
         """
         request = '/zones/%s/disks/%s' % (volume.extra['zone'].name,
                                           volume.name)
-        self.connection.async_request(request,
-                                      method='DELETE')
+        self.connection.async_request(request, method='DELETE')
+        return True
+
+    def destroy_volume_snapshot(self, snapshot):
+        """
+        Destroy a snapshot.
+
+        :param  snapshot: Snapshot object to destroy
+        :type   snapshot: :class:`GCESnapshot`
+
+        :return:  True if successfull
+        :rtype:   ``bool``
+        """
+        request = '/global/snapshots/%s' % (snapshot.name)
+        self.connection.async_request(request, method='DELETE')
         return True
 
     def ex_get_address(self, name, region=None):
@@ -2356,6 +2433,20 @@ class GCENodeDriver(NodeDriver):
         response = self.connection.request(request, method='GET').object
         return self._to_node_size(response)
 
+    def ex_get_snapshot(self, name):
+        """
+        Return a Snapshot object based on snapshot name.
+
+        :param  name: The name of the snapshot
+        :type   name: ``str``
+
+        :return:  A GCESnapshot object for the snapshot
+        :rtype:   :class:`GCESnapshot`
+        """
+        request = '/global/snapshots/%s' % (name)
+        response = self.connection.request(request, method='GET').object
+        return self._to_snapshot(response)
+
     def ex_get_volume(self, name, zone=None):
         """
         Return a Volume object based on a volume name and optional zone.
@@ -2460,9 +2551,9 @@ class GCENodeDriver(NodeDriver):
 
         region = self.ex_get_region(address['region'])
 
-        extra['selfLink'] = address['selfLink']
-        extra['status'] = address['status']
-        extra['creationTimestamp'] = address['creationTimestamp']
+        extra['selfLink'] = address.get('selfLink')
+        extra['status'] = address.get('status')
+        extra['creationTimestamp'] = address.get('creationTimestamp')
 
         return GCEAddress(id=address['id'], name=address['name'],
                           address=address['address'],
@@ -2479,18 +2570,18 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEHealthCheck`
         """
         extra = {}
-        extra['selfLink'] = healthcheck['selfLink']
-        extra['creationTimestamp'] = healthcheck['creationTimestamp']
+        extra['selfLink'] = healthcheck.get('selfLink')
+        extra['creationTimestamp'] = healthcheck.get('creationTimestamp')
         extra['description'] = healthcheck.get('description')
         extra['host'] = healthcheck.get('host')
 
         return GCEHealthCheck(
             id=healthcheck['id'], name=healthcheck['name'],
-            path=healthcheck['requestPath'], port=healthcheck['port'],
-            interval=healthcheck['checkIntervalSec'],
-            timeout=healthcheck['timeoutSec'],
-            unhealthy_threshold=healthcheck['unhealthyThreshold'],
-            healthy_threshold=healthcheck['healthyThreshold'],
+            path=healthcheck.get('requestPath'), port=healthcheck.get('port'),
+            interval=healthcheck.get('checkIntervalSec'),
+            timeout=healthcheck.get('timeoutSec'),
+            unhealthy_threshold=healthcheck.get('unhealthyThreshold'),
+            healthy_threshold=healthcheck.get('healthyThreshold'),
             driver=self, extra=extra)
 
     def _to_firewall(self, firewall):
@@ -2504,8 +2595,8 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEFirewall`
         """
         extra = {}
-        extra['selfLink'] = firewall['selfLink']
-        extra['creationTimestamp'] = firewall['creationTimestamp']
+        extra['selfLink'] = firewall.get('selfLink')
+        extra['creationTimestamp'] = firewall.get('creationTimestamp')
         extra['description'] = firewall.get('description')
         extra['network_name'] = self._get_components_from_path(
             firewall['network'])['name']
@@ -2515,7 +2606,7 @@ class GCENodeDriver(NodeDriver):
         source_tags = firewall.get('sourceTags')
 
         return GCEFirewall(id=firewall['id'], name=firewall['name'],
-                           allowed=firewall['allowed'], network=network,
+                           allowed=firewall.get('allowed'), network=network,
                            source_ranges=source_ranges,
                            source_tags=source_tags,
                            driver=self, extra=extra)
@@ -2531,10 +2622,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEForwardingRule`
         """
         extra = {}
-        # Use .get to work around a current API bug.
         extra['selfLink'] = forwarding_rule.get('selfLink')
-        extra['portRange'] = forwarding_rule['portRange']
-        extra['creationTimestamp'] = forwarding_rule['creationTimestamp']
+        extra['portRange'] = forwarding_rule.get('portRange')
+        extra['creationTimestamp'] = forwarding_rule.get('creationTimestamp')
         extra['description'] = forwarding_rule.get('description')
 
         region = self.ex_get_region(forwarding_rule['region'])
@@ -2543,8 +2633,8 @@ class GCENodeDriver(NodeDriver):
 
         return GCEForwardingRule(id=forwarding_rule['id'],
                                  name=forwarding_rule['name'], region=region,
-                                 address=forwarding_rule['IPAddress'],
-                                 protocol=forwarding_rule['IPProtocol'],
+                                 address=forwarding_rule.get('IPAddress'),
+                                 protocol=forwarding_rule.get('IPProtocol'),
                                  targetpool=targetpool,
                                  driver=self, extra=extra)
 
@@ -2560,13 +2650,13 @@ class GCENodeDriver(NodeDriver):
         """
         extra = {}
 
-        extra['selfLink'] = network['selfLink']
-        extra['gatewayIPv4'] = network['gatewayIPv4']
+        extra['selfLink'] = network.get('selfLink')
+        extra['gatewayIPv4'] = network.get('gatewayIPv4')
         extra['description'] = network.get('description')
-        extra['creationTimestamp'] = network['creationTimestamp']
+        extra['creationTimestamp'] = network.get('creationTimestamp')
 
         return GCENetwork(id=network['id'], name=network['name'],
-                          cidr=network['IPv4Range'],
+                          cidr=network.get('IPv4Range'),
                           driver=self, extra=extra)
 
     def _to_node_image(self, image):
@@ -2582,8 +2672,8 @@ class GCENodeDriver(NodeDriver):
         extra = {}
         extra['preferredKernel'] = image.get('preferredKernel', None)
         extra['description'] = image.get('description', None)
-        extra['creationTimestamp'] = image['creationTimestamp']
-        extra['selfLink'] = image['selfLink']
+        extra['creationTimestamp'] = image.get('creationTimestamp')
+        extra['selfLink'] = image.get('selfLink')
         return NodeImage(id=image['id'], name=image['name'], driver=self,
                          extra=extra)
 
@@ -2615,29 +2705,35 @@ class GCENodeDriver(NodeDriver):
         private_ips = []
         extra = {}
 
-        extra['status'] = node['status']
+        extra['status'] = node.get('status')
         extra['description'] = node.get('description')
         extra['zone'] = self.ex_get_zone(node['zone'])
         extra['image'] = node.get('image')
-        extra['machineType'] = node['machineType']
-        extra['disks'] = node['disks']
-        extra['networkInterfaces'] = node['networkInterfaces']
+        extra['machineType'] = node.get('machineType')
+        extra['disks'] = node.get('disks', [])
+        extra['networkInterfaces'] = node.get('networkInterfaces')
         extra['id'] = node['id']
-        extra['selfLink'] = node['selfLink']
+        extra['selfLink'] = node.get('selfLink')
         extra['name'] = node['name']
-        extra['metadata'] = node['metadata']
+        extra['metadata'] = node.get('metadata')
         extra['tags_fingerprint'] = node['tags']['fingerprint']
 
+        extra['boot_disk'] = None
+        for disk in extra['disks']:
+            if disk.get('boot') and disk.get('type') == 'PERSISTENT':
+                bd = self._get_components_from_path(disk['source'])
+                extra['boot_disk'] = self.ex_get_volume(bd['name'], bd['zone'])
+
         if 'items' in node['tags']:
             tags = node['tags']['items']
         else:
             tags = []
         extra['tags'] = tags
 
-        for network_interface in node['networkInterfaces']:
-            private_ips.append(network_interface['networkIP'])
-            for access_config in network_interface['accessConfigs']:
-                public_ips.append(access_config['natIP'])
+        for network_interface in node.get('networkInterfaces', []):
+            private_ips.append(network_interface.get('networkIP'))
+            for access_config in network_interface.get('accessConfigs'):
+                public_ips.append(access_config.get('natIP'))
 
         # For the node attributes, use just machine and image names, not full
         # paths.  Full paths are available in the "extra" dict.
@@ -2663,19 +2759,19 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCENodeSize`
         """
         extra = {}
-        extra['selfLink'] = machine_type['selfLink']
+        extra['selfLink'] = machine_type.get('selfLink')
         extra['zone'] = self.ex_get_zone(machine_type['zone'])
-        extra['description'] = machine_type['description']
-        extra['guestCpus'] = machine_type['guestCpus']
-        extra['creationTimestamp'] = machine_type['creationTimestamp']
+        extra['description'] = machine_type.get('description')
+        extra['guestCpus'] = machine_type.get('guestCpus')
+        extra['creationTimestamp'] = machine_type.get('creationTimestamp')
         try:
             price = self._get_size_price(size_id=machine_type['name'])
         except KeyError:
             price = None
 
         return GCENodeSize(id=machine_type['id'], name=machine_type['name'],
-                           ram=machine_type['memoryMb'],
-                           disk=machine_type['imageSpaceGb'],
+                           ram=machine_type.get('memoryMb'),
+                           disk=machine_type.get('imageSpaceGb'),
                            bandwidth=0, price=price, driver=self, extra=extra)
 
     def _to_project(self, project):
@@ -2689,13 +2785,13 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEProject`
         """
         extra = {}
-        extra['selfLink'] = project['selfLink']
-        extra['creationTimestamp'] = project['creationTimestamp']
-        extra['description'] = project['description']
+        extra['selfLink'] = project.get('selfLink')
+        extra['creationTimestamp'] = project.get('creationTimestamp')
+        extra['description'] = project.get('description')
         metadata = project['commonInstanceMetadata'].get('items')
 
         return GCEProject(id=project['id'], name=project['name'],
-                          metadata=metadata, quotas=project['quotas'],
+                          metadata=metadata, quotas=project.get('quotas'),
                           driver=self, extra=extra)
 
     def _to_region(self, region):
@@ -2709,9 +2805,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCERegion`
         """
         extra = {}
-        extra['selfLink'] = region['selfLink']
-        extra['creationTimestamp'] = region['creationTimestamp']
-        extra['description'] = region['description']
+        extra['selfLink'] = region.get('selfLink')
+        extra['creationTimestamp'] = region.get('creationTimestamp')
+        extra['description'] = region.get('description')
 
         quotas = region.get('quotas')
         zones = [self.ex_get_zone(z) for z in region['zones']]
@@ -2721,10 +2817,30 @@ class GCENodeDriver(NodeDriver):
         deprecated = region.get('deprecated')
 
         return GCERegion(id=region['id'], name=region['name'],
-                         status=region['status'], zones=zones,
+                         status=region.get('status'), zones=zones,
                          quotas=quotas, deprecated=deprecated,
                          driver=self, extra=extra)
 
+    def _to_snapshot(self, snapshot):
+        """
+        Return a Snapshot object from the json-response dictionary.
+
+        :param  snapshot: The dictionary describing the snapshot
+        :type   snapshot: ``dict``
+
+        :return:  Snapshot object
+        :rtype:   :class:`VolumeSnapshot`
+        """
+        extra = {}
+        extra['selfLink'] = snapshot.get('selfLink')
+        extra['creationTimestamp'] = snapshot.get('creationTimestamp')
+        extra['sourceDisk'] = snapshot.get('sourceDisk')
+
+        return GCESnapshot(id=snapshot['id'], name=snapshot['name'],
+                           size=snapshot['diskSizeGb'],
+                           status=snapshot.get('status'), driver=self,
+                           extra=extra)
+
     def _to_storage_volume(self, volume):
         """
         Return a Volume object from the json-response dictionary.
@@ -2736,10 +2852,10 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`StorageVolume`
         """
         extra = {}
-        extra['selfLink'] = volume['selfLink']
+        extra['selfLink'] = volume.get('selfLink')
         extra['zone'] = self.ex_get_zone(volume['zone'])
-        extra['status'] = volume['status']
-        extra['creationTimestamp'] = volume['creationTimestamp']
+        extra['status'] = volume.get('status')
+        extra['creationTimestamp'] = volume.get('creationTimestamp')
         extra['description'] = volume.get('description')
 
         return StorageVolume(id=volume['id'], name=volume['name'],
@@ -2756,7 +2872,7 @@ class GCENodeDriver(NodeDriver):
         :rtype:  :class:`GCETargetPool`
         """
         extra = {}
-        extra['selfLink'] = targetpool['selfLink']
+        extra['selfLink'] = targetpool.get('selfLink')
         extra['description'] = targetpool.get('description')
         region = self.ex_get_region(targetpool['region'])
         healthcheck_list = [self.ex_get_healthcheck(h.split('/')[-1]) for h
@@ -2788,9 +2904,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEZone`
         """
         extra = {}
-        extra['selfLink'] = zone['selfLink']
-        extra['creationTimestamp'] = zone['creationTimestamp']
-        extra['description'] = zone['description']
+        extra['selfLink'] = zone.get('selfLink')
+        extra['creationTimestamp'] = zone.get('creationTimestamp')
+        extra['description'] = zone.get('description')
 
         deprecated = zone.get('deprecated')
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_addresses.json b/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
index eee3552..4bab3a2 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
@@ -10,8 +10,8 @@
           "id": "10955781597205896134",
           "kind": "compute#address",
           "name": "libcloud-demo-europe-address",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1/addresses/libcloud-demo-europe-address",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1/addresses/libcloud-demo-europe-address",
           "status": "RESERVED"
         }
       ]
@@ -25,8 +25,8 @@
           "id": "01531551729918243104",
           "kind": "compute#address",
           "name": "lcaddress",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
           "status": "RESERVED"
         },
         {
@@ -36,8 +36,8 @@
           "id": "17634862894218443422",
           "kind": "compute#address",
           "name": "libcloud-demo-address",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
           "status": "RESERVED"
         },
         {
@@ -47,8 +47,8 @@
           "id": "11879548153827627972",
           "kind": "compute#address",
           "name": "testaddress",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/testaddress",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/testaddress",
           "status": "RESERVED"
         }
       ]
@@ -67,5 +67,5 @@
     }
   },
   "kind": "compute#addressAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/addresses"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/addresses"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_disks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_disks.json b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
index 00d9112..9133041 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_disks.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
@@ -4,25 +4,53 @@
     "zones/europe-west1-a": {
       "disks": [
         {
-          "creationTimestamp": "2013-11-01T14:45:38.422-07:00",
-          "description": "Image: https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "id": "4294778976520895166",
+          "creationTimestamp": "2013-12-13T10:43:33.753-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "0819226106922408217",
           "kind": "compute#disk",
           "name": "libcloud-demo-europe-boot-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
           "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
-          "creationTimestamp": "2013-11-01T14:45:27.063-07:00",
-          "id": "2488119868186709482",
+          "creationTimestamp": "2013-12-13T10:43:20.420-08:00",
+          "id": "30789070506648158",
           "kind": "compute#disk",
           "name": "libcloud-demo-europe-attach-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
           "sizeGb": "1",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:43:07.390-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "01221310665639400697",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-europe-np-node",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:43:53.598-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "17495188440080825940",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-europe-multiple-nodes-000",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         }
       ]
     },
@@ -58,39 +86,80 @@
           "id": "8658241308250794904",
           "kind": "compute#disk",
           "name": "test1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/disks/test1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/test1",
           "sizeGb": "10",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
         }
       ]
     },
     "zones/us-central2-a": {
       "disks": [
         {
-          "creationTimestamp": "2013-11-01T14:43:36.763-07:00",
-          "id": "01690270691106097961",
+          "creationTimestamp": "2013-12-13T10:41:59.430-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "3371304879167251249",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-boot-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:42:15.355-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "12650345960824309663",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-multiple-nodes-000",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-000",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:41:52.533-08:00",
+          "id": "01867312924613359214",
           "kind": "compute#disk",
           "name": "libcloud-demo-attach-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
           "sizeGb": "1",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
-          "creationTimestamp": "2013-11-01T14:43:46.039-07:00",
-          "description": "Image: https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "id": "01805374214887472027",
+          "creationTimestamp": "2013-12-13T10:42:15.949-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "12498700959701905851",
           "kind": "compute#disk",
-          "name": "libcloud-demo-boot-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+          "name": "libcloud-demo-multiple-nodes-001",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-001",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:41:44.063-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "345757781195247006",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-np-node",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-np-node",
           "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         }
       ]
     }
   },
   "kind": "compute#diskAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/disks"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/disks"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json b/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
index fd3827b..06a1a0e 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
@@ -16,26 +16,28 @@
     "regions/us-central1": {
       "forwardingRules": [
         {
-          "IPAddress": "173.255.119.224",
+          "IPAddress": "108.59.86.60",
           "IPProtocol": "TCP",
-          "creationTimestamp": "2013-09-03T00:17:25.544-07:00",
-          "id": "10901665092293158938",
+          "creationTimestamp": "2013-12-13T10:51:47.602-08:00",
+          "id": "0401221837226610637",
           "kind": "compute#forwardingRule",
-          "name": "lcforwardingrule",
-          "portRange": "8000-8500",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "name": "libcloud-lb-demo-lb",
+          "portRange": "80-80",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+          "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         },
         {
-          "IPAddress": "173.255.119.185",
+          "IPAddress": "173.255.114.35",
           "IPProtocol": "TCP",
-          "creationTimestamp": "2013-09-02T22:25:50.575-07:00",
-          "id": "15826316229163619337",
+          "creationTimestamp": "2013-12-13T10:52:57.170-08:00",
+          "id": "06342111469679701315",
           "kind": "compute#forwardingRule",
-          "name": "libcloud-lb-demo-lb",
-          "portRange": "80-80",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "name": "lcforwardingrule",
+          "portRange": "8000-8500",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+          "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         }
       ]
     },
@@ -53,5 +55,5 @@
     }
   },
   "kind": "compute#forwardingRuleAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/forwardingRules"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/forwardingRules"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/2d3caa8c/libcloud/test/compute/fixtures/gce/aggregated_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_instances.json b/libcloud/test/compute/fixtures/gce/aggregated_instances.json
index 056cbb2..3624fd0 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_instances.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_instances.json
@@ -5,123 +5,132 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:45:44.186-07:00",
+          "creationTimestamp": "2013-12-13T10:43:58.782-08:00",
           "disks": [
             {
               "boot": true,
-              "deviceName": "libcloud-demo-europe-boot-disk",
+              "deviceName": "libcloud-demo-europe-multiple-nodes-000",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
               "type": "PERSISTENT"
             }
           ],
-          "id": "8051468456709756069",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "10947706194464948790",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-europe-persist-node",
+          "name": "libcloud-demo-europe-multiple-nodes-000",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.211.23",
+                  "natIP": "192.158.28.252",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.188.108"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.122.85"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "EbZdwVRtKyg=",
+            "fingerprint": "W7t6ZyTyIrc=",
             "items": [
-              "libcloud",
-              "newtag"
+              "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:46:02.933-07:00",
+          "creationTimestamp": "2013-12-13T10:43:37.267-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-europe-boot-disk",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "04184465693678804555",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "517678477070693411",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-europe-multiple-nodes-000",
+          "name": "libcloud-demo-europe-persist-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.211.48",
+                  "natIP": "23.251.128.32",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.141.92"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.240.204"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "W7t6ZyTyIrc=",
+            "fingerprint": "EbZdwVRtKyg=",
             "items": [
-              "libcloud"
+              "libcloud",
+              "newtag"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:57.127-07:00",
+          "creationTimestamp": "2013-12-13T10:43:12.706-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-europe-np-node",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+              "type": "PERSISTENT"
             },
             {
               "deviceName": "libcloud-demo-europe-attach-disk",
               "index": 1,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
               "type": "PERSISTENT"
             }
           ],
-          "id": "4450078356274958103",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "3421745795082776097",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -133,16 +142,20 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.208.52",
+                  "natIP": "23.251.128.10",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.48.164"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.221.125"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -150,7 +163,7 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         }
       ]
     },
@@ -170,20 +183,21 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:47:29.154-07:00",
+          "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "persistent-disk-0",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "10348912619288589086",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+          "id": "4006034190819017667",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -195,21 +209,25 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.35.197.91",
+                  "natIP": "23.236.58.15",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.123.204"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.72.75"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "42WmSpB8rSM="
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
         }
       ]
     },
@@ -229,115 +247,132 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:03.801-07:00",
+          "creationTimestamp": "2013-12-13T10:42:03.180-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-boot-disk",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "8843444782291050664",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "2184470466384636715",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-multiple-nodes-001",
+          "name": "libcloud-demo-persist-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.180",
+                  "natIP": "173.255.120.70",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.167.120"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.235.148"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-001",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-persist-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "W7t6ZyTyIrc=",
+            "fingerprint": "EbZdwVRtKyg=",
             "items": [
-              "libcloud"
+              "libcloud",
+              "newtag"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:43:49.457-07:00",
+          "creationTimestamp": "2013-12-13T10:41:47.059-08:00",
           "disks": [
             {
               "boot": true,
-              "deviceName": "libcloud-demo-boot-disk",
+              "deviceName": "libcloud-demo-np-node",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-np-node",
+              "type": "PERSISTENT"
+            },
+            {
+              "deviceName": "libcloud-demo-attach-disk",
+              "index": 1,
+              "kind": "compute#attachedDisk",
+              "mode": "READ_WRITE",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
               "type": "PERSISTENT"
             }
           ],
-          "id": "2278280472037226745",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "18059053700460342373",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-persist-node",
+          "name": "libcloud-demo-np-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.109",
+                  "natIP": "173.255.120.58",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.102.153"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.45.206"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-persist-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-np-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "EbZdwVRtKyg=",
+            "fingerprint": "W7t6ZyTyIrc=",
             "items": [
-              "libcloud",
-              "newtag"
+              "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:03.256-07:00",
+          "creationTimestamp": "2013-12-13T10:42:24.841-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-multiple-nodes-000",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-000",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "0994482023759804723",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "4196532528539285480",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -349,16 +384,20 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.133",
+                  "natIP": "173.255.120.211",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.164.41"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.218.251"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-000",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-000",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -366,53 +405,50 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:43:15.485-07:00",
+          "creationTimestamp": "2013-12-13T10:42:19.041-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-multiple-nodes-001",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
-            },
-            {
-              "deviceName": "libcloud-demo-attach-disk",
-              "index": 1,
-              "kind": "compute#attachedDisk",
-              "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-001",
               "type": "PERSISTENT"
             }
           ],
-          "id": "08480381647283539833",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "1066146046261788296",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-np-node",
+          "name": "libcloud-demo-multiple-nodes-001",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.95",
+                  "natIP": "173.255.120.207",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.37.226"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.24.29"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-np-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-001",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -420,11 +456,11 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         }
       ]
     }
   },
   "kind": "compute#instanceAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/instances"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/instances"
 }
\ No newline at end of file


[38/44] git commit: Add support for reading/setting node scheduling options.

Posted by to...@apache.org.
Add support for reading/setting node scheduling options.


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

Branch: refs/heads/trunk
Commit: 02fa6887ca46b377e469da68e70daabe4cf032e1
Parents: 98636e3
Author: Rick Wright <ri...@google.com>
Authored: Tue Dec 17 10:54:13 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 67 +++++++++++++++++++++++++++++++++++-
 1 file changed, 66 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/02fa6887/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 0f5e13b..8e59d3f 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1978,6 +1978,70 @@ class GCENodeDriver(NodeDriver):
         node.extra['tags_fingerprint'] = new_node.extra['tags_fingerprint']
         return True
 
+    def ex_set_node_scheduling(self, node, on_host_maintenance=None,
+                               automatic_restart=None):
+        """Set the maintenance behavior for the node.
+
+        See Scheduling_ documentation for more info.
+        _Scheduling:
+        https://developers.google.com/compute/docs/instances#onhostmaintenance
+
+        :param  node: Node object
+        :type   node: :class:`Node`
+
+        :keyword  on_host_maintenance: Defines whether node should be
+                                       terminated or migrated when host machine
+                                       goes down. Acceptable values are:
+                                       'MIGRATE' or 'TERMINATE' (If not
+                                       supplied, value will be reset to GCE
+                                       default value for the instance type.)
+        :type     on_host_maintenance: ``str``
+
+        :keyword  automatic_restart: Defines whether the instance should be
+                                     automatically restarted when it is
+                                     terminated by Compute Engine. (If not
+                                     supplied, value will be set to the GCE
+                                     default value for the instance type.)
+        :type     automatic_restart: ``bool``
+
+        :return:  True if successful.
+        :rtype:   ``bool``
+        """
+        if not hasattr(node, 'name'):
+            node = self.ex_get_node(node, 'all')
+        if on_host_maintenance is not None:
+            on_host_maintenance = on_host_maintenance.upper()
+            ohm_values = ['MIGRATE', 'TERMINATE']
+            if on_host_maintenance not in ohm_values:
+                raise ValueError('on_host_maintenence must be one of %s' %
+                                 ','.join(ohm_values))
+
+        request = '/zones/%s/instances/%s/setScheduling' % (
+            node.extra['zone'].name, node.name)
+
+        scheduling_data = {}
+        if on_host_maintenance is not None:
+            scheduling_data['onHostMaintenance'] = on_host_maintenance
+        if automatic_restart is not None:
+            scheduling_data['automaticRestart'] = automatic_restart
+
+        self.connection.async_request(request, method='POST',
+                                      data=scheduling_data)
+
+        new_node = self.ex_get_node(node.name, node.extra['zone'])
+        node.extra['scheduling'] = new_node.extra['scheduling']
+
+        ohm = node.extra['scheduling'].get('onHostMaintenance')
+        ar = node.extra['scheduling'].get('automaticRestart')
+
+        success = True
+        if on_host_maintenance not in [None, ohm]:
+            success = False
+        if automatic_restart not in [None, ar]:
+            success = False
+
+        return success
+
     def deploy_node(self, name, size, image, script, location=None,
                     ex_network='default', ex_tags=None):
         """
@@ -2771,8 +2835,9 @@ class GCENodeDriver(NodeDriver):
         extra['id'] = node['id']
         extra['selfLink'] = node.get('selfLink')
         extra['name'] = node['name']
-        extra['metadata'] = node.get('metadata')
+        extra['metadata'] = node.get('metadata', {})
         extra['tags_fingerprint'] = node['tags']['fingerprint']
+        extra['scheduling'] = node.get('scheduling', {})
 
         extra['boot_disk'] = None
         for disk in extra['disks']:


[33/44] git commit: Test updates for v1 plus additional changes: Add snapshot support Add .get() to many locations to make the conversion from json dictionary to libcloud objects more robust.

Posted by to...@apache.org.
Test updates for v1 plus additional changes:
  Add snapshot support
  Add .get() to many locations to make the conversion from json dictionary to
  libcloud objects more robust.


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

Branch: refs/heads/trunk
Commit: adb9acaafac758f50da2b34829f7e840270b8f9d
Parents: 47b7500
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 13 13:07:26 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:02 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py                 |  270 ++-
 .../fixtures/gce/aggregated_addresses.json      |   18 +-
 .../compute/fixtures/gce/aggregated_disks.json  |  115 +-
 .../gce/aggregated_forwardingRules.json         |   32 +-
 .../fixtures/gce/aggregated_instances.json      |  260 +--
 .../fixtures/gce/aggregated_machineTypes.json   | 1825 ++++++++++--------
 .../fixtures/gce/aggregated_targetPools.json    |   28 +-
 .../test/compute/fixtures/gce/generic_disk.json |   13 +
 .../compute/fixtures/gce/global_firewalls.json  |   22 +-
 .../gce/global_firewalls_lcfirewall.json        |    4 +-
 .../gce/global_firewalls_lcfirewall_delete.json |    4 +-
 .../gce/global_firewalls_lcfirewall_put.json    |    4 +-
 .../fixtures/gce/global_firewalls_post.json     |    4 +-
 .../fixtures/gce/global_httpHealthChecks.json   |   24 +-
 .../global_httpHealthChecks_basic-check.json    |    2 +-
 .../global_httpHealthChecks_lchealthcheck.json  |    2 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ...althChecks_libcloud-lb-demo-healthcheck.json |    2 +-
 .../gce/global_httpHealthChecks_post.json       |    4 +-
 .../compute/fixtures/gce/global_images.json     |   10 +-
 .../compute/fixtures/gce/global_networks.json   |    8 +-
 .../fixtures/gce/global_networks_default.json   |    2 +-
 .../fixtures/gce/global_networks_lcnetwork.json |    2 +-
 .../gce/global_networks_lcnetwork_delete.json   |    4 +-
 ...l_networks_libcloud-demo-europe-network.json |    2 +-
 .../global_networks_libcloud-demo-network.json  |    2 +-
 .../fixtures/gce/global_networks_post.json      |    4 +-
 ...tion_global_firewalls_lcfirewall_delete.json |    4 +-
 ...eration_global_firewalls_lcfirewall_put.json |    4 +-
 ...rations_operation_global_firewalls_post.json |    4 +-
 ...l_httpHealthChecks_lchealthcheck_delete.json |    4 +-
 ...obal_httpHealthChecks_lchealthcheck_put.json |    4 +-
 ..._operation_global_httpHealthChecks_post.json |    4 +-
 ...ration_global_networks_lcnetwork_delete.json |    4 +-
 ...erations_operation_global_networks_post.json |    4 +-
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 ...tion_regions_us-central1_addresses_post.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...on_regions_us-central1_targetPools_post.json |    6 +-
 ...ion_zones_europe-west1-a_instances_post.json |    6 +-
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 ...peration_zones_us-central1-a_disks_post.json |    6 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    6 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 ...tion_zones_us-central1-a_instances_post.json |    6 +-
 libcloud/test/compute/fixtures/gce/project.json |    2 +-
 .../projects_debian-cloud_global_images.json    |  172 +-
 libcloud/test/compute/fixtures/gce/regions.json |   18 +-
 .../gce/regions_us-central1_addresses.json      |   10 +-
 ...regions_us-central1_addresses_lcaddress.json |    4 +-
 ..._us-central1_addresses_lcaddress_delete.json |    6 +-
 .../gce/regions_us-central1_addresses_post.json |    6 +-
 .../regions_us-central1_forwardingRules.json    |   14 +-
 ...ntral1_forwardingRules_lcforwardingrule.json |    6 +-
 ...forwardingRules_lcforwardingrule_delete.json |    6 +-
 ...al1_forwardingRules_libcloud-lb-demo-lb.json |    6 +-
 ...egions_us-central1_forwardingRules_post.json |    6 +-
 .../gce/regions_us-central1_targetPools.json    |   24 +-
 ...ns_us-central1_targetPools_lctargetpool.json |   10 +-
 ...tPools_lctargetpool_addHealthCheck_post.json |    6 +-
 ...rgetPools_lctargetpool_addInstance_post.json |    6 +-
 ...entral1_targetPools_lctargetpool_delete.json |    6 +-
 ...ols_lctargetpool_removeHealthCheck_post.json |    6 +-
 ...tPools_lctargetpool_removeInstance_post.json |    6 +-
 ...ral1_targetPools_libcloud-lb-demo-lb-tp.json |   12 +-
 .../regions_us-central1_targetPools_post.json   |    6 +-
 ...egions_us-central1_targetPools_www-pool.json |   12 +-
 libcloud/test/compute/fixtures/gce/zones.json   |   35 +-
 .../gce/zones_europe-west1-a_instances.json     |   83 +-
 .../zones_europe-west1-a_instances_post.json    |    6 +-
 ...rope-west1-a_machineTypes_n1-standard-1.json |    2 +-
 .../fixtures/gce/zones_us-central1-a.json       |    4 +-
 .../fixtures/gce/zones_us-central1-a_disks.json |   33 +-
 .../gce/zones_us-central1-a_disks_lcdisk.json   |    4 +-
 ...zones_us-central1-a_disks_lcdisk_delete.json |    6 +-
 .../gce/zones_us-central1-a_disks_post.json     |    6 +-
 .../gce/zones_us-central1-a_instances.json      |  213 +-
 ...ones_us-central1-a_instances_lcnode-000.json |   28 +-
 ...-central1-a_instances_lcnode-000_delete.json |    6 +-
 ...ones_us-central1-a_instances_lcnode-001.json |   26 +-
 ...-central1-a_instances_lcnode-001_delete.json |    6 +-
 ...zones_us-central1-a_instances_node-name.json |   26 +-
 ...1-a_instances_node-name_attachDisk_post.json |    6 +-
 ...s-central1-a_instances_node-name_delete.json |    8 +-
 ...1-a_instances_node-name_detachDisk_post.json |    6 +-
 ...ntral1-a_instances_node-name_reset_post.json |    6 +-
 ...ral1-a_instances_node-name_setTags_post.json |    6 +-
 .../gce/zones_us-central1-a_instances_post.json |    6 +-
 .../gce/zones_us-central1-a_machineTypes.json   |   96 +-
 ...s-central1-a_machineTypes_n1-standard-1.json |    2 +-
 ...l1-b_instances_libcloud-lb-demo-www-000.json |   29 +-
 ...l1-b_instances_libcloud-lb-demo-www-001.json |   31 +-
 libcloud/test/compute/test_gce.py               |   93 +-
 libcloud/test/loadbalancer/test_gce.py          |    6 +-
 106 files changed, 2252 insertions(+), 1710 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index c4827eb..cc1ef36 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -24,9 +24,11 @@ import sys
 from libcloud.common.google import GoogleResponse
 from libcloud.common.google import GoogleBaseConnection
 from libcloud.common.google import ResourceNotFoundError
+from libcloud.common.google import ResourceExistsError
 
 from libcloud.compute.base import Node, NodeDriver, NodeImage, NodeLocation
-from libcloud.compute.base import NodeSize, StorageVolume, UuidMixin
+from libcloud.compute.base import NodeSize, StorageVolume, VolumeSnapshot
+from libcloud.compute.base import UuidMixin
 from libcloud.compute.providers import Provider
 from libcloud.compute.types import NodeState
 
@@ -292,6 +294,13 @@ class GCERegion(UuidMixin):
             self.id, self.name, self.status)
 
 
+class GCESnapshot(VolumeSnapshot):
+    def __init__(self, id, name, size, status, driver, extra=None):
+        self.name = name
+        self.status = status
+        super(GCESnapshot, self).__init__(id, driver, size, extra)
+
+
 class GCETargetPool(UuidMixin):
     def __init__(self, id, name, region, healthchecks, nodes, driver,
                  extra=None):
@@ -953,6 +962,20 @@ class GCENodeDriver(NodeDriver):
                 list_sizes = [self._to_node_size(s) for s in response['items']]
         return list_sizes
 
+    def ex_list_snapshots(self):
+        """
+        Return the list of disk snapshots in the project.
+
+        :return:  A list of snapshot objects
+        :rtype:   ``list`` of :class:`GCESnapshot`
+        """
+        list_snapshots = []
+        request = '/global/snapshots'
+        response = self.connection.request(request, method='GET').object
+        list_snapshots = [self._to_snapshot(s) for s in
+                          response.get('items', [])]
+        return list_snapshots
+
     def ex_list_targetpools(self, region=None):
         """
         Return the list of target pools.
@@ -1310,7 +1333,7 @@ class GCENodeDriver(NodeDriver):
 
     def create_node(self, name, size, image, location=None,
                     ex_network='default', ex_tags=None, ex_metadata=None,
-                    ex_boot_disk=None, use_existing_disk=False):
+                    ex_boot_disk=None, use_existing_disk=True):
         """
         Create a new node and return a node object for the node.
 
@@ -1374,7 +1397,7 @@ class GCENodeDriver(NodeDriver):
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
-                                 ignore_errors=True, use_existing_disk=False,
+                                 ignore_errors=True, use_existing_disk=True,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1395,6 +1418,8 @@ class GCENodeDriver(NodeDriver):
         :param  image: The image to use to create the nodes.
         :type   image: ``str`` or :class:`NodeImage`
 
+        return self.ex_get_snapshot(name)
+
         :param  number: The number of nodes to create.
         :type   number: ``int``
 
@@ -1489,6 +1514,7 @@ class GCENodeDriver(NodeDriver):
                         e = self._catch_error(ignore_errors=ignore_errors)
                         error = e.value
                         code = e.code
+                        response = {'status': 'DONE'}
                     if response['status'] == 'DONE':
                         status['disk_response'] = None
                         if error:
@@ -1517,6 +1543,7 @@ class GCENodeDriver(NodeDriver):
                             e = self._catch_error(ignore_errors=ignore_errors)
                             error = e.value
                             code = e.code
+                            response = {'status': 'DONE'}
                         if response['status'] == 'DONE':
                             status['node_response'] = None
                         if error:
@@ -1607,8 +1634,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  image: Image to create disk from.
         :type     image: :class:`NodeImage` or ``str`` or ``None``
 
-        :keyword  snapshot: Snapshot to create image from (needs full URI)
-        :type     snapshot: ``str``
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
         :return:  Tuple containg the request string, the data dictionary and
                   the URL parameters
@@ -1626,8 +1653,15 @@ class GCENodeDriver(NodeDriver):
             volume_data['description'] = 'Image: %s' % (
                 image.extra['selfLink'])
         if snapshot:
-            volume_data['sourceSnapshot'] = snapshot
-            volume_data['description'] = 'Snapshot: %s' % (snapshot)
+            # Check for full URI to not break backward-compatibility
+            if snapshot.startswith('https'):
+                snapshot_link = snapshot
+            else:
+                if not hasattr(snapshot, 'name'):
+                    snapshot = self.ex_get_snapshot(snapshot)
+                snapshot_link = snapshot.extra['selfLink']
+            volume_data['sourceSnapshot'] = snapshot_link
+            volume_data['description'] = 'Snapshot: %s' % (snapshot_link)
         location = location or self.zone
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
@@ -1636,7 +1670,7 @@ class GCENodeDriver(NodeDriver):
         return request, volume_data, params
 
     def create_volume(self, size, name, location=None, image=None,
-                      snapshot=None, use_existing=False):
+                      snapshot=None, use_existing=True):
         """
         Create a volume (disk).
 
@@ -1654,8 +1688,8 @@ class GCENodeDriver(NodeDriver):
         :keyword  image: Image to create disk from.
         :type     image: :class:`NodeImage` or ``str`` or ``None``
 
-        :keyword  snapshot: Snapshot to create image from (needs full URI)
-        :type     snapshot: ``str``
+        :keyword  snapshot: Snapshot to create image from
+        :type     snapshot: :class:`GCESnapshot` or ``str`` or ``None``
 
         :keyword  use_existing: If True and a disk with the given name already
                                 exists, return an object for that disk instead
@@ -1666,20 +1700,37 @@ class GCENodeDriver(NodeDriver):
         :rtype:   :class:`StorageVolume`
         """
         vol = None
-        if use_existing:
-            try:
-                vol = self.ex_get_volume(name, location)
-            except:
-                pass
-        if vol:
-            return vol
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
-        self.connection.async_request(request, method='POST', data=volume_data,
-                                      params=params)
+        try:
+            self.connection.async_request(request, method='POST',
+                                          data=volume_data, params=params)
+        except ResourceExistsError:
+            e = sys.exc_info()[1]
+            if not use_existing:
+                raise e
 
         return self.ex_get_volume(name, location)
 
+    def create_volume_snapshot(self, volume, name):
+        """
+        Create a snapshot of the provided Volume.
+
+        :param  volume: A StorageVolume object
+        :type   volume: :class:`StorageVolume`
+
+        :return:  A GCE Snapshot object
+        :rtype:   :class:`GCESnapshot`
+        """
+        snapshot_data = {}
+        snapshot_data['name'] = name
+        request = '/zones/%s/disks/%s/createSnapshot' % (
+            volume.extra['zone'].name, volume.name)
+        self.connection.async_request(request, method='POST',
+                                      data=snapshot_data)
+
+        return self.ex_get_snapshot(name)
+
     def ex_update_healthcheck(self, healthcheck):
         """
         Update a health check with new values.
@@ -2093,22 +2144,31 @@ class GCENodeDriver(NodeDriver):
         self.connection.async_request(request, method='DELETE')
         return True
 
-    def destroy_node(self, node):
+    def destroy_node(self, node, destroy_boot_disk=False):
         """
         Destroy a node.
 
         :param  node: Node object to destroy
         :type   node: :class:`Node`
 
+        :keyword  destroy_boot_disk: If true, also destroy the node's
+                                     boot disk. (Note that this keyword is not
+                                     accessible from the node's .destroy()
+                                     method.)
+        :type     destroy_boot_disk: ``bool``
+
         :return:  True if successful
         :rtype:   ``bool``
         """
         request = '/zones/%s/instances/%s' % (node.extra['zone'].name,
                                               node.name)
         self.connection.async_request(request, method='DELETE')
+        if destroy_boot_disk and node.extra['boot_disk']:
+            node.extra['boot_disk'].destroy()
         return True
 
     def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
+                                  destroy_boot_disk=False,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
@@ -2120,6 +2180,10 @@ class GCENodeDriver(NodeDriver):
                                  more nodes fails to be destroyed.
         :type     ignore_errors: ``bool``
 
+        :keyword  destroy_boot_disk: If true, also destroy the nodes' boot
+                                     disks.
+        :type     destroy_boot_disk: ``bool``
+
         :keyword  timeout: Number of seconds to wait for all nodes to be
                            destroyed.
         :type     timeout: ``int``
@@ -2194,8 +2258,21 @@ class GCENodeDriver(NodeDriver):
         """
         request = '/zones/%s/disks/%s' % (volume.extra['zone'].name,
                                           volume.name)
-        self.connection.async_request(request,
-                                      method='DELETE')
+        self.connection.async_request(request, method='DELETE')
+        return True
+
+    def destroy_volume_snapshot(self, snapshot):
+        """
+        Destroy a snapshot.
+
+        :param  snapshot: Snapshot object to destroy
+        :type   snapshot: :class:`GCESnapshot`
+
+        :return:  True if successfull
+        :rtype:   ``bool``
+        """
+        request = '/global/snapshots/%s' % (snapshot.name)
+        self.connection.async_request(request, method='DELETE')
         return True
 
     def ex_get_address(self, name, region=None):
@@ -2356,6 +2433,20 @@ class GCENodeDriver(NodeDriver):
         response = self.connection.request(request, method='GET').object
         return self._to_node_size(response)
 
+    def ex_get_snapshot(self, name):
+        """
+        Return a Snapshot object based on snapshot name.
+
+        :param  name: The name of the snapshot
+        :type   name: ``str``
+
+        :return:  A GCESnapshot object for the snapshot
+        :rtype:   :class:`GCESnapshot`
+        """
+        request = '/global/snapshots/%s' % (name)
+        response = self.connection.request(request, method='GET').object
+        return self._to_snapshot(response)
+
     def ex_get_volume(self, name, zone=None):
         """
         Return a Volume object based on a volume name and optional zone.
@@ -2460,9 +2551,9 @@ class GCENodeDriver(NodeDriver):
 
         region = self.ex_get_region(address['region'])
 
-        extra['selfLink'] = address['selfLink']
-        extra['status'] = address['status']
-        extra['creationTimestamp'] = address['creationTimestamp']
+        extra['selfLink'] = address.get('selfLink')
+        extra['status'] = address.get('status')
+        extra['creationTimestamp'] = address.get('creationTimestamp')
 
         return GCEAddress(id=address['id'], name=address['name'],
                           address=address['address'],
@@ -2479,18 +2570,18 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEHealthCheck`
         """
         extra = {}
-        extra['selfLink'] = healthcheck['selfLink']
-        extra['creationTimestamp'] = healthcheck['creationTimestamp']
+        extra['selfLink'] = healthcheck.get('selfLink')
+        extra['creationTimestamp'] = healthcheck.get('creationTimestamp')
         extra['description'] = healthcheck.get('description')
         extra['host'] = healthcheck.get('host')
 
         return GCEHealthCheck(
             id=healthcheck['id'], name=healthcheck['name'],
-            path=healthcheck['requestPath'], port=healthcheck['port'],
-            interval=healthcheck['checkIntervalSec'],
-            timeout=healthcheck['timeoutSec'],
-            unhealthy_threshold=healthcheck['unhealthyThreshold'],
-            healthy_threshold=healthcheck['healthyThreshold'],
+            path=healthcheck.get('requestPath'), port=healthcheck.get('port'),
+            interval=healthcheck.get('checkIntervalSec'),
+            timeout=healthcheck.get('timeoutSec'),
+            unhealthy_threshold=healthcheck.get('unhealthyThreshold'),
+            healthy_threshold=healthcheck.get('healthyThreshold'),
             driver=self, extra=extra)
 
     def _to_firewall(self, firewall):
@@ -2504,8 +2595,8 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEFirewall`
         """
         extra = {}
-        extra['selfLink'] = firewall['selfLink']
-        extra['creationTimestamp'] = firewall['creationTimestamp']
+        extra['selfLink'] = firewall.get('selfLink')
+        extra['creationTimestamp'] = firewall.get('creationTimestamp')
         extra['description'] = firewall.get('description')
         extra['network_name'] = self._get_components_from_path(
             firewall['network'])['name']
@@ -2515,7 +2606,7 @@ class GCENodeDriver(NodeDriver):
         source_tags = firewall.get('sourceTags')
 
         return GCEFirewall(id=firewall['id'], name=firewall['name'],
-                           allowed=firewall['allowed'], network=network,
+                           allowed=firewall.get('allowed'), network=network,
                            source_ranges=source_ranges,
                            source_tags=source_tags,
                            driver=self, extra=extra)
@@ -2531,10 +2622,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEForwardingRule`
         """
         extra = {}
-        # Use .get to work around a current API bug.
         extra['selfLink'] = forwarding_rule.get('selfLink')
-        extra['portRange'] = forwarding_rule['portRange']
-        extra['creationTimestamp'] = forwarding_rule['creationTimestamp']
+        extra['portRange'] = forwarding_rule.get('portRange')
+        extra['creationTimestamp'] = forwarding_rule.get('creationTimestamp')
         extra['description'] = forwarding_rule.get('description')
 
         region = self.ex_get_region(forwarding_rule['region'])
@@ -2543,8 +2633,8 @@ class GCENodeDriver(NodeDriver):
 
         return GCEForwardingRule(id=forwarding_rule['id'],
                                  name=forwarding_rule['name'], region=region,
-                                 address=forwarding_rule['IPAddress'],
-                                 protocol=forwarding_rule['IPProtocol'],
+                                 address=forwarding_rule.get('IPAddress'),
+                                 protocol=forwarding_rule.get('IPProtocol'),
                                  targetpool=targetpool,
                                  driver=self, extra=extra)
 
@@ -2560,13 +2650,13 @@ class GCENodeDriver(NodeDriver):
         """
         extra = {}
 
-        extra['selfLink'] = network['selfLink']
-        extra['gatewayIPv4'] = network['gatewayIPv4']
+        extra['selfLink'] = network.get('selfLink')
+        extra['gatewayIPv4'] = network.get('gatewayIPv4')
         extra['description'] = network.get('description')
-        extra['creationTimestamp'] = network['creationTimestamp']
+        extra['creationTimestamp'] = network.get('creationTimestamp')
 
         return GCENetwork(id=network['id'], name=network['name'],
-                          cidr=network['IPv4Range'],
+                          cidr=network.get('IPv4Range'),
                           driver=self, extra=extra)
 
     def _to_node_image(self, image):
@@ -2582,8 +2672,8 @@ class GCENodeDriver(NodeDriver):
         extra = {}
         extra['preferredKernel'] = image.get('preferredKernel', None)
         extra['description'] = image.get('description', None)
-        extra['creationTimestamp'] = image['creationTimestamp']
-        extra['selfLink'] = image['selfLink']
+        extra['creationTimestamp'] = image.get('creationTimestamp')
+        extra['selfLink'] = image.get('selfLink')
         return NodeImage(id=image['id'], name=image['name'], driver=self,
                          extra=extra)
 
@@ -2615,29 +2705,35 @@ class GCENodeDriver(NodeDriver):
         private_ips = []
         extra = {}
 
-        extra['status'] = node['status']
+        extra['status'] = node.get('status')
         extra['description'] = node.get('description')
         extra['zone'] = self.ex_get_zone(node['zone'])
         extra['image'] = node.get('image')
-        extra['machineType'] = node['machineType']
-        extra['disks'] = node['disks']
-        extra['networkInterfaces'] = node['networkInterfaces']
+        extra['machineType'] = node.get('machineType')
+        extra['disks'] = node.get('disks', [])
+        extra['networkInterfaces'] = node.get('networkInterfaces')
         extra['id'] = node['id']
-        extra['selfLink'] = node['selfLink']
+        extra['selfLink'] = node.get('selfLink')
         extra['name'] = node['name']
-        extra['metadata'] = node['metadata']
+        extra['metadata'] = node.get('metadata')
         extra['tags_fingerprint'] = node['tags']['fingerprint']
 
+        extra['boot_disk'] = None
+        for disk in extra['disks']:
+            if disk.get('boot') and disk.get('type') == 'PERSISTENT':
+                bd = self._get_components_from_path(disk['source'])
+                extra['boot_disk'] = self.ex_get_volume(bd['name'], bd['zone'])
+
         if 'items' in node['tags']:
             tags = node['tags']['items']
         else:
             tags = []
         extra['tags'] = tags
 
-        for network_interface in node['networkInterfaces']:
-            private_ips.append(network_interface['networkIP'])
-            for access_config in network_interface['accessConfigs']:
-                public_ips.append(access_config['natIP'])
+        for network_interface in node.get('networkInterfaces', []):
+            private_ips.append(network_interface.get('networkIP'))
+            for access_config in network_interface.get('accessConfigs'):
+                public_ips.append(access_config.get('natIP'))
 
         # For the node attributes, use just machine and image names, not full
         # paths.  Full paths are available in the "extra" dict.
@@ -2663,19 +2759,19 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCENodeSize`
         """
         extra = {}
-        extra['selfLink'] = machine_type['selfLink']
+        extra['selfLink'] = machine_type.get('selfLink')
         extra['zone'] = self.ex_get_zone(machine_type['zone'])
-        extra['description'] = machine_type['description']
-        extra['guestCpus'] = machine_type['guestCpus']
-        extra['creationTimestamp'] = machine_type['creationTimestamp']
+        extra['description'] = machine_type.get('description')
+        extra['guestCpus'] = machine_type.get('guestCpus')
+        extra['creationTimestamp'] = machine_type.get('creationTimestamp')
         try:
             price = self._get_size_price(size_id=machine_type['name'])
         except KeyError:
             price = None
 
         return GCENodeSize(id=machine_type['id'], name=machine_type['name'],
-                           ram=machine_type['memoryMb'],
-                           disk=machine_type['imageSpaceGb'],
+                           ram=machine_type.get('memoryMb'),
+                           disk=machine_type.get('imageSpaceGb'),
                            bandwidth=0, price=price, driver=self, extra=extra)
 
     def _to_project(self, project):
@@ -2689,13 +2785,13 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEProject`
         """
         extra = {}
-        extra['selfLink'] = project['selfLink']
-        extra['creationTimestamp'] = project['creationTimestamp']
-        extra['description'] = project['description']
+        extra['selfLink'] = project.get('selfLink')
+        extra['creationTimestamp'] = project.get('creationTimestamp')
+        extra['description'] = project.get('description')
         metadata = project['commonInstanceMetadata'].get('items')
 
         return GCEProject(id=project['id'], name=project['name'],
-                          metadata=metadata, quotas=project['quotas'],
+                          metadata=metadata, quotas=project.get('quotas'),
                           driver=self, extra=extra)
 
     def _to_region(self, region):
@@ -2709,9 +2805,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCERegion`
         """
         extra = {}
-        extra['selfLink'] = region['selfLink']
-        extra['creationTimestamp'] = region['creationTimestamp']
-        extra['description'] = region['description']
+        extra['selfLink'] = region.get('selfLink')
+        extra['creationTimestamp'] = region.get('creationTimestamp')
+        extra['description'] = region.get('description')
 
         quotas = region.get('quotas')
         zones = [self.ex_get_zone(z) for z in region.get('zones', [])]
@@ -2721,10 +2817,30 @@ class GCENodeDriver(NodeDriver):
         deprecated = region.get('deprecated')
 
         return GCERegion(id=region['id'], name=region['name'],
-                         status=region['status'], zones=zones,
+                         status=region.get('status'), zones=zones,
                          quotas=quotas, deprecated=deprecated,
                          driver=self, extra=extra)
 
+    def _to_snapshot(self, snapshot):
+        """
+        Return a Snapshot object from the json-response dictionary.
+
+        :param  snapshot: The dictionary describing the snapshot
+        :type   snapshot: ``dict``
+
+        :return:  Snapshot object
+        :rtype:   :class:`VolumeSnapshot`
+        """
+        extra = {}
+        extra['selfLink'] = snapshot.get('selfLink')
+        extra['creationTimestamp'] = snapshot.get('creationTimestamp')
+        extra['sourceDisk'] = snapshot.get('sourceDisk')
+
+        return GCESnapshot(id=snapshot['id'], name=snapshot['name'],
+                           size=snapshot['diskSizeGb'],
+                           status=snapshot.get('status'), driver=self,
+                           extra=extra)
+
     def _to_storage_volume(self, volume):
         """
         Return a Volume object from the json-response dictionary.
@@ -2736,10 +2852,10 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`StorageVolume`
         """
         extra = {}
-        extra['selfLink'] = volume['selfLink']
+        extra['selfLink'] = volume.get('selfLink')
         extra['zone'] = self.ex_get_zone(volume['zone'])
-        extra['status'] = volume['status']
-        extra['creationTimestamp'] = volume['creationTimestamp']
+        extra['status'] = volume.get('status')
+        extra['creationTimestamp'] = volume.get('creationTimestamp')
         extra['description'] = volume.get('description')
 
         return StorageVolume(id=volume['id'], name=volume['name'],
@@ -2756,7 +2872,7 @@ class GCENodeDriver(NodeDriver):
         :rtype:  :class:`GCETargetPool`
         """
         extra = {}
-        extra['selfLink'] = targetpool['selfLink']
+        extra['selfLink'] = targetpool.get('selfLink')
         extra['description'] = targetpool.get('description')
         region = self.ex_get_region(targetpool['region'])
         healthcheck_list = [self.ex_get_healthcheck(h.split('/')[-1]) for h
@@ -2788,9 +2904,9 @@ class GCENodeDriver(NodeDriver):
         :rtype: :class:`GCEZone`
         """
         extra = {}
-        extra['selfLink'] = zone['selfLink']
-        extra['creationTimestamp'] = zone['creationTimestamp']
-        extra['description'] = zone['description']
+        extra['selfLink'] = zone.get('selfLink')
+        extra['creationTimestamp'] = zone.get('creationTimestamp')
+        extra['description'] = zone.get('description')
 
         deprecated = zone.get('deprecated')
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_addresses.json b/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
index eee3552..4bab3a2 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_addresses.json
@@ -10,8 +10,8 @@
           "id": "10955781597205896134",
           "kind": "compute#address",
           "name": "libcloud-demo-europe-address",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/europe-west1/addresses/libcloud-demo-europe-address",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/europe-west1/addresses/libcloud-demo-europe-address",
           "status": "RESERVED"
         }
       ]
@@ -25,8 +25,8 @@
           "id": "01531551729918243104",
           "kind": "compute#address",
           "name": "lcaddress",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/lcaddress",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/lcaddress",
           "status": "RESERVED"
         },
         {
@@ -36,8 +36,8 @@
           "id": "17634862894218443422",
           "kind": "compute#address",
           "name": "libcloud-demo-address",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/libcloud-demo-address",
           "status": "RESERVED"
         },
         {
@@ -47,8 +47,8 @@
           "id": "11879548153827627972",
           "kind": "compute#address",
           "name": "testaddress",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/addresses/testaddress",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/addresses/testaddress",
           "status": "RESERVED"
         }
       ]
@@ -67,5 +67,5 @@
     }
   },
   "kind": "compute#addressAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/addresses"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/addresses"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_disks.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_disks.json b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
index 00d9112..9133041 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_disks.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_disks.json
@@ -4,25 +4,53 @@
     "zones/europe-west1-a": {
       "disks": [
         {
-          "creationTimestamp": "2013-11-01T14:45:38.422-07:00",
-          "description": "Image: https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "id": "4294778976520895166",
+          "creationTimestamp": "2013-12-13T10:43:33.753-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "0819226106922408217",
           "kind": "compute#disk",
           "name": "libcloud-demo-europe-boot-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
           "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
-          "creationTimestamp": "2013-11-01T14:45:27.063-07:00",
-          "id": "2488119868186709482",
+          "creationTimestamp": "2013-12-13T10:43:20.420-08:00",
+          "id": "30789070506648158",
           "kind": "compute#disk",
           "name": "libcloud-demo-europe-attach-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
           "sizeGb": "1",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:43:07.390-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "01221310665639400697",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-europe-np-node",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:43:53.598-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "17495188440080825940",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-europe-multiple-nodes-000",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         }
       ]
     },
@@ -58,39 +86,80 @@
           "id": "8658241308250794904",
           "kind": "compute#disk",
           "name": "test1",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b/disks/test1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b/disks/test1",
           "sizeGb": "10",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-b"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-b"
         }
       ]
     },
     "zones/us-central2-a": {
       "disks": [
         {
-          "creationTimestamp": "2013-11-01T14:43:36.763-07:00",
-          "id": "01690270691106097961",
+          "creationTimestamp": "2013-12-13T10:41:59.430-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "3371304879167251249",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-boot-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:42:15.355-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "12650345960824309663",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-multiple-nodes-000",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-000",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:41:52.533-08:00",
+          "id": "01867312924613359214",
           "kind": "compute#disk",
           "name": "libcloud-demo-attach-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
           "sizeGb": "1",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
-          "creationTimestamp": "2013-11-01T14:43:46.039-07:00",
-          "description": "Image: https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "id": "01805374214887472027",
+          "creationTimestamp": "2013-12-13T10:42:15.949-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "12498700959701905851",
           "kind": "compute#disk",
-          "name": "libcloud-demo-boot-disk",
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+          "name": "libcloud-demo-multiple-nodes-001",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-001",
+          "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
+          "status": "READY",
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
+        },
+        {
+          "creationTimestamp": "2013-12-13T10:41:44.063-08:00",
+          "description": "Image: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "id": "345757781195247006",
+          "kind": "compute#disk",
+          "name": "libcloud-demo-np-node",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-np-node",
           "sizeGb": "10",
+          "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120",
+          "sourceImageId": "17312518942796567788",
           "status": "READY",
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         }
       ]
     }
   },
   "kind": "compute#diskAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/disks"
-}
\ No newline at end of file
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/disks"
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json b/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
index fd3827b..06a1a0e 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_forwardingRules.json
@@ -16,26 +16,28 @@
     "regions/us-central1": {
       "forwardingRules": [
         {
-          "IPAddress": "173.255.119.224",
+          "IPAddress": "108.59.86.60",
           "IPProtocol": "TCP",
-          "creationTimestamp": "2013-09-03T00:17:25.544-07:00",
-          "id": "10901665092293158938",
+          "creationTimestamp": "2013-12-13T10:51:47.602-08:00",
+          "id": "0401221837226610637",
           "kind": "compute#forwardingRule",
-          "name": "lcforwardingrule",
-          "portRange": "8000-8500",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "name": "libcloud-lb-demo-lb",
+          "portRange": "80-80",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/libcloud-lb-demo-lb",
+          "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         },
         {
-          "IPAddress": "173.255.119.185",
+          "IPAddress": "173.255.114.35",
           "IPProtocol": "TCP",
-          "creationTimestamp": "2013-09-02T22:25:50.575-07:00",
-          "id": "15826316229163619337",
+          "creationTimestamp": "2013-12-13T10:52:57.170-08:00",
+          "id": "06342111469679701315",
           "kind": "compute#forwardingRule",
-          "name": "libcloud-lb-demo-lb",
-          "portRange": "80-80",
-          "region": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1",
-          "target": "https://www.googleapis.com/compute/v1beta16/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
+          "name": "lcforwardingrule",
+          "portRange": "8000-8500",
+          "region": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1",
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/forwardingRules/lcforwardingrule",
+          "target": "https://www.googleapis.com/compute/v1/projects/project_name/regions/us-central1/targetPools/libcloud-lb-demo-lb-tp"
         }
       ]
     },
@@ -53,5 +55,5 @@
     }
   },
   "kind": "compute#forwardingRuleAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/forwardingRules"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/forwardingRules"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/adb9acaa/libcloud/test/compute/fixtures/gce/aggregated_instances.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/aggregated_instances.json b/libcloud/test/compute/fixtures/gce/aggregated_instances.json
index 056cbb2..3624fd0 100644
--- a/libcloud/test/compute/fixtures/gce/aggregated_instances.json
+++ b/libcloud/test/compute/fixtures/gce/aggregated_instances.json
@@ -5,123 +5,132 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:45:44.186-07:00",
+          "creationTimestamp": "2013-12-13T10:43:58.782-08:00",
           "disks": [
             {
               "boot": true,
-              "deviceName": "libcloud-demo-europe-boot-disk",
+              "deviceName": "libcloud-demo-europe-multiple-nodes-000",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-multiple-nodes-000",
               "type": "PERSISTENT"
             }
           ],
-          "id": "8051468456709756069",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "10947706194464948790",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-europe-persist-node",
+          "name": "libcloud-demo-europe-multiple-nodes-000",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.211.23",
+                  "natIP": "192.158.28.252",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.188.108"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.122.85"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "EbZdwVRtKyg=",
+            "fingerprint": "W7t6ZyTyIrc=",
             "items": [
-              "libcloud",
-              "newtag"
+              "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:46:02.933-07:00",
+          "creationTimestamp": "2013-12-13T10:43:37.267-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-europe-boot-disk",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-boot-disk",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "04184465693678804555",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "517678477070693411",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-europe-multiple-nodes-000",
+          "name": "libcloud-demo-europe-persist-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.211.48",
+                  "natIP": "23.251.128.32",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.141.92"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.240.204"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-multiple-nodes-000",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-persist-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "W7t6ZyTyIrc=",
+            "fingerprint": "EbZdwVRtKyg=",
             "items": [
-              "libcloud"
+              "libcloud",
+              "newtag"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:57.127-07:00",
+          "creationTimestamp": "2013-12-13T10:43:12.706-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-europe-np-node",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-np-node",
+              "type": "PERSISTENT"
             },
             {
               "deviceName": "libcloud-demo-europe-attach-disk",
               "index": 1,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/disks/libcloud-demo-europe-attach-disk",
               "type": "PERSISTENT"
             }
           ],
-          "id": "4450078356274958103",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "3421745795082776097",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -133,16 +142,20 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.34.208.52",
+                  "natIP": "23.251.128.10",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.48.164"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.221.125"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a/instances/libcloud-demo-europe-np-node",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -150,7 +163,7 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/europe-west1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/europe-west1-a"
         }
       ]
     },
@@ -170,20 +183,21 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:47:29.154-07:00",
+          "creationTimestamp": "2013-12-13T10:45:23.351-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "persistent-disk-0",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/disks/node-name",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "10348912619288589086",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20130617",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-v20130603",
+          "id": "4006034190819017667",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -195,21 +209,25 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "8.35.197.91",
+                  "natIP": "23.236.58.15",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.123.204"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.72.75"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a/instances/node-name",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a/instances/node-name",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "42WmSpB8rSM="
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central1-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central1-a"
         }
       ]
     },
@@ -229,115 +247,132 @@
       "instances": [
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:03.801-07:00",
+          "creationTimestamp": "2013-12-13T10:42:03.180-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-boot-disk",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "8843444782291050664",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "2184470466384636715",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-multiple-nodes-001",
+          "name": "libcloud-demo-persist-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.180",
+                  "natIP": "173.255.120.70",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.167.120"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.235.148"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-001",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-persist-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "W7t6ZyTyIrc=",
+            "fingerprint": "EbZdwVRtKyg=",
             "items": [
-              "libcloud"
+              "libcloud",
+              "newtag"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:43:49.457-07:00",
+          "creationTimestamp": "2013-12-13T10:41:47.059-08:00",
           "disks": [
             {
               "boot": true,
-              "deviceName": "libcloud-demo-boot-disk",
+              "deviceName": "libcloud-demo-np-node",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-boot-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-np-node",
+              "type": "PERSISTENT"
+            },
+            {
+              "deviceName": "libcloud-demo-attach-disk",
+              "index": 1,
+              "kind": "compute#attachedDisk",
+              "mode": "READ_WRITE",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
               "type": "PERSISTENT"
             }
           ],
-          "id": "2278280472037226745",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "18059053700460342373",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-persist-node",
+          "name": "libcloud-demo-np-node",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.109",
+                  "natIP": "173.255.120.58",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.102.153"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.45.206"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-persist-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-np-node",
           "status": "RUNNING",
           "tags": {
-            "fingerprint": "EbZdwVRtKyg=",
+            "fingerprint": "W7t6ZyTyIrc=",
             "items": [
-              "libcloud",
-              "newtag"
+              "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:44:03.256-07:00",
+          "creationTimestamp": "2013-12-13T10:42:24.841-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-multiple-nodes-000",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-000",
+              "type": "PERSISTENT"
             }
           ],
-          "id": "0994482023759804723",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "4196532528539285480",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
@@ -349,16 +384,20 @@
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.133",
+                  "natIP": "173.255.120.211",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.164.41"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.218.251"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-000",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-000",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -366,53 +405,50 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         },
         {
           "canIpForward": false,
-          "creationTimestamp": "2013-11-01T14:43:15.485-07:00",
+          "creationTimestamp": "2013-12-13T10:42:19.041-08:00",
           "disks": [
             {
+              "boot": true,
+              "deviceName": "libcloud-demo-multiple-nodes-001",
               "index": 0,
               "kind": "compute#attachedDisk",
               "mode": "READ_WRITE",
-              "type": "SCRATCH"
-            },
-            {
-              "deviceName": "libcloud-demo-attach-disk",
-              "index": 1,
-              "kind": "compute#attachedDisk",
-              "mode": "READ_WRITE",
-              "source": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/disks/libcloud-demo-attach-disk",
+              "source": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/disks/libcloud-demo-multiple-nodes-001",
               "type": "PERSISTENT"
             }
           ],
-          "id": "08480381647283539833",
-          "image": "https://www.googleapis.com/compute/v1beta16/projects/debian-cloud/global/images/debian-7-wheezy-v20131014",
-          "kernel": "https://www.googleapis.com/compute/v1beta16/projects/google/global/kernels/gce-no-conn-track-v20130813",
+          "id": "1066146046261788296",
           "kind": "compute#instance",
-          "machineType": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
+          "machineType": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/machineTypes/n1-standard-1",
           "metadata": {
             "fingerprint": "42WmSpB8rSM=",
             "kind": "compute#metadata"
           },
-          "name": "libcloud-demo-np-node",
+          "name": "libcloud-demo-multiple-nodes-001",
           "networkInterfaces": [
             {
               "accessConfigs": [
                 {
                   "kind": "compute#accessConfig",
                   "name": "External NAT",
-                  "natIP": "173.255.121.95",
+                  "natIP": "173.255.120.207",
                   "type": "ONE_TO_ONE_NAT"
                 }
               ],
               "name": "nic0",
-              "network": "https://www.googleapis.com/compute/v1beta16/projects/project_name/global/networks/default",
-              "networkIP": "10.240.37.226"
+              "network": "https://www.googleapis.com/compute/v1/projects/project_name/global/networks/default",
+              "networkIP": "10.240.24.29"
             }
           ],
-          "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a/instances/libcloud-demo-np-node",
+          "scheduling": {
+            "automaticRestart": true,
+            "onHostMaintenance": "MIGRATE"
+          },
+          "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a/instances/libcloud-demo-multiple-nodes-001",
           "status": "RUNNING",
           "tags": {
             "fingerprint": "W7t6ZyTyIrc=",
@@ -420,11 +456,11 @@
               "libcloud"
             ]
           },
-          "zone": "https://www.googleapis.com/compute/v1beta16/projects/project_name/zones/us-central2-a"
+          "zone": "https://www.googleapis.com/compute/v1/projects/project_name/zones/us-central2-a"
         }
       ]
     }
   },
   "kind": "compute#instanceAggregatedList",
-  "selfLink": "https://www.googleapis.com/compute/v1beta16/projects/project_name/aggregated/instances"
+  "selfLink": "https://www.googleapis.com/compute/v1/projects/project_name/aggregated/instances"
 }
\ No newline at end of file


[11/44] git commit: Lint fixes

Posted by to...@apache.org.
Lint fixes


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

Branch: refs/heads/trunk
Commit: 53de72ee3d9b0b52c576f9e8fecd3030084419df
Parents: ea7662a
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 16 14:02:26 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 16 14:02:26 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/53de72ee/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index d38b42b..fd6c2e7 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1493,11 +1493,11 @@ class GCENodeDriver(NodeDriver):
                         disk_req, method='POST', data=disk_data,
                         params=disk_params).object
                 except:
-                     e = self._catch_error(ignore_errors=ignore_errors)
-                     error = e.value
-                     code = e.code
-                     disk_res = None
-                     status['disk'] = GCEFailedDisk(status['name'],
+                    e = self._catch_error(ignore_errors=ignore_errors)
+                    error = e.value
+                    code = e.code
+                    disk_res = None
+                    status['disk'] = GCEFailedDisk(status['name'],
                                                     error, code)
                 status['disk_response'] = disk_res
 
@@ -1717,7 +1717,6 @@ class GCENodeDriver(NodeDriver):
         :return:  Storage Volume object
         :rtype:   :class:`StorageVolume`
         """
-        vol = None
         request, volume_data, params = self._create_vol_req(
             size, name, location, image, snapshot)
         try:


[19/44] git commit: Rename nodelist to node_list

Posted by to...@apache.org.
Rename nodelist to node_list


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

Branch: refs/heads/trunk
Commit: aa0bd99630730bc88493ba3a05315471ad48de7b
Parents: 390c48b
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 08:48:58 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 30 08:48:58 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/aa0bd996/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index b3a9110..242fe89 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2322,14 +2322,14 @@ class GCENodeDriver(NodeDriver):
             node.extra['boot_disk'].destroy()
         return True
 
-    def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
+    def ex_destroy_multiple_nodes(self, node_list, ignore_errors=True,
                                   destroy_boot_disk=False, poll_interval=2,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
 
-        :param  nodelist: List of nodes to destroy
-        :type   nodelist: ``list`` of :class:`Node`
+        :param  node_list: List of nodes to destroy
+        :type   node_list: ``list`` of :class:`Node`
 
         :keyword  ignore_errors: If true, don't raise an exception if one or
                                  more nodes fails to be destroyed.
@@ -2353,7 +2353,7 @@ class GCENodeDriver(NodeDriver):
         status_list = []
         complete = False
         start_time = time.time()
-        for node in nodelist:
+        for node in node_list:
             request = '/zones/%s/instances/%s' % (node.extra['zone'].name,
                                                   node.name)
             try:


[18/44] git commit: Split up ex_create_multiple_nodes to make it a bit easier to read. Also, add poll_interval keyword.

Posted by to...@apache.org.
Split up ex_create_multiple_nodes to make it a bit easier to read.
Also, add poll_interval keyword.


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

Branch: refs/heads/trunk
Commit: 390c48b316f817f14a9882ae3f67d043c6d79ea7
Parents: 9ea6e7c
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 00:47:12 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Mon Dec 30 00:47:12 2013 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 253 +++++++++++++++++++++++------------
 1 file changed, 165 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/390c48b3/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 25bafcf..b3a9110 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -23,6 +23,7 @@ import sys
 
 from libcloud.common.google import GoogleResponse
 from libcloud.common.google import GoogleBaseConnection
+from libcloud.common.google import GoogleBaseError
 from libcloud.common.google import ResourceNotFoundError
 from libcloud.common.google import ResourceExistsError
 
@@ -1394,10 +1395,144 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_node(name, location.name)
 
+    def _multi_create_disk(self, status, node_attrs):
+        """Create disk for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        disk = None
+        # Check for existing disk
+        if node_attrs['use_existing_disk']:
+            try:
+                disk = self.ex_get_volume(status['name'],
+                                          node_attrs['location'])
+            except ResourceNotFoundError:
+                pass
+
+        if disk:
+            status['disk'] = disk
+        else:
+            # Create disk and return response object back in the status dict.
+            # Or, if there is an error, mark as failed.
+            disk_req, disk_data, disk_params = self._create_vol_req(
+                None, status['name'], location=node_attrs['location'],
+                image=node_attrs['image'])
+            try:
+                disk_res = self.connection.request(
+                    disk_req, method='POST', data=disk_data,
+                    params=disk_params).object
+            except GoogleBaseError:
+                e = self._catch_error(
+                    ignore_errors=node_attrs['ignore_errors'])
+                error = e.value
+                code = e.code
+                disk_res = None
+                status['disk'] = GCEFailedDisk(status['name'],
+                                               error, code)
+            status['disk_response'] = disk_res
+
+    def _multi_check_disk(self, status, node_attrs):
+        """Check disk status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['disk_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['disk_response'] = None
+            if error:
+                status['disk'] = GCEFailedDisk(status['name'], error, code)
+            else:
+                status['disk'] = self.ex_get_volume(status['name'],
+                                                    node_attrs['location'])
+
+    def _multi_create_node(self, status, node_attrs):
+        """Create node for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        # If disk has an error, set the node as failed and return
+        if hasattr(status['disk'], 'error'):
+            status['node'] = status['disk']
+            return
+
+        # Create node and return response object in status dictionary.
+        # Or, if there is an error, mark as failed.
+        request, node_data = self._create_node_req(
+            status['name'], node_attrs['size'], node_attrs['image'],
+            node_attrs['location'], node_attrs['network'], node_attrs['tags'],
+            node_attrs['metadata'], boot_disk=status['disk'])
+        try:
+            node_res = self.connection.request(
+                request, method='POST', data=node_data).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            node_res = None
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        status['node_response'] = node_res
+
+    def _multi_check_node(self, status, node_attrs):
+        """Check node status for ex_create_multiple_nodes.
+
+        :param  status: Dictionary for holding node/disk creation status.
+                        (This dictionary is modified by this method)
+        :type   status: ``dict``
+
+        :param  node_attrs: Dictionary for holding node attribute information.
+                            (size, image, location, etc.)
+        :type   node_attrs: ``dict``
+        """
+        error = None
+        try:
+            response = self.connection.request(
+                status['node_response']['selfLink']).object
+        except GoogleBaseError:
+            e = self._catch_error(ignore_errors=node_attrs['ignore_errors'])
+            error = e.value
+            code = e.code
+            response = {'status': 'DONE'}
+        if response['status'] == 'DONE':
+            status['node_response'] = None
+        if error:
+            status['node'] = GCEFailedNode(status['name'],
+                                           error, code)
+        else:
+            status['node'] = self.ex_get_node(status['name'],
+                                              node_attrs['location'])
+
     def ex_create_multiple_nodes(self, base_name, size, image, number,
                                  location=None, ex_network='default',
                                  ex_tags=None, ex_metadata=None,
                                  ignore_errors=True, use_existing_disk=True,
+                                 poll_interval=2,
                                  timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Create multiple nodes and return a list of Node objects.
@@ -1418,8 +1553,6 @@ class GCENodeDriver(NodeDriver):
         :param  image: The image to use to create the nodes.
         :type   image: ``str`` or :class:`NodeImage`
 
-        return self.ex_get_snapshot(name)
-
         :param  number: The number of nodes to create.
         :type   number: ``int``
 
@@ -1445,6 +1578,9 @@ class GCENodeDriver(NodeDriver):
                                      disk instead of creating a new one.
         :type     use_existing_disk: ``bool``
 
+        :keyword  poll_interval: Number of seconds between status checks.
+        :type	  poll_interval: ``int``
+
         :keyword  timeout: The number of seconds to wait for all nodes to be
                            created before timing out.
         :type     timeout: ``int``
@@ -1452,7 +1588,6 @@ class GCENodeDriver(NodeDriver):
         :return:  A list of Node objects for the new nodes.
         :rtype:   ``list`` of :class:`Node`
         """
-        node_data = {}
         location = location or self.zone
         if not hasattr(location, 'name'):
             location = self.ex_get_zone(location)
@@ -1463,6 +1598,15 @@ class GCENodeDriver(NodeDriver):
         if not hasattr(image, 'name'):
             image = self.ex_get_image(image)
 
+        node_attrs = {'size': size,
+                      'image': image,
+                      'location': location,
+                      'network': ex_network,
+                      'tags': ex_tags,
+                      'metadata': ex_metadata,
+                      'ignore_errors': ignore_errors,
+                      'use_existing_disk': use_existing_disk}
+
         # List for holding the status information for disk/node creation.
         status_list = []
 
@@ -1475,34 +1619,12 @@ class GCENodeDriver(NodeDriver):
                       'disk_response': None,
                       'disk': None}
 
-            # Create disks for nodes
-            disk = None
-            if use_existing_disk:
-                try:
-                    disk = self.ex_get_volume(name, location)
-                except:
-                    pass
-
-            if disk:
-                status['disk'] = disk
-            else:
-                disk_req, disk_data, disk_params = self._create_vol_req(
-                    None, name, location=location, image=image)
-                try:
-                    disk_res = self.connection.request(
-                        disk_req, method='POST', data=disk_data,
-                        params=disk_params).object
-                except:
-                    e = self._catch_error(ignore_errors=ignore_errors)
-                    error = e.value
-                    code = e.code
-                    disk_res = None
-                    status['disk'] = GCEFailedDisk(status['name'],
-                                                   error, code)
-                status['disk_response'] = disk_res
-
             status_list.append(status)
 
+        # Create disks for nodes
+        for status in status_list:
+            self._multi_create_disk(status, node_attrs)
+
         start_time = time.time()
         complete = False
         while not complete:
@@ -1510,73 +1632,25 @@ class GCENodeDriver(NodeDriver):
                 raise Exception("Timeout (%s sec) while waiting for multiple "
                                 "instances")
             complete = True
-            time.sleep(2)
-            for i, status in enumerate(status_list):
+            time.sleep(poll_interval)
+            for status in status_list:
                 # If disk does not yet exist, check on its status
                 if not status['disk']:
-                    error = None
-                    try:
-                        response = self.connection.request(
-                            status['disk_response']['selfLink']).object
-                    except:
-                        e = self._catch_error(ignore_errors=ignore_errors)
-                        error = e.value
-                        code = e.code
-                        response = {'status': 'DONE'}
-                    if response['status'] == 'DONE':
-                        status['disk_response'] = None
-                        if error:
-                            status['disk'] = GCEFailedDisk(status['name'],
-                                                           error, code)
-                        else:
-                            status['disk'] = self.ex_get_volume(status['name'],
-                                                                location)
+                    self._multi_check_disk(status, node_attrs)
 
                 # If disk exists, but node does not, create the node or check
                 # on its status if already in progress.
                 if status['disk'] and not status['node']:
                     if not status['node_response']:
-                        if hasattr(status['disk'], 'error'):
-                            status['node'] = status['disk']
-                            continue
-                        request, node_data = self._create_node_req(
-                            status['name'], size, image, location, ex_network,
-                            ex_tags, ex_metadata, boot_disk=status['disk'])
-                        try:
-                            node_res = self.connection.request(
-                                request, method='POST', data=node_data).object
-                        except:
-                            e = self._catch_error(ignore_errors=ignore_errors)
-                            error = e.value
-                            code = e.code
-                            node_res = None
-                            status['node'] = GCEFailedNode(status['name'],
-                                                           error, code)
-                        status['node_response'] = node_res
+                        self._multi_create_node(status, node_attrs)
                     else:
-                        error = None
-                        try:
-                            response = self.connection.request(
-                                status['node_response']['selfLink']).object
-                        except:
-                            e = self._catch_error(ignore_errors=ignore_errors)
-                            error = e.value
-                            code = e.code
-                            response = {'status': 'DONE'}
-                        if response['status'] == 'DONE':
-                            status['node_response'] = None
-                        if error:
-                            status['node'] = GCEFailedNode(status['name'],
-                                                           error, code)
-                        else:
-                            status['node'] = self.ex_get_node(status['name'],
-                                                              location)
-
+                        self._multi_check_node(status, node_attrs)
                 # If any of the nodes have not been created (or failed) we are
                 # not done yet.
                 if not status['node']:
                     complete = False
 
+        # Return list of nodes
         node_list = []
         for status in status_list:
             node_list.append(status['node'])
@@ -2249,7 +2323,7 @@ class GCENodeDriver(NodeDriver):
         return True
 
     def ex_destroy_multiple_nodes(self, nodelist, ignore_errors=True,
-                                  destroy_boot_disk=False,
+                                  destroy_boot_disk=False, poll_interval=2,
                                   timeout=DEFAULT_TASK_COMPLETION_TIMEOUT):
         """
         Destroy multiple nodes at once.
@@ -2265,6 +2339,9 @@ class GCENodeDriver(NodeDriver):
                                      disks.
         :type     destroy_boot_disk: ``bool``
 
+        :keyword  poll_interval: Number of seconds between status checks.
+        :type     poll_interval: ``int``
+
         :keyword  timeout: Number of seconds to wait for all nodes to be
                            destroyed.
         :type     timeout: ``int``
@@ -2282,7 +2359,7 @@ class GCENodeDriver(NodeDriver):
             try:
                 response = self.connection.request(request,
                                                    method='DELETE').object
-            except:
+            except GoogleBaseError:
                 self._catch_error(ignore_errors=ignore_errors)
                 response = None
 
@@ -2308,7 +2385,7 @@ class GCENodeDriver(NodeDriver):
                     try:
                         response = self.connection.request(
                             operation['selfLink']).object
-                    except:
+                    except GoogleBaseError:
                         self._catch_error(ignore_errors=ignore_errors)
                         no_errors = False
                         response = {'status': 'DONE'}
@@ -2332,7 +2409,7 @@ class GCENodeDriver(NodeDriver):
                         try:
                             response = self.connection.request(
                                 request, method='DELETE').object
-                        except:
+                        except GoogleBaseError:
                             self._catch_error(ignore_errors=ignore_errors)
                             no_errors = False
                             response = None
@@ -2341,7 +2418,7 @@ class GCENodeDriver(NodeDriver):
                         status['disk_success'] = True
                 operation = status['node_response'] or status['disk_response']
                 if operation:
-                    time.sleep(2)
+                    time.sleep(poll_interval)
                     complete = False
 
         success = []


[34/44] git commit: flake8 fixes

Posted by to...@apache.org.
flake8 fixes


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

Branch: refs/heads/trunk
Commit: e138a1b5c48a4755b1a811fe72489988b653051a
Parents: 64ad1cd
Author: Rick Wright <ri...@google.com>
Authored: Fri Dec 20 15:52:00 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/common/google.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e138a1b5/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 01c3cb0..2206c25 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -167,7 +167,7 @@ class GoogleResponse(JsonResponse):
             err = body['error']['errors'][0]
         else:
             err = body['error']
-        
+
         if 'code' in err:
             code = err.get('code')
             message = err.get('message')
@@ -227,8 +227,8 @@ class GoogleResponse(JsonResponse):
             else:
                 message = body
                 code = None
-            raise InvalidRequestError(message, self.status, code) 
-                
+            raise InvalidRequestError(message, self.status, code)
+
         else:
             if (not json_error) and ('error' in body):
                 (code, message) = self._get_error(body)


[36/44] git commit: Add list_volume_snapshots method to help fill out the API. This is not an efficient method, but in GCE snapshots are not keyed on the volumes they are created from.

Posted by to...@apache.org.
Add list_volume_snapshots method to help fill out the API.
This is not an efficient method, but in GCE snapshots are not keyed on the volumes they are created from.


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

Branch: refs/heads/trunk
Commit: c321b37da792da1231c0271ad847e813059961cd
Parents: 00c30bc
Author: Rick Wright <ri...@google.com>
Authored: Mon Dec 30 23:40:22 2013 -0800
Committer: Rick Wright <ri...@google.com>
Committed: Thu Jan 2 23:30:03 2014 -0800

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c321b37d/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index f056774..c8e770f 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1393,6 +1393,28 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_get_snapshot(name)
 
+    def list_volume_snapshots(self, volume):
+        """
+        List snapshots created from the provided volume.
+
+        For GCE, snapshots are global, but while the volume they were
+        created from still exists, the source disk for the snapshot is
+        tracked.
+
+        :param  volume: A StorageVolume object
+        :type   volume: :class:`StorageVolume`
+
+        :return:  A list of Snapshot objects
+        :rtype:   ``list`` of :class:`GCESnapshot`
+        """
+        volume_snapshots = []
+        volume_link = volume.extra['selfLink']
+        all_snapshots = self.ex_list_snapshots()
+        for snapshot in all_snapshots:
+            if snapshot.extra['sourceDisk'] == volume_link:
+                volume_snapshots.append(snapshot)
+        return volume_snapshots
+
     def ex_update_healthcheck(self, healthcheck):
         """
         Update a health check with new values.