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/03/07 10:46:54 UTC

[3/9] libcloud git commit: Making additional vlans/ips be a tuple/list

Making additional vlans/ips be a tuple/list


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

Branch: refs/heads/trunk
Commit: 2eade8f4034255913296d12c9677b19c8e48157d
Parents: 7f5dd46
Author: Jeffrey Dunham <je...@gmail.com>
Authored: Mon Feb 1 21:07:07 2016 -0500
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Mar 7 20:46:16 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/2eade8f4/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index d4d129f..cdefc13 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -233,21 +233,21 @@ class DimensionDataNodeDriver(NodeDriver):
                 raise ValueError("One of ex_vlan or ex_primary_ipv4 "
                                  "must be specified")
 
-            if isinstance(ex_additional_nics_ipv4, list):
+            if isinstance(ex_additional_nics_ipv4, (list, tuple)):
                 for ipv4_nic in ex_additional_nics_ipv4:
                     add_nic = ET.SubElement(network_inf_elm, "additionalNic")
                     ET.SubElement(add_nic, "privateIpv4").text = ipv4_nic
             elif ex_additional_nics_ipv4 is not None:
                 raise TypeError("ex_additional_nics_ipv4 must "
-                                "be None or a list")
+                                "be None or a tuple/list")
 
-            if isinstance(ex_additional_nics_vlan, list):
+            if isinstance(ex_additional_nics_vlan, (list, tuple)):
                 for vlan_nic in ex_additional_nics_vlan:
                     add_nic = ET.SubElement(network_inf_elm, "additionalNic")
                     ET.SubElement(add_nic, "vlanId").text = vlan_nic
             elif ex_additional_nics_vlan is not None:
                 raise TypeError("ex_additional_nics_vlan"
-                                "must be None or a list")
+                                "must be None or tuple/list")
 
         response = self.connection.request_with_orgId_api_2(
             'server/deployServer',