libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vd...@apache.org
Subject [21/23] libcloud git commit: Solve PR issues
Date Tue, 04 Dec 2018 08:54:36 GMT
Solve PR issues


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

Branch: refs/heads/trunk
Commit: 9c0da3dd4655ee7c58fee2c709670bec518c6354
Parents: a2faa55
Author: micafer <micafer1@upv.es>
Authored: Tue Oct 23 13:05:07 2018 +0200
Committer: Rick van de Loo <rickvandeloo@gmail.com>
Committed: Tue Dec 4 09:45:48 2018 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/openstack.py | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9c0da3dd/libcloud/compute/drivers/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index b5914ff..868ae09 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -2220,27 +2220,26 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
 
         return StorageVolume(
             id=api_node['id'],
-            name=api_node.get('name', api_node.get('displayName', None)),
+            name=api_node.get('name', api_node.get('displayName')),
             size=api_node['size'],
             state=state,
             driver=self,
             extra={
                 'description': api_node.get('description',
-                                            api_node.get('displayDescription',
-                                                         None)),
+                                            api_node.get('displayDescription')
+                                            ),
                 'attachments': [att for att in api_node['attachments'] if att],
                 # TODO: remove in 1.18.0
                 'state': api_node.get('status', None),
                 'snapshot_id': api_node.get('snapshot_id',
-                                            api_node.get('snapshotId', None)),
+                                            api_node.get('snapshotId')),
                 'location': api_node.get('availability_zone',
-                                         api_node.get('availabilityZone',
-                                                      None)),
+                                         api_node.get('availabilityZone')),
                 'volume_type': api_node.get('volume_type',
-                                            api_node.get('volumeType', None)),
+                                            api_node.get('volumeType')),
                 'metadata': api_node.get('metadata', None),
                 'created_at': api_node.get('created_at',
-                                           api_node.get('createdAt', None))
+                                           api_node.get('createdAt'))
             }
         )
 
@@ -3166,6 +3165,14 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
                                              data=data).object)
 
     def destroy_volume_snapshot(self, snapshot):
+        """
+        Delete a Volume Snapshot.
+
+        :param snapshot: Snapshot to be deleted
+        :type  snapshot: :class:`VolumeSnapshot`
+
+        :rtype: ``bool``
+        """
         resp = self.volumev2_connection.request('/snapshots/%s' % snapshot.id,
                                                 method='DELETE')
         return resp.status in (httplib.NO_CONTENT, httplib.ACCEPTED)
@@ -3423,7 +3430,7 @@ class OpenStack_1_1_FloatingIpAddress(object):
                 % (self.id, self.ip_address, self.pool, self.driver))
 
 
-class OpenStack_2_FloatingIpPool(OpenStack_1_1_FloatingIpPool):
+class OpenStack_2_FloatingIpPool(object):
     """
     Floating IP Pool info.
     """


Mime
View raw message