Add ex_list_library_drives method.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5d0123ca Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5d0123ca Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5d0123ca Branch: refs/heads/trunk Commit: 5d0123ca20bdfff1d8c5ae597a52395301d621dd Parents: 7e3f74a Author: Tomaz Muraus <[email protected]> Authored: Fri Jan 31 22:41:56 2014 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Fri Jan 31 22:41:56 2014 +0100 ---------------------------------------------------------------------- libcloud/compute/drivers/cloudsigma.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/5d0123ca/libcloud/compute/drivers/cloudsigma.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/cloudsigma.py b/libcloud/compute/drivers/cloudsigma.py index 6a9d0a0..110ace7 100644 --- a/libcloud/compute/drivers/cloudsigma.py +++ b/libcloud/compute/drivers/cloudsigma.py @@ -1046,13 +1046,14 @@ class CloudSigma_2_0_NodeDriver(CloudSigmaNodeDriver): """ Return a list of available pre-installed library drives. - Note: If you want to list all the available library drives, use - :meth:`ex_list_library_drives` method. + Note: If you want to list all the available library drives (both + pre-installed and installation CDs), use :meth:`ex_list_library_drives` + method. """ response = self.connection.request(action='/libdrives/').object images = [self._to_image(data=item) for item in response['objects']] - # We filter out non pre-installed library drives by defafault because + # We filter out non pre-installed library drives by default because # they can't be used directly following a default Libcloud server # creation flow. images = [image for image in images if @@ -1315,6 +1316,17 @@ class CloudSigma_2_0_NodeDriver(CloudSigmaNodeDriver): # Drive extension methods + def ex_list_library_drives(self): + """ + Return a list of all the available library drives (pre-installed and + installation CDs). + + :rtype: ``list`` of :class:`.CloudSigmaDrive` objects + """ + response = self.connection.request(action='/libdrives/').object + drives = [self._to_drive(data=item) for item in response['objects']] + return drives + def ex_list_user_drives(self): """ Return a list of all the available user's drives.
