libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [37/44] git commit: Fix signature for create_volume to align with the base API
Date Fri, 03 Jan 2014 14:59:49 GMT
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 <rickw@google.com>
Authored: Fri Dec 20 14:20:40 2013 -0800
Committer: Rick Wright <rickw@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)


Mime
View raw message