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/04/13 14:00:47 UTC

[1/5] libcloud git commit: Merge remote-tracking branch 'origin/trunk' into trunk Closes #746

Repository: libcloud
Updated Branches:
  refs/heads/trunk bd6fa8dd3 -> 965d4fe4f


Merge remote-tracking branch 'origin/trunk' into trunk
Closes #746


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

Branch: refs/heads/trunk
Commit: 66cdb4860fbacbf317691dba3562621ef4946f25
Parents: 2a3e9bd 5a5c259
Author: anthony-shaw <an...@apache.org>
Authored: Wed Apr 13 21:37:21 2016 +1000
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:53:12 2016 +1000

----------------------------------------------------------------------

----------------------------------------------------------------------



[5/5] libcloud git commit: allow for private IPv4 when adding a NIC Closes #743

Posted by an...@apache.org.
allow for private IPv4 when adding a NIC
Closes #743


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

Branch: refs/heads/trunk
Commit: 965d4fe4f4f1b1edd7fb0c76ad15d39e395253cb
Parents: 44d7217
Author: Bernard Paques <be...@gmail.com>
Authored: Tue Apr 12 22:33:57 2016 +0200
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:58:45 2016 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/965d4fe4/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 723f21c..19a3856 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -822,7 +822,7 @@ class DimensionDataNodeDriver(NodeDriver):
 
         if vlan is not None:
             ET.SubElement(nic, 'vlanId').text = vlan.id
-        elif primary_ipv4 is not None:
+        elif private_ipv4 is not None:
             ET.SubElement(nic, 'privateIpv4').text = private_ipv4
         else:
             raise ValueError("One of vlan or primary_ipv4 "


[3/5] libcloud git commit: expand test on disk attributes

Posted by an...@apache.org.
expand test on disk attributes


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

Branch: refs/heads/trunk
Commit: e69a7cb93a1077646786e447887bf31a0c9f9916
Parents: 5b01442
Author: Bernard Paques <be...@gmail.com>
Authored: Mon Feb 29 22:15:46 2016 +0100
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:58:36 2016 +1000

----------------------------------------------------------------------
 libcloud/test/compute/test_dimensiondata.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e69a7cb9/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 915ed53..7554410 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -111,6 +111,17 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
                                      ex_started=True, ex_state='fake_state',
                                      ex_network='fake_network', ex_network_domain='fake_network_domain')
         self.assertTrue(isinstance(ret, list))
+        self.assertEqual(len(ret), 7)
+
+        node = ret[3]
+        self.assertTrue(isinstance(node.extra['disks'], list))
+        self.assertTrue(isinstance(node.extra['disks'][0], DimensionDataServerDisk))
+        disk = node.extra['disks'][0]
+        self.assertEqual(disk.id, "c2e1f199-116e-4dbc-9960-68720b832b0a")
+        self.assertEqual(disk.scsi_id, 0)
+        self.assertEqual(disk.size_gb, 50)
+        self.assertEqual(disk.speed, "STANDARD")
+        self.assertEqual(disk.state, "NORMAL")
 
     def test_list_nodes_response_LOCATION(self):
         DimensionDataMockHttp.type = None


[4/5] libcloud git commit: allow for private IPv4 when adding a NIC

Posted by an...@apache.org.
allow for private IPv4 when adding a NIC


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

Branch: refs/heads/trunk
Commit: 44d721735706f6f0a0709d73eaee589e96e7a0f7
Parents: e69a7cb
Author: Bernard Paques <be...@gmail.com>
Authored: Tue Apr 12 22:26:04 2016 +0200
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:58:36 2016 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/44d72173/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index d618a33..723f21c 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -794,25 +794,39 @@ class DimensionDataNodeDriver(NodeDriver):
             rules.extend(self._to_anti_affinity_rules(result))
         return rules
 
-    def ex_attach_node_to_vlan(self, node, vlan):
+    def ex_attach_node_to_vlan(self, node, vlan=None, private_ipv4=None):
         """
         Attach a node to a VLAN by adding an additional NIC to
         the node on the target VLAN. The IP will be automatically
-        assigned based on the VLAN IP network space.
+        assigned based on the VLAN IP network space. Alternatively, provide
+        a private IPv4 address instead of VLAN information, and this will
+        be assigned to the node on corresponding NIC.
 
         :param      node: Node which should be used
         :type       node: :class:`Node`
 
         :param      vlan: VLAN to attach the node to
+                          (required unless private_ipv4)
         :type       vlan: :class:`DimensionDataVlan`
 
+        :keyword    private_ipv4: Private nic IPv4 Address
+                                  (required unless vlan)
+        :type       private_ipv4: ``str``
+
         :rtype: ``bool``
         """
         request = ET.Element('addNic',
                              {'xmlns': TYPES_URN})
         ET.SubElement(request, 'serverId').text = node.id
         nic = ET.SubElement(request, 'nic')
-        ET.SubElement(nic, 'vlanId').text = vlan.id
+
+        if vlan is not None:
+            ET.SubElement(nic, 'vlanId').text = vlan.id
+        elif primary_ipv4 is not None:
+            ET.SubElement(nic, 'privateIpv4').text = private_ipv4
+        else:
+            raise ValueError("One of vlan or primary_ipv4 "
+                             "must be specified")
 
         response = self.connection.request_with_orgId_api_2(
             'server/addNic',


[2/5] libcloud git commit: Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk

Posted by an...@apache.org.
Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk


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

Branch: refs/heads/trunk
Commit: 5b014428caf408ea4a6e5bb7b8e6229029886e0b
Parents: 66cdb48 bd6fa8d
Author: anthony-shaw <an...@apache.org>
Authored: Wed Apr 13 21:55:09 2016 +1000
Committer: anthony-shaw <an...@apache.org>
Committed: Wed Apr 13 21:55:09 2016 +1000

----------------------------------------------------------------------

----------------------------------------------------------------------