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 2015/02/21 19:57:37 UTC

libcloud git commit: Add volumes_attached to node.extra

Repository: libcloud
Updated Branches:
  refs/heads/trunk 6a281fda5 -> 26ddc9a7d


Add volumes_attached to node.extra

Closes #462

Signed-off-by: Tomaz Muraus <to...@apache.org>


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

Branch: refs/heads/trunk
Commit: 26ddc9a7dfcac29531b54f573d264050a5785814
Parents: 6a281fd
Author: Allard Hoeve <al...@byte.nl>
Authored: Tue Feb 17 16:09:26 2015 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Feb 21 19:51:34 2015 +0100

----------------------------------------------------------------------
 CHANGES.rst                           | 4 ++++
 libcloud/compute/drivers/openstack.py | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/26ddc9a7/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index bfb8a38..976823f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -25,6 +25,10 @@ Compute
   (LIBCLOUD-664, GITHUB-451)
   [Allard Hoeve]
 
+- Add ``volumes_attached`` attibute to ``node.extra`` in the OpenStack driver..
+  (LIBCLOUD-668, GITHUB-462)
+  [Allard Hoeve]
+
 Changes with Apache Libcloud 0.17.0
 -----------------------------------
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/26ddc9a7/libcloud/compute/drivers/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index f9a5f7c..fce25af 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -1994,6 +1994,7 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
         image = api_node.get('image', None)
         image_id = image.get('id', None) if image else None
         config_drive = api_node.get("config_drive", False)
+        volumes_attached = api_node.get('os-extended-volumes:volumes_attached')
 
         return Node(
             id=api_node['id'],
@@ -2020,8 +2021,8 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
                 key_name=api_node.get('key_name', None),
                 disk_config=api_node.get('OS-DCF:diskConfig', None),
                 config_drive=config_drive,
-                availability_zone=api_node.get('OS-EXT-AZ:availability_zone',
-                                               None),
+                availability_zone=api_node.get('OS-EXT-AZ:availability_zone'),
+                volumes_attached=volumes_attached,
             ),
         )