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/02/29 05:12:14 UTC

[01/19] libcloud git commit: Allow ex_list_firewall_rules to accept network domain id and pageSize, pageNumber as params

Repository: libcloud
Updated Branches:
  refs/heads/trunk 02fa4f640 -> 5b2a26c0a


Allow ex_list_firewall_rules to accept network domain id and pageSize, pageNumber as params


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

Branch: refs/heads/trunk
Commit: 71063f679cb438242d5bcc8db75b0cfb2ace4c4d
Parents: 60b5661
Author: Ming Sheng <mi...@gmail.com>
Authored: Wed Dec 30 21:13:51 2015 +0800
Committer: Ming Sheng <mi...@gmail.com>
Committed: Wed Dec 30 21:13:51 2015 +0800

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py          | 8 ++++----
 libcloud/compute/drivers/dimensiondata.py | 9 ++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/71063f67/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 3fc6e3c..573afe3 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -341,7 +341,7 @@ class DimensionDataNetworkDomain(object):
         self.plan = plan
 
     def __repr__(self):
-        return (('<DimensionDataNetworkDomain: id=%s, name=%s,'
+        return (('<DimensionDataNetworkDomain: id=%s, name=%s, '
                  'description=%s, location=%s, status=%s>')
                 % (self.id, self.name, self.description, self.location,
                    self.status))
@@ -362,7 +362,7 @@ class DimensionDataPublicIpBlock(object):
         self.status = status
 
     def __repr__(self):
-        return (('<DimensionDataNetworkDomain: id=%s, base_ip=%s,'
+        return (('<DimensionDataNetworkDomain: id=%s, base_ip=%s, '
                  'size=%s, location=%s, status=%s>')
                 % (self.id, self.base_ip, self.size, self.location,
                    self.status))
@@ -419,7 +419,7 @@ class DimensionDataFirewallRule(object):
         self.enabled = enabled
 
     def __repr__(self):
-        return (('<DimensionDataNetworkDomain: id=%s, name=%s,'
+        return (('<DimensionDataNetworkDomain: id=%s, name=%s, '
                  'action=%s, location=%s, status=%s>')
                 % (self.id, self.name, self.action, self.location,
                    self.status))
@@ -612,7 +612,7 @@ class DimensionDataPoolMember(object):
 
     def __repr__(self):
         return (('<DimensionDataPool: id=%s, name=%s, '
-                 'ip=%s, status=%s, port=%s, node_id=%s')
+                 'ip=%s, status=%s, port=%s, node_id=%s>')
                 % (self.id, self.name,
                    self.ip, self.status, self.port,
                    self.node_id))

http://git-wip-us.apache.org/repos/asf/libcloud/blob/71063f67/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index c37a1ab..8348ec7 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -929,9 +929,12 @@ class DimensionDataNodeDriver(NodeDriver):
             'server/server/%s' % id).object
         return self._to_node(node)
 
-    def ex_list_firewall_rules(self, network_domain):
-        params = {}
-        params['networkDomainId'] = network_domain.id
+    def ex_list_firewall_rules(self, network_domain, page_size=50, page_number=1):
+        params = {'pageSize': page_size, 'pageNumber': page_number}
+        if isinstance(network_domain, str):
+            params['networkDomainId'] = network_domain
+        else:
+            params['networkDomainId'] = network_domain.id
 
         response = self.connection \
             .request_with_orgId_api_2('network/firewallRule',


[07/19] libcloud git commit: Merge pull request #8 from DimensionData-AP-COE/dimension_data_load_balancer_update

Posted by an...@apache.org.
Merge pull request #8 from DimensionData-AP-COE/dimension_data_load_balancer_update

added port and listenerIpAddress options

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

Branch: refs/heads/trunk
Commit: ae76290e771f6843a307244c30d1fd2fc5a85fcc
Parents: c18afd7 24017e4
Author: Anthony Shaw <an...@gmail.com>
Authored: Tue Jan 5 19:38:47 2016 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Tue Jan 5 19:38:47 2016 +1100

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/dimensiondata.py | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[13/19] libcloud git commit: fix to create a firewall rule with the specific source ip

Posted by an...@apache.org.
fix to create a firewall rule with the specific source ip


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

Branch: refs/heads/trunk
Commit: f254354f1bc2fc1d1dfa4249c15cbeb32a5b2a93
Parents: 6d9e820
Author: kumar Chockalingam <ku...@gmail.com>
Authored: Mon Feb 29 10:55:31 2016 +1100
Committer: kumar Chockalingam <ku...@gmail.com>
Committed: Mon Feb 29 10:55:31 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py          |  3 ++-
 ...4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml | 17 ++++++++++++++++-
 libcloud/test/compute/test_dimensiondata.py        | 11 ++++++++++-
 3 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f254354f/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 651536e..3a38744 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -1135,7 +1135,8 @@ class DimensionDataNodeDriver(NodeDriver):
             source_ip.set('address', 'ANY')
         else:
             source_ip.set('address', rule.source.ip_address)
-            source_ip.set('prefixSize', str(rule.source.ip_prefix_size))
+            if rule.source.ip_prefix_size is not None:                
+                source_ip.set('prefixSize', str(rule.source.ip_prefix_size))
             if rule.source.port_begin is not None:
                 source_port = ET.SubElement(source, 'port')
                 source_port.set('begin', rule.source.port_begin)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/f254354f/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml
index b09d963..fb5b6ed 100644
--- a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<firewallRules xmlns="urn:didata.com:api:cloud:types" pageNumber="1" pageCount="13" totalCount="13" pageSize="50">
+<firewallRules xmlns="urn:didata.com:api:cloud:types" pageNumber="1" pageCount="13" totalCount="13" pageSize="50">     
     <firewallRule id="756cba02-b0bc-48f4-aea5-9445870b6148" datacenterId="NA9" ruleType="DEFAULT_RULE">
         <networkDomainId>b30c224c-c95b-4cd9-bb8b-bfdfb5486abf</networkDomainId>
         <name>CCDEFAULT.BlockOutboundMailIPv4</name>
@@ -207,4 +207,19 @@
         <enabled>true</enabled>
         <state>NORMAL</state>
     </firewallRule>
+    <firewallRule id="b976e0e6-4fb2-4f3e-a016-652e02d211b4" datacenterId="NA9" ruleType="CLIENT_RULE">
+        <networkDomainId>b30c224c-c95b-4cd9-bb8b-bfdfb5486abf</networkDomainId>
+        <name>SpecificSourceIP</name>
+        <action>ACCEPT_DECISIVELY</action>
+        <ipVersion>IPV6</ipVersion>
+        <protocol>TCP</protocol>
+        <source>
+            <ip address="2607:f480:111:1336:6503:544c:74a6:3a28"/>            
+        </source>
+        <destination>
+            <ip address="ANY"/>
+        </destination>
+        <enabled>true</enabled>
+        <state>NORMAL</state>
+    </firewallRule>
 </firewallRules>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/libcloud/blob/f254354f/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 3bb0210..dff3ba3 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -33,6 +33,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 from libcloud.test.secrets import DIMENSIONDATA_PARAMS
 
 
+
 class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
@@ -448,9 +449,17 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def test_ex_create_firewall_rule(self):
         net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')
-        rules = self.driver.ex_list_firewall_rules(net)
+        rules = self.driver.ex_list_firewall_rules(net)        
         rule = self.driver.ex_create_firewall_rule(net, rules[0], 'FIRST')
         self.assertEqual(rule.id, 'd0a20f59-77b9-4f28-a63b-e58496b73a6c')
+        
+    def test_ex_create_firewall_rule_with_specific_source_ip(self):
+        net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')
+        rules = self.driver.ex_list_firewall_rules(net)
+        specific_source_ip_rule = list(filter(lambda x: x.name == 'SpecificSourceIP', 
+                                              rules))[0]        
+        rule = self.driver.ex_create_firewall_rule(net, specific_source_ip_rule, 'FIRST')
+        self.assertEqual(rule.id, 'd0a20f59-77b9-4f28-a63b-e58496b73a6c')
 
     def test_ex_get_firewall_rule(self):
         net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')


[09/19] libcloud git commit: Fix casing inconsistency

Posted by an...@apache.org.
Fix casing inconsistency


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

Branch: refs/heads/trunk
Commit: 6d9e820ae674a2388303eedc760602ccbeada147
Parents: 8c64e17
Author: anthony-shaw <an...@gmail.com>
Authored: Thu Feb 18 13:19:31 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Thu Feb 18 13:19:31 2016 +1100

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/dimensiondata.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6d9e820a/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py
index f7db258..2508fca 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -560,7 +560,7 @@ class DimensionDataLBDriver(Driver):
                                    ex_description,
                                    port,
                                    pool,
-                                   listenerIpAddress=None,
+                                   listener_ip_address=None,
                                    persistence_profile=None,
                                    fallback_persistence_profile=None,
                                    irule=None,
@@ -586,8 +586,8 @@ class DimensionDataLBDriver(Driver):
         :param pool: The pool to use for the listener
         :type  pool: :class:`DimensionDataPool`
 
-        :param listenerIpAddress: The IPv4 Address of the virtual listener
-        :type listenerIpaddress: ``str``
+        :param listener_ip_address: The IPv4 Address of the virtual listener
+        :type  listener_ip_address: ``str``
 
         :param persistence_profile: Persistence profile
         :type  persistence_profile: :class:`DimensionDataPersistenceProfile`
@@ -633,9 +633,9 @@ class DimensionDataLBDriver(Driver):
         ET.SubElement(create_node_elm, "type").text = listener_type
         ET.SubElement(create_node_elm, "protocol") \
             .text = protocol
-        if listenerIpAddress is not None:
+        if listener_ip_address is not None:
             ET.SubElement(create_node_elm, "listenerIpAddress").text = \
-                str(listenerIpAddress)
+                str(listener_ip_address)
         ET.SubElement(create_node_elm, "port").text = str(port)
         ET.SubElement(create_node_elm, "enabled").text = 'true'
         ET.SubElement(create_node_elm, "connectionLimit") \


[10/19] libcloud git commit: DimensionData: Adding better node states, more than just running and terminated

Posted by an...@apache.org.
DimensionData: Adding better node states, more than just running and terminated


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

Branch: refs/heads/trunk
Commit: d44fd923e099f374128813fdbf73d7f5464cee03
Parents: 6d9e820
Author: Jeffrey Dunham <je...@gmail.com>
Authored: Fri Feb 19 21:47:37 2016 -0500
Committer: anthony-shaw <an...@gmail.com>
Committed: Sun Feb 28 16:18:56 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py       |  37 +++++--
 libcloud/compute/types.py                       |   6 ++
 ...745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml | 105 ++++++++++++++++++-
 libcloud/test/compute/test_dimensiondata.py     |  14 ++-
 4 files changed, 152 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d44fd923/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 651536e..268798f 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -42,6 +42,21 @@ from libcloud.utils.xml import fixxpath, findtext, findall
 from libcloud.utils.py3 import basestring
 from libcloud.compute.types import NodeState, Provider
 
+# Node state map is a dictionary with the keys as tuples
+# These tuples represent:
+# (<state_of_node_from_didata>, <is node started?>, <action happening>)
+NODE_STATE_MAP = {
+    ('NORMAL', 'true', None): NodeState.RUNNING,
+    ('NORMAL', 'false', None): NodeState.STOPPED,
+    ('PENDING_CHANGE', 'true', 'START_SERVER'): NodeState.STARTING,
+    ('PENDING_ADD', 'true', 'DEPLOY_SERVER'): NodeState.STARTING,
+    ('PENDING_CHANGE', 'true', 'SHUTDOWN_SERVER'): NodeState.STOPPING,
+    ('PENDING_CHANGE', 'true', 'REBOOT_SERVER'): NodeState.REBOOTING,
+    ('PENDING_CHANGE', 'true', 'RESET_SERVER'): NodeState.REBOOTING,
+    ('PENDING_CHANGE', 'true', 'RECONFIGURE_SERVER'): NodeState.RECONFIGURING,
+    ('PENDING_CHANGE', 'true', 'POWER_OFF_SERVER'): NodeState.STOPPING,
+}
+
 
 class DimensionDataNodeDriver(NodeDriver):
     """
@@ -1826,16 +1841,14 @@ class DimensionDataNodeDriver(NodeDriver):
 
     def _to_nodes(self, object):
         node_elements = object.findall(fixxpath('server', TYPES_URN))
-
         return [self._to_node(el) for el in node_elements]
 
     def _to_node(self, element):
-        if findtext(element, 'started', TYPES_URN) == 'true':
-            state = NodeState.RUNNING
-        else:
-            state = NodeState.TERMINATED
-
+        started = findtext(element, 'started', TYPES_URN)
         status = self._to_status(element.find(fixxpath('progress', TYPES_URN)))
+        dd_state = findtext(element, 'state', TYPES_URN)
+
+        node_state = self._get_node_state(dd_state, started, status.action)
 
         has_network_info \
             = element.find(fixxpath('networkInfo', TYPES_URN)) is not None
@@ -1885,7 +1898,7 @@ class DimensionDataNodeDriver(NodeDriver):
 
         n = Node(id=element.get('id'),
                  name=findtext(element, 'name', TYPES_URN),
-                 state=state,
+                 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 [],
                  driver=self.connection.driver,
@@ -1927,6 +1940,16 @@ class DimensionDataNodeDriver(NodeDriver):
         return s
 
     @staticmethod
+    def _get_node_state(state, started, action):
+        try:
+            return NODE_STATE_MAP[(state, started, action)]
+        except KeyError:
+            if started == 'true':
+                return NodeState.RUNNING
+            else:
+                return NodeState.TERMINATED
+
+    @staticmethod
     def _location_to_location_id(location):
         if isinstance(location, NodeLocation):
             return location.id

http://git-wip-us.apache.org/repos/asf/libcloud/blob/d44fd923/libcloud/compute/types.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/types.py b/libcloud/compute/types.py
index 1cef29c..32b640c 100644
--- a/libcloud/compute/types.py
+++ b/libcloud/compute/types.py
@@ -222,25 +222,31 @@ class NodeState(Type):
     Standard states for a node
 
     :cvar RUNNING: Node is running.
+    :cvar STARTING: Node is starting up.
     :cvar REBOOTING: Node is rebooting.
     :cvar TERMINATED: Node is terminated. This node can't be started later on.
+    :cvar STOPPING: Node is currently trying to stop.
     :cvar STOPPED: Node is stopped. This node can be started later on.
     :cvar PENDING: Node is pending.
     :cvar SUSPENDED: Node is suspended.
     :cvar ERROR: Node is an error state. Usually no operations can be performed
                  on the node once it ends up in the error state.
     :cvar PAUSED: Node is paused.
+    :cvar RECONFIGURING: Node is being reconfigured.
     :cvar UNKNOWN: Node state is unknown.
     """
     RUNNING = 'running'
+    STARTING = 'starting'
     REBOOTING = 'rebooting'
     TERMINATED = 'terminated'
     PENDING = 'pending'
     UNKNOWN = 'unknown'
+    STOPPING = 'stopping'
     STOPPED = 'stopped'
     SUSPENDED = 'suspended'
     ERROR = 'error'
     PAUSED = 'paused'
+    RECONFIGURING = 'reconfiguring'
 
 
 class StorageVolumeState(Type):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/d44fd923/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
index c3d607f..bc333d8 100644
--- a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
@@ -19,7 +19,7 @@
         <vmwareTools versionStatus="NEED_UPGRADE" runningStatus="RUNNING" apiVersion="8389" />
         <virtualHardware version="vmx-08" upToDate="false" />
     </server>
-    <!-- MCP 2.0 Server -->
+    <!-- MCP 2.0 Server State: SHUTTING_DOWN-->
     <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
         <name>Production Web Server MCP 2</name>
         <description>Server to host our main web application.</description>
@@ -46,4 +46,107 @@
         <vmwareTools versionStatus="CURRENT" runningStatus="RUNNING" apiVersion="9354" />
         <virtualHardware version="vmx-08" upToDate="false" />
     </server>
+    <!-- MCP 2.0 Server State: RECONFIGURING-->
+    <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
+        <name>Production Web Server MCP 2</name>
+        <description>Server to host our main web application.</description>
+        <operatingSystem id="WIN2008S32" displayName="WIN2008S/32" family="WINDOWS" />
+        <cpu count="2" speed="STANDARD" coresPerSocket="1" />
+        <memoryGb>4</memoryGb>
+        <disk id="c2e1f199-116e-4dbc-9960-68720b832b0a" scsiId="0" sizeGb="50" speed="STANDARD" state="NORMAL" />
+        <networkInfo networkDomainId="553f26b6-2a73-42c3-a78b-6116f11291d0">
+            <primaryNic id="5e869800-df7b-4626-bcbf-8643b8be11fd" privateIpv4="10.0.4.8" ipv6="2607:f480:1111:1282:2960:fb72:7154:6160" vlanId="bc529e20-dc6f-42ba-be20-0ffe44d1993f" vlanName="Production VLAN" state="NORMAL" />
+        </networkInfo>
+        <backup assetId="91002e08-8dc1-47a1-ad33-04f501c06f87" servicePlan="Advanced" state="NORMAL" />
+        <monitoring monitoringId="11039" servicePlan="ESSENTIALS" state="NORMAL" />
+        <softwareLabel>MSSQL2008R2S</softwareLabel>
+        <sourceImageId>3ebf3c0f-90fe-4a8b-8585-6e65b316592c</sourceImageId>
+        <createTime>2015-12-02T10:31:33.000Z</createTime>
+        <deployed>true</deployed>
+        <started>true</started>
+        <state>PENDING_CHANGE</state>
+        <progress>
+            <action>RECONFIGURE_SERVER</action>
+            <requestTime>2015-12-02T11:07:40.000Z</requestTime>
+            <userName>devuser1</userName>
+        </progress>
+        <vmwareTools versionStatus="CURRENT" runningStatus="RUNNING" apiVersion="9354" />
+        <virtualHardware version="vmx-08" upToDate="false" />
+    </server>
+    <!-- MCP 2.0 Server State: UNKNOWN - running-->
+    <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
+        <name>Production Web Server MCP 2</name>
+        <description>Server to host our main web application.</description>
+        <operatingSystem id="WIN2008S32" displayName="WIN2008S/32" family="WINDOWS" />
+        <cpu count="2" speed="STANDARD" coresPerSocket="1" />
+        <memoryGb>4</memoryGb>
+        <disk id="c2e1f199-116e-4dbc-9960-68720b832b0a" scsiId="0" sizeGb="50" speed="STANDARD" state="NORMAL" />
+        <networkInfo networkDomainId="553f26b6-2a73-42c3-a78b-6116f11291d0">
+            <primaryNic id="5e869800-df7b-4626-bcbf-8643b8be11fd" privateIpv4="10.0.4.8" ipv6="2607:f480:1111:1282:2960:fb72:7154:6160" vlanId="bc529e20-dc6f-42ba-be20-0ffe44d1993f" vlanName="Production VLAN" state="NORMAL" />
+        </networkInfo>
+        <backup assetId="91002e08-8dc1-47a1-ad33-04f501c06f87" servicePlan="Advanced" state="NORMAL" />
+        <monitoring monitoringId="11039" servicePlan="ESSENTIALS" state="NORMAL" />
+        <softwareLabel>MSSQL2008R2S</softwareLabel>
+        <sourceImageId>3ebf3c0f-90fe-4a8b-8585-6e65b316592c</sourceImageId>
+        <createTime>2015-12-02T10:31:33.000Z</createTime>
+        <deployed>true</deployed>
+        <started>true</started>
+        <state>UNKNOWN</state>
+        <progress>
+            <action>SHUTDOWN_SERVER</action>
+            <requestTime>2015-12-02T11:07:40.000Z</requestTime>
+            <userName>devuser1</userName>
+        </progress>
+        <vmwareTools versionStatus="CURRENT" runningStatus="RUNNING" apiVersion="9354" />
+        <virtualHardware version="vmx-08" upToDate="false" />
+    </server>
+    <!-- MCP 2.0 Server State: UNKNOWN-terminated-->
+    <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
+        <name>Production Web Server MCP 21</name>
+        <description>Server to host our main web application.</description>
+        <operatingSystem id="WIN2008S32" displayName="WIN2008S/32" family="WINDOWS" />
+        <cpu count="2" speed="STANDARD" coresPerSocket="1" />
+        <memoryGb>4</memoryGb>
+        <disk id="c2e1f199-116e-4dbc-9960-68720b832b0a" scsiId="0" sizeGb="50" speed="STANDARD" state="NORMAL" />
+        <networkInfo networkDomainId="553f26b6-2a73-42c3-a78b-6116f11291d0">
+            <primaryNic id="5e869800-df7b-4626-bcbf-8643b8be11fd" privateIpv4="10.0.4.8" ipv6="2607:f480:1111:1282:2960:fb72:7154:6160" vlanId="bc529e20-dc6f-42ba-be20-0ffe44d1993f" vlanName="Production VLAN" state="NORMAL" />
+        </networkInfo>
+        <backup assetId="91002e08-8dc1-47a1-ad33-04f501c06f87" servicePlan="Advanced" state="NORMAL" />
+        <monitoring monitoringId="11039" servicePlan="ESSENTIALS" state="NORMAL" />
+        <softwareLabel>MSSQL2008R2S</softwareLabel>
+        <sourceImageId>3ebf3c0f-90fe-4a8b-8585-6e65b316592c</sourceImageId>
+        <createTime>2015-12-02T10:31:33.000Z</createTime>
+        <deployed>true</deployed>
+        <started>false</started>
+        <state>UNKNOWN</state>
+        <progress>
+            <action>SHUTDOWN_SERVER</action>
+            <requestTime>2015-12-02T11:07:40.000Z</requestTime>
+            <userName>devuser1</userName>
+        </progress>
+        <vmwareTools versionStatus="CURRENT" runningStatus="RUNNING" apiVersion="9354" />
+        <virtualHardware version="vmx-08" upToDate="false" />
+    </server>
+    <!-- MCP 2.0 Server State: STOPPED-->
+    <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
+        <name>Production Web Server MCP 2</name>
+        <description>Server to host our main web application.</description>
+        <operatingSystem id="WIN2008S32" displayName="WIN2008S/32" family="WINDOWS" />
+        <cpu count="2" speed="STANDARD" coresPerSocket="1" />
+        <memoryGb>4</memoryGb>
+        <disk id="c2e1f199-116e-4dbc-9960-68720b832b0a" scsiId="0" sizeGb="50" speed="STANDARD" state="NORMAL" />
+        <networkInfo networkDomainId="553f26b6-2a73-42c3-a78b-6116f11291d0">
+            <primaryNic id="5e869800-df7b-4626-bcbf-8643b8be11fd" privateIpv4="10.0.4.8" ipv6="2607:f480:1111:1282:2960:fb72:7154:6160" vlanId="bc529e20-dc6f-42ba-be20-0ffe44d1993f" vlanName="Production VLAN" state="NORMAL" />
+        </networkInfo>
+        <backup assetId="91002e08-8dc1-47a1-ad33-04f501c06f87" servicePlan="Advanced" state="NORMAL" />
+        <monitoring monitoringId="11039" servicePlan="ESSENTIALS" state="NORMAL" />
+        <softwareLabel>MSSQL2008R2S</softwareLabel>
+        <sourceImageId>3ebf3c0f-90fe-4a8b-8585-6e65b316592c</sourceImageId>
+        <createTime>2015-12-02T10:31:33.000Z</createTime>
+        <deployed>true</deployed>
+        <started>false</started>
+        <state>NORMAL</state>
+        <vmwareTools versionStatus="CURRENT" runningStatus="RUNNING" apiVersion="9354" />
+        <virtualHardware version="vmx-08" upToDate="false" />
+    </server>
 </servers>

http://git-wip-us.apache.org/repos/asf/libcloud/blob/d44fd923/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 3bb0210..2443ea5 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -61,12 +61,22 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
     def test_list_nodes_response(self):
         DimensionDataMockHttp.type = None
         ret = self.driver.list_nodes()
-        self.assertEqual(len(ret), 2)
+        self.assertEqual(len(ret), 6)
+
+    def test_server_states(self):
+        DimensionDataMockHttp.type = None
+        ret = self.driver.list_nodes()
+        self.assertTrue(ret[0].state == 'running')
+        self.assertTrue(ret[1].state == 'stopping')
+        self.assertTrue(ret[2].state == 'reconfiguring')
+        self.assertTrue(ret[3].state == 'running')
+        self.assertTrue(ret[4].state == 'terminated')
+        self.assertTrue(ret[5].state == 'stopped')
 
     def test_list_nodes_response_PAGINATED(self):
         DimensionDataMockHttp.type = 'PAGINATED'
         ret = self.driver.list_nodes()
-        self.assertEqual(len(ret), 4)
+        self.assertEqual(len(ret), 8)
 
     # We're making sure here the filters make it to the URL
     # See _caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_ALLFILTERS for asserts


[03/19] libcloud git commit: Modify representation for some objects

Posted by an...@apache.org.
Modify representation for some objects


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

Branch: refs/heads/trunk
Commit: 5a0f8c95e253025229f2ed1e8e80ea4c4f142d60
Parents: 4a0ff85
Author: Ming Sheng <mi...@gmail.com>
Authored: Thu Dec 31 19:50:23 2015 +0800
Committer: Ming Sheng <mi...@gmail.com>
Committed: Thu Dec 31 19:50:23 2015 +0800

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5a0f8c95/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 573afe3..58311d4 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -419,10 +419,14 @@ class DimensionDataFirewallRule(object):
         self.enabled = enabled
 
     def __repr__(self):
-        return (('<DimensionDataNetworkDomain: id=%s, name=%s, '
-                 'action=%s, location=%s, status=%s>')
+        return (('<DimensionDataFirewallRule: id=%s, name=%s, '
+                 'action=%s, location=%s, network_domain=%s, '
+                 'status=%s, ip_version=%s, protocol=%s, source=%s, '
+                 'destination=%s, enabled=%s>')
                 % (self.id, self.name, self.action, self.location,
-                   self.status))
+                   self.network_domain, self.status, self.ip_version,
+                   self.protocol, self.source, self.destination,
+                   self.enabled))
 
 
 class DimensionDataFirewallAddress(object):
@@ -611,7 +615,7 @@ class DimensionDataPoolMember(object):
         self.node_id = node_id
 
     def __repr__(self):
-        return (('<DimensionDataPool: id=%s, name=%s, '
+        return (('<DimensionDataPoolMember: id=%s, name=%s, '
                  'ip=%s, status=%s, port=%s, node_id=%s>')
                 % (self.id, self.name,
                    self.ip, self.status, self.port,
@@ -683,7 +687,7 @@ class DimensionDataVirtualListener(object):
         self.ip = ip
 
     def __repr__(self):
-        return (('<DimensionDataPool: id=%s, name=%s, '
+        return (('<DimensionDataVirtualListener: id=%s, name=%s, '
                  'status=%s, ip=%s>')
                 % (self.id, self.name,
                    self.status, self.ip))


[18/19] libcloud git commit: whitespace

Posted by an...@apache.org.
whitespace


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

Branch: refs/heads/trunk
Commit: 6cf6b12dd3ed44b7bd149b75292df3263c5f868b
Parents: 9790736
Author: anthony-shaw <an...@gmail.com>
Authored: Mon Feb 29 15:04:31 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Feb 29 15:04:31 2016 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6cf6b12d/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index cfb91bb..ba748d9 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -482,7 +482,7 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
     def test_ex_create_firewall_rule_with_specific_source_ip(self):
         net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')
         rules = self.driver.ex_list_firewall_rules(net)
-        specific_source_ip_rule = list(filter(lambda x: x.name == 'SpecificSourceIP', 
+        specific_source_ip_rule = list(filter(lambda x: x.name == 'SpecificSourceIP',
                                               rules))[0]
         rule = self.driver.ex_create_firewall_rule(net, specific_source_ip_rule, 'FIRST')
         self.assertEqual(rule.id, 'd0a20f59-77b9-4f28-a63b-e58496b73a6c')


[12/19] libcloud git commit: Adding some MCP1.0 love Fixing bug in wait_for_state exception Closes #709

Posted by an...@apache.org.
Adding some MCP1.0 love Fixing bug in wait_for_state exception
Closes #709


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

Branch: refs/heads/trunk
Commit: 579c1bf2a675566991cbbc1080a619600d683c23
Parents: b693e9f
Author: Jeffrey Dunham <je...@gmail.com>
Authored: Sat Feb 20 01:10:03 2016 -0500
Committer: anthony-shaw <an...@gmail.com>
Committed: Sun Feb 28 16:19:01 2016 +1100

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py                | 12 ++++----
 libcloud/compute/drivers/dimensiondata.py       | 29 ++++++++++++++------
 ...745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml | 26 +++++++++++++++++-
 libcloud/test/compute/test_dimensiondata.py     | 28 +++++++++++++------
 4 files changed, 72 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/579c1bf2/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 469f933..ca0b57f 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -458,17 +458,19 @@ class DimensionDataConnection(ConnectionUserAndKey):
         while cnt < timeout / poll_interval:
             result = func(*args, **kwargs)
             if isinstance(result, Node):
-                if result.state is state:
-                    return result
-            elif result.status is state or result.status in state:
+                object_state = result.state
+            else:
+                object_state = result.status
+
+            if object_state is state or object_state in state:
                 return result
             sleep(poll_interval)
             cnt += 1
 
         msg = 'Status check for object %s timed out' % (result)
-        raise DimensionDataAPIException(code=result.status,
+        raise DimensionDataAPIException(code=object_state,
                                         msg=msg,
-                                        driver=self.connection.driver)
+                                        driver=self.driver)
 
     def _get_orgId(self):
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/579c1bf2/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 268798f..1561c78 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -46,15 +46,26 @@ from libcloud.compute.types import NodeState, Provider
 # These tuples represent:
 # (<state_of_node_from_didata>, <is node started?>, <action happening>)
 NODE_STATE_MAP = {
-    ('NORMAL', 'true', None): NodeState.RUNNING,
-    ('NORMAL', 'false', None): NodeState.STOPPED,
-    ('PENDING_CHANGE', 'true', 'START_SERVER'): NodeState.STARTING,
-    ('PENDING_ADD', 'true', 'DEPLOY_SERVER'): NodeState.STARTING,
-    ('PENDING_CHANGE', 'true', 'SHUTDOWN_SERVER'): NodeState.STOPPING,
-    ('PENDING_CHANGE', 'true', 'REBOOT_SERVER'): NodeState.REBOOTING,
-    ('PENDING_CHANGE', 'true', 'RESET_SERVER'): NodeState.REBOOTING,
-    ('PENDING_CHANGE', 'true', 'RECONFIGURE_SERVER'): NodeState.RECONFIGURING,
-    ('PENDING_CHANGE', 'true', 'POWER_OFF_SERVER'): NodeState.STOPPING,
+    ('NORMAL', 'true', None):
+        NodeState.RUNNING,
+    ('NORMAL', 'false', None):
+        NodeState.STOPPED,
+    ('PENDING_CHANGE', 'true', 'START_SERVER'):
+        NodeState.STARTING,
+    ('PENDING_ADD', 'true', 'DEPLOY_SERVER'):
+        NodeState.STARTING,
+    ('PENDING_ADD', 'true', 'DEPLOY_SERVER_WITH_DISK_SPEED'):
+        NodeState.STARTING,
+    ('PENDING_CHANGE', 'true', 'SHUTDOWN_SERVER'):
+        NodeState.STOPPING,
+    ('PENDING_CHANGE', 'true', 'POWER_OFF_SERVER'):
+        NodeState.STOPPING,
+    ('PENDING_CHANGE', 'true', 'REBOOT_SERVER'):
+        NodeState.REBOOTING,
+    ('PENDING_CHANGE', 'true', 'RESET_SERVER'):
+        NodeState.REBOOTING,
+    ('PENDING_CHANGE', 'true', 'RECONFIGURE_SERVER'):
+        NodeState.RECONFIGURING,
 }
 
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/579c1bf2/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
index bc333d8..f134822 100644
--- a/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <servers xmlns="urn:didata.com:api:cloud:types" pageNumber="1" pageCount="2" totalCount="2" pageSize="250">
-    <!-- MCP 1.0 Server -->
+    <!-- MCP 1.0 Server State: RUNNING-->
     <server id="e75ead52-692f-4314-8725-c8a4f4d13a87" datacenterId="NA1">
         <name>Production Web Server MCP 1</name>
         <description>nopassword0</description>
@@ -19,6 +19,30 @@
         <vmwareTools versionStatus="NEED_UPGRADE" runningStatus="RUNNING" apiVersion="8389" />
         <virtualHardware version="vmx-08" upToDate="false" />
     </server>
+    <!-- MCP 1.0 Server State: STARTING-->
+    <server id="e75ead52-692f-4314-8725-c8a4f4d13a88" datacenterId="NA1">
+        <name>Production Web Server MCP 1</name>
+        <description>nopassword0</description>
+        <operatingSystem id="REDHAT632" displayName="REDHAT6/32" family="UNIX" />
+        <cpu count="4" speed="STANDARD" coresPerSocket="1" />
+        <memoryGb>2</memoryGb>
+        <disk id="74f81c56-96cc-4cca-b4d7-a88f641a6ea2" scsiId="0" sizeGb="10" speed="STANDARD" state="NORMAL" />
+        <nic id="43b24e9e-c1c9-4d53-965b-89bcaa725103" privateIpv4="10.160.117.25" networkId="c550be0e-65c1-11e4-811f-005056806999" networkName="Test1" state="NORMAL" />
+        <backup assetId="5579f3a7-4c32-4cf5-8a7e-b45c36a35c10" servicePlan="Enterprise" state="NORMAL" />
+        <monitoring monitoringId="11049" servicePlan="ESSENTIALS" state="NORMAL" />
+        <sourceImageId>e9ec6eb4-4634-49de-b914-01eb74da5fb9</sourceImageId>
+        <createTime>2015-08-11T16:51:05.000Z</createTime>
+        <deployed>true</deployed>
+        <started>true</started>
+        <state>PENDING_ADD</state>
+        <progress>
+            <action>DEPLOY_SERVER_WITH_DISK_SPEED</action>
+            <requestTime>2015-12-02T11:07:40.000Z</requestTime>
+            <userName>devuser1</userName>
+        </progress>
+        <vmwareTools versionStatus="NEED_UPGRADE" runningStatus="RUNNING" apiVersion="8389" />
+        <virtualHardware version="vmx-08" upToDate="false" />
+    </server>
     <!-- MCP 2.0 Server State: SHUTTING_DOWN-->
     <server id="5a32d6e4-9707-4813-a269-56ab4d989f4d" datacenterId="NA9">
         <name>Production Web Server MCP 2</name>

http://git-wip-us.apache.org/repos/asf/libcloud/blob/579c1bf2/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index bf0bb0c..b4c4ab3 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -61,22 +61,24 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
     def test_list_nodes_response(self):
         DimensionDataMockHttp.type = None
         ret = self.driver.list_nodes()
-        self.assertEqual(len(ret), 6)
+        self.assertEqual(len(ret), 7)
 
     def test_server_states(self):
         DimensionDataMockHttp.type = None
         ret = self.driver.list_nodes()
         self.assertTrue(ret[0].state == 'running')
-        self.assertTrue(ret[1].state == 'stopping')
-        self.assertTrue(ret[2].state == 'reconfiguring')
-        self.assertTrue(ret[3].state == 'running')
-        self.assertTrue(ret[4].state == 'terminated')
-        self.assertTrue(ret[5].state == 'stopped')
+        print(ret[1].state)
+        self.assertTrue(ret[1].state == 'starting')
+        self.assertTrue(ret[2].state == 'stopping')
+        self.assertTrue(ret[3].state == 'reconfiguring')
+        self.assertTrue(ret[4].state == 'running')
+        self.assertTrue(ret[5].state == 'terminated')
+        self.assertTrue(ret[6].state == 'stopped')
 
     def test_list_nodes_response_PAGINATED(self):
         DimensionDataMockHttp.type = 'PAGINATED'
         ret = self.driver.list_nodes()
-        self.assertEqual(len(ret), 8)
+        self.assertEqual(len(ret), 9)
 
     # We're making sure here the filters make it to the URL
     # See _caas_2_1_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_server_ALLFILTERS for asserts
@@ -398,11 +400,21 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
                                       self.driver.ex_get_vlan,
                                       vlan_id='0e56433f-d808-4669-821d-812769517ff8')
 
-    def test_ex_wait_for_state_node(self):
+    def test_ex_wait_for_state_NODE(self):
         self.driver.ex_wait_for_state('running',
                                       self.driver.ex_get_node_by_id,
                                       id='e75ead52-692f-4314-8725-c8a4f4d13a87')
 
+    def test_ex_wait_for_state_FAIL(self):
+        with self.assertRaises(DimensionDataAPIException) as context:
+            self.driver.ex_wait_for_state('starting',
+                                          self.driver.ex_get_node_by_id,
+                                          id='e75ead52-692f-4314-8725-c8a4f4d13a87',
+                                          timeout=2
+                                          )
+        self.assertEqual(context.exception.code, 'running')
+        self.assertTrue('timed out' in context.exception.msg)
+
     def test_ex_update_vlan(self):
         vlan = self.driver.ex_get_vlan('0e56433f-d808-4669-821d-812769517ff8')
         vlan.name = 'new name'


[05/19] libcloud git commit: added port and listenerIpAddress options for ex_create_pool_member and ex_create_virtual_listener

Posted by an...@apache.org.
added port and listenerIpAddress options for ex_create_pool_member and ex_create_virtual_listener


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

Branch: refs/heads/trunk
Commit: d93b655d0de93f48a867a2b5a42e410480de6b4a
Parents: 60b5661
Author: Munkiat <ko...@gmail.com>
Authored: Sun Jan 3 18:25:33 2016 +0800
Committer: Munkiat <ko...@gmail.com>
Committed: Sun Jan 3 18:25:33 2016 +0800

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/dimensiondata.py | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d93b655d/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py
index 337997d..7c26ffc 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -321,7 +321,7 @@ class DimensionDataLBDriver(Driver):
         """
         return self.network_domain_id
 
-    def ex_create_pool_member(self, pool, node, port):
+    def ex_create_pool_member(self, pool, node, port=None):
         """
         Create a new member in an existing pool from an existing node
 
@@ -341,6 +341,8 @@ class DimensionDataLBDriver(Driver):
         ET.SubElement(create_pool_m, "poolId").text = pool.id
         ET.SubElement(create_pool_m, "nodeId").text = node.id
         ET.SubElement(create_pool_m, "status").text = 'ENABLED'
+        if port is not None:
+            ET.SubElement(create_pool_m, "port").text = str(port)
 
         response = self.connection.request_with_orgId_api_2(
             'networkDomainVip/addPoolMember',
@@ -383,7 +385,7 @@ class DimensionDataLBDriver(Driver):
         :param ip: IPv4 address of the node (required)
         :type  ip: ``str``
 
-        :param ex_description: Description of the node
+        :param ex_description: Description of the node (required)
         :type  ex_description: ``str``
 
         :param connection_limit: Maximum number
@@ -493,7 +495,7 @@ class DimensionDataLBDriver(Driver):
         :param balancer_method: The load balancer algorithm (required)
         :type  balancer_method: ``str``
 
-        :param ex_description: Description of the node
+        :param ex_description: Description of the node (required)
         :type  ex_description: ``str``
 
         :param health_monitors: A list of health monitors to use for the pool.
@@ -558,6 +560,7 @@ class DimensionDataLBDriver(Driver):
                                    ex_description,
                                    port,
                                    pool,
+                                   listenerIpAddress=None,
                                    persistence_profile=None,
                                    fallback_persistence_profile=None,
                                    irule=None,
@@ -574,15 +577,18 @@ class DimensionDataLBDriver(Driver):
         :param name: name of the listener (required)
         :type  name: ``str``
 
-        :param ex_description: Description of the node
+        :param ex_description: Description of the node (required)
         :type  ex_description: ``str``
 
-        :param port: Description of the node
+        :param port: Description of the node (required)
         :type  port: ``str``
 
         :param pool: The pool to use for the listener
         :type  pool: :class:`DimensionDataPool`
 
+        :param listenerIpAddress: The IPv4 Address of the virtual listener
+        :type listenerIpaddress: ``str``
+
         :param persistence_profile: Persistence profile
         :type  persistence_profile: :class:`DimensionDataPersistenceProfile`
 
@@ -627,6 +633,9 @@ class DimensionDataLBDriver(Driver):
         ET.SubElement(create_node_elm, "type").text = listener_type
         ET.SubElement(create_node_elm, "protocol") \
             .text = protocol
+        if listenerIpAddress is not None:
+            ET.SubElement(create_node_elm, "listenerIpAddress").text = \
+                .text = str(listenerIpAddress)
         ET.SubElement(create_node_elm, "port").text = str(port)
         ET.SubElement(create_node_elm, "enabled").text = 'true'
         ET.SubElement(create_node_elm, "connectionLimit") \


[14/19] libcloud git commit: Merge pull request #9 from DimensionDataCBUSydney/fix-create-firewall-rule

Posted by an...@apache.org.
Merge pull request #9 from DimensionDataCBUSydney/fix-create-firewall-rule

Fix to create a firewall rule with the specific source IP

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

Branch: refs/heads/trunk
Commit: fbc90e00c3e4416cb0c4df3a7bd4a785d86c1d02
Parents: 6d9e820 f254354
Author: Anthony Shaw <an...@gmail.com>
Authored: Mon Feb 29 13:35:56 2016 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Mon Feb 29 13:35:56 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py          |  3 ++-
 ...4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml | 17 ++++++++++++++++-
 libcloud/test/compute/test_dimensiondata.py        | 11 ++++++++++-
 3 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[11/19] libcloud git commit: DimensionData: Fixing wait_for_state for node objects

Posted by an...@apache.org.
DimensionData: Fixing wait_for_state for node objects


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

Branch: refs/heads/trunk
Commit: b693e9f51f50fc109b7737517abb400af11690b4
Parents: d44fd92
Author: Jeffrey Dunham <je...@gmail.com>
Authored: Fri Feb 19 22:18:19 2016 -0500
Committer: anthony-shaw <an...@gmail.com>
Committed: Sun Feb 28 16:18:56 2016 +1100

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py            | 10 +++++++---
 libcloud/test/compute/test_dimensiondata.py |  5 +++++
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b693e9f5/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 030c7a2..469f933 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -21,6 +21,7 @@ from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import b
 from libcloud.common.base import ConnectionUserAndKey, XmlResponse
 from libcloud.common.types import LibcloudError, InvalidCredsError
+from libcloud.compute.base import Node
 from libcloud.utils.xml import findtext
 
 # Roadmap / TODO:
@@ -426,8 +427,8 @@ class DimensionDataConnection(ConnectionUserAndKey):
     def wait_for_state(self, state, func, poll_interval=2, timeout=60, *args,
                        **kwargs):
         """
-        Wait for the function which returns a instance with field status to
-        match.
+        Wait for the function which returns a instance with field status/state
+        to match.
 
         Keep polling func until one of the desired states is matched
 
@@ -456,7 +457,10 @@ class DimensionDataConnection(ConnectionUserAndKey):
         cnt = 0
         while cnt < timeout / poll_interval:
             result = func(*args, **kwargs)
-            if result.status is state or result.status in state:
+            if isinstance(result, Node):
+                if result.state is state:
+                    return result
+            elif result.status is state or result.status in state:
                 return result
             sleep(poll_interval)
             cnt += 1

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b693e9f5/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 2443ea5..bf0bb0c 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -398,6 +398,11 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
                                       self.driver.ex_get_vlan,
                                       vlan_id='0e56433f-d808-4669-821d-812769517ff8')
 
+    def test_ex_wait_for_state_node(self):
+        self.driver.ex_wait_for_state('running',
+                                      self.driver.ex_get_node_by_id,
+                                      id='e75ead52-692f-4314-8725-c8a4f4d13a87')
+
     def test_ex_update_vlan(self):
         vlan = self.driver.ex_get_vlan('0e56433f-d808-4669-821d-812769517ff8')
         vlan.name = 'new name'


[06/19] libcloud git commit: fixed line wrap for listenerIpAddress

Posted by an...@apache.org.
fixed line wrap for listenerIpAddress


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

Branch: refs/heads/trunk
Commit: 24017e4cded6d4450921dff571b8d840584ce74e
Parents: d93b655
Author: Munkiat <ko...@gmail.com>
Authored: Mon Jan 4 15:53:13 2016 +0800
Committer: Munkiat <ko...@gmail.com>
Committed: Mon Jan 4 15:53:13 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/24017e4c/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py
index 7c26ffc..ba08589 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -635,7 +635,7 @@ class DimensionDataLBDriver(Driver):
             .text = protocol
         if listenerIpAddress is not None:
             ET.SubElement(create_node_elm, "listenerIpAddress").text = \
-                .text = str(listenerIpAddress)
+                str(listenerIpAddress)
         ET.SubElement(create_node_elm, "port").text = str(port)
         ET.SubElement(create_node_elm, "enabled").text = 'true'
         ET.SubElement(create_node_elm, "connectionLimit") \


[08/19] libcloud git commit: Merge branch 'trunk' of https://github.com/DimensionDataCBUSydney/libcloud into trunk

Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/DimensionDataCBUSydney/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/8c64e174
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8c64e174
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8c64e174

Branch: refs/heads/trunk
Commit: 8c64e1741b2baab9d36e88cffdcaa43503412e11
Parents: 67cd0a7 ae76290
Author: anthony-shaw <an...@gmail.com>
Authored: Thu Feb 18 13:15:46 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Thu Feb 18 13:15:46 2016 +1100

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/dimensiondata.py | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8c64e174/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------


[15/19] libcloud git commit: Merge branch 'trunk' of https://github.com/DimensionDataCBUSydney/libcloud into trunk

Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/DimensionDataCBUSydney/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/0b7ee8cf
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0b7ee8cf
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0b7ee8cf

Branch: refs/heads/trunk
Commit: 0b7ee8cfc42f4ac855c187964d840675d94c9d9a
Parents: 579c1bf fbc90e0
Author: anthony-shaw <an...@gmail.com>
Authored: Mon Feb 29 13:42:04 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Feb 29 13:42:04 2016 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py          |  3 ++-
 ...4d8a_9cbc_8dabe5a7d0e4_network_firewallRule.xml | 17 ++++++++++++++++-
 libcloud/test/compute/test_dimensiondata.py        | 11 ++++++++++-
 3 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0b7ee8cf/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0b7ee8cf/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------


[19/19] 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/5b2a26c0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5b2a26c0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5b2a26c0

Branch: refs/heads/trunk
Commit: 5b2a26c0aae2ac0edf16a8ac5bd1ce47c278fefc
Parents: 6cf6b12 02fa4f6
Author: anthony-shaw <an...@gmail.com>
Authored: Mon Feb 29 15:11:40 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Feb 29 15:11:40 2016 +1100

----------------------------------------------------------------------
 CHANGES.rst                                |  23 +++++
 doap_libcloud.rdf                          |   9 +-
 libcloud/common/base.py                    |  19 ++++
 libcloud/compute/drivers/gce.py            |  25 +++--
 libcloud/compute/drivers/vcloud.py         |   9 +-
 libcloud/dns/drivers/godaddy.py            |   9 +-
 libcloud/httplib_ssl.py                    |   2 +
 libcloud/storage/drivers/backblaze_b2.py   | 131 ++++++++++++++++++------
 libcloud/test/compute/test_gce.py          |  10 +-
 libcloud/test/compute/test_ssh_client.py   |   4 +-
 libcloud/test/storage/test_backblaze_b2.py |  25 +++++
 libcloud/test/test_httplib_ssl.py          |  10 ++
 libcloud/utils/escape.py                   |  22 ++++
 libcloud/utils/py3.py                      |  11 +-
 14 files changed, 254 insertions(+), 55 deletions(-)
----------------------------------------------------------------------



[04/19] libcloud git commit: Merge pull request #7 from DimensionData-AP-COE/trunk

Posted by an...@apache.org.
Merge pull request #7 from DimensionData-AP-COE/trunk

Allow list firewall to accept network domain id and pageSize pageNumber as params

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

Branch: refs/heads/trunk
Commit: c18afd79fa3f4a5664b0332f53e851f5ef7ec4ba
Parents: 60b5661 5a0f8c9
Author: Anthony Shaw <an...@gmail.com>
Authored: Sat Jan 2 07:33:43 2016 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Sat Jan 2 07:33:43 2016 +1100

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py          | 20 ++++++++++++--------
 libcloud/compute/drivers/dimensiondata.py | 10 +++++++---
 2 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------



[17/19] libcloud git commit: whitespace fix

Posted by an...@apache.org.
whitespace fix


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

Branch: refs/heads/trunk
Commit: 9790736bce6a4bfc00b970738d44ebb428720d5f
Parents: aa71925
Author: anthony-shaw <an...@gmail.com>
Authored: Mon Feb 29 15:00:06 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Feb 29 15:00:06 2016 +1100

----------------------------------------------------------------------
 libcloud/test/compute/test_dimensiondata.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9790736b/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 28f2f8c..cfb91bb 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -33,7 +33,6 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 from libcloud.test.secrets import DIMENSIONDATA_PARAMS
 
 
-
 class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
@@ -476,15 +475,15 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def test_ex_create_firewall_rule(self):
         net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')
-        rules = self.driver.ex_list_firewall_rules(net)        
+        rules = self.driver.ex_list_firewall_rules(net)
         rule = self.driver.ex_create_firewall_rule(net, rules[0], 'FIRST')
         self.assertEqual(rule.id, 'd0a20f59-77b9-4f28-a63b-e58496b73a6c')
-        
+
     def test_ex_create_firewall_rule_with_specific_source_ip(self):
         net = self.driver.ex_get_network_domain('8cdfd607-f429-4df6-9352-162cfc0891be')
         rules = self.driver.ex_list_firewall_rules(net)
         specific_source_ip_rule = list(filter(lambda x: x.name == 'SpecificSourceIP', 
-                                              rules))[0]        
+                                              rules))[0]
         rule = self.driver.ex_create_firewall_rule(net, specific_source_ip_rule, 'FIRST')
         self.assertEqual(rule.id, 'd0a20f59-77b9-4f28-a63b-e58496b73a6c')
 


[16/19] libcloud git commit: Fix trailing whitespace

Posted by an...@apache.org.
Fix trailing whitespace


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

Branch: refs/heads/trunk
Commit: aa7192575646c54a89caa020e3a4390bf8f6dead
Parents: 0b7ee8c
Author: anthony-shaw <an...@gmail.com>
Authored: Mon Feb 29 13:44:24 2016 +1100
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Feb 29 13:44:24 2016 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/aa719257/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 71a5568..938d07c 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -1161,7 +1161,7 @@ class DimensionDataNodeDriver(NodeDriver):
             source_ip.set('address', 'ANY')
         else:
             source_ip.set('address', rule.source.ip_address)
-            if rule.source.ip_prefix_size is not None:                
+            if rule.source.ip_prefix_size is not None:
                 source_ip.set('prefixSize', str(rule.source.ip_prefix_size))
             if rule.source.port_begin is not None:
                 source_port = ET.SubElement(source, 'port')


[02/19] libcloud git commit: Added line break

Posted by an...@apache.org.
Added line break


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

Branch: refs/heads/trunk
Commit: 4a0ff854629ef843c11c2758fbbf139b33c89ed0
Parents: 71063f6
Author: Ming Sheng <mi...@gmail.com>
Authored: Wed Dec 30 21:28:54 2015 +0800
Committer: Ming Sheng <mi...@gmail.com>
Committed: Wed Dec 30 21:28:54 2015 +0800

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a0ff854/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 8348ec7..cab39f5 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -929,7 +929,8 @@ class DimensionDataNodeDriver(NodeDriver):
             'server/server/%s' % id).object
         return self._to_node(node)
 
-    def ex_list_firewall_rules(self, network_domain, page_size=50, page_number=1):
+    def ex_list_firewall_rules(self, network_domain, page_size=50,
+                               page_number=1):
         params = {'pageSize': page_size, 'pageNumber': page_number}
         if isinstance(network_domain, str):
             params['networkDomainId'] = network_domain