Repository: libcloud Updated Branches: refs/heads/trunk ab6ad7758 -> 659d64cec
Change signature of base class (see comment) The base driver defines a signature that is not used by any of the drivers implementing `create_volume`. 1. `gandi` does not use the snapshot parameter. 1. `gce` uses the parameter, but accepts either a string or an object or None. 1. `ibm` does not use the snapshot parameter. 1. `opennebula` does not use the snapshot parameter. 1. `profitbricks` breaks the contract entirely. In this PR both `ec2` and `openstack` implement the signature like this. This matches `gce`, so all drivers using the snapshot functionality act like this new signature. Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/53f9917b Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/53f9917b Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/53f9917b Branch: refs/heads/trunk Commit: 53f9917b04b184341607d4d44c27957a3edd6ebd Parents: 1628fc4 Author: Allard Hoeve <[email protected]> Authored: Tue Feb 24 13:54:36 2015 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Wed Mar 4 23:30:12 2015 +0100 ---------------------------------------------------------------------- libcloud/compute/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/53f9917b/libcloud/compute/base.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/base.py b/libcloud/compute/base.py index 8387104..1705950 100644 --- a/libcloud/compute/base.py +++ b/libcloud/compute/base.py @@ -997,9 +997,9 @@ class NodeDriver(BaseDriver): (optional) :type location: :class:`.NodeLocation` - :param snapshot: Name of snapshot from which to create the new - volume. (optional) - :type snapshot: ``str`` + :param snapshot: Snapshot from which to create the new + volume. (optional) + :type snapshot: :class:`.VolumeSnapshot` :return: The newly created volume. :rtype: :class:`StorageVolume`
