You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/07/14 00:57:16 UTC

[1/2] libcloud git commit: added image details and size details to a node Closes #832

Repository: libcloud
Updated Branches:
  refs/heads/trunk 8ceabf734 -> 4b6d12b94


added image details and size details to a node
Closes #832


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

Branch: refs/heads/trunk
Commit: ae4f64e4f72d77050d163c7a3a30385d21c73056
Parents: 8ceabf7
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Jul 4 15:29:24 2016 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Jul 14 10:56:20 2016 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py   | 4 ++++
 libcloud/test/compute/test_dimensiondata.py | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae4f64e4/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 075086b..4968ce6 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -2786,6 +2786,10 @@ class DimensionDataNodeDriver(NodeDriver):
                  state=node_state,
                  public_ips=[public_ip] if public_ip is not None else [],
                  private_ips=[private_ip] if private_ip is not None else [],
+                 size=self.list_sizes()[0],
+                 image=NodeImage(extra['sourceImageId'],
+                                 extra['OS_displayName'],
+                                 self.connection.driver),
                  driver=self.connection.driver,
                  extra=extra)
         return n

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae4f64e4/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index bf1148d..5b5d755 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -126,6 +126,9 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
         node = ret[3]
         self.assertTrue(isinstance(node.extra['disks'], list))
         self.assertTrue(isinstance(node.extra['disks'][0], DimensionDataServerDisk))
+        self.assertEqual(node.size.id, '1')
+        self.assertEqual(node.image.id, '3ebf3c0f-90fe-4a8b-8585-6e65b316592c')
+        self.assertEqual(node.image.name, 'WIN2008S/32')
         disk = node.extra['disks'][0]
         self.assertEqual(disk.id, "c2e1f199-116e-4dbc-9960-68720b832b0a")
         self.assertEqual(disk.scsi_id, 0)


[2/2] libcloud git commit: change for #832

Posted by an...@apache.org.
change for #832


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

Branch: refs/heads/trunk
Commit: 4b6d12b94c41f470ce04cf2908ab677f0e2cba8a
Parents: ae4f64e
Author: Anthony Shaw <an...@apache.org>
Authored: Thu Jul 14 10:57:08 2016 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Jul 14 10:57:08 2016 +1000

----------------------------------------------------------------------
 CHANGES.rst | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4b6d12b9/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index f14494e..fbdfd39 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,6 +7,10 @@ Changes in current version of Apache Libcloud
 Compute
 ~~~~~~~
 
+- Add image and size details to `list_nodes` response in Dimension Data driver
+  (GITHUB-832)
+  [Anthony Shaw]
+
 - Add support for changing VM admin password in VMware driver
   (GITHUB-833)
   [Juan Font Alonso]