fix syntax error of list. Using square bracket instead of curly braces
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a32546f9 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a32546f9 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a32546f9 Branch: refs/heads/trunk Commit: a32546f94ba3e8e4e8f505617a8826b2a5fc63d8 Parents: 9e3c7da Author: Samuel Chong <samuelcho...@gmail.com> Authored: Mon Oct 10 10:31:14 2016 +1100 Committer: Samuel Chong <samuelcho...@gmail.com> Committed: Mon Oct 10 10:31:14 2016 +1100 ---------------------------------------------------------------------- libcloud/compute/drivers/dimensiondata.py | 10 ++++---- libcloud/test/compute/test_dimensiondata.py | 30 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/a32546f9/libcloud/compute/drivers/dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py index 08343ad..8900086 100644 --- a/libcloud/compute/drivers/dimensiondata.py +++ b/libcloud/compute/drivers/dimensiondata.py @@ -1489,7 +1489,7 @@ class DimensionDataNodeDriver(NodeDriver): >>> # Get dimension data driver >>> libcloud.security.VERIFY_SSL_CERT = True >>> cls = get_driver(Provider.DIMENSIONDATA) - >>> # driver = cls('myusername','mypassword', region='dd-au') + >>> driver = cls('myusername','mypassword', region='dd-au') >>> >>> # Get location >>> location = driver.ex_get_location_by_id(id='AU9') @@ -2650,7 +2650,7 @@ class DimensionDataNodeDriver(NodeDriver): end='190.2.2.108') >>> ipAddress_3 = DimensionDataIpAddress(begin='190.2.2.0', prefix_size='24') - >>> ip_address_collection = {ipAddress_1, ipAddress_2, ipAddress_3} + >>> ip_address_collection = [ipAddress_1, ipAddress_2, ipAddress_3] >>> >>> # Create IPAddressList >>> result = driver.ex_create_ip_address_list( @@ -2774,7 +2774,7 @@ class DimensionDataNodeDriver(NodeDriver): >>> end='190.2.2.108') >>> ipAddress_3 = DimensionDataIpAddress( >>> begin='190.2.2.0', prefix_size='24') - >>> ip_address_collection = {ipAddress_1, ipAddress_2, ipAddress_3} + >>> ip_address_collection = [ipAddress_1, ipAddress_2, ipAddress_3] >>> >>> # Edit IP Address List >>> ip_address_list_id = '5e7c323f-c885-4e4b-9a27-94c44217dbd3' @@ -2993,7 +2993,7 @@ class DimensionDataNodeDriver(NodeDriver): >>> # Port Collection >>> port_1 = DimensionDataPort(begin='1000') >>> port_2 = DimensionDataPort(begin='1001', end='1003') - >>> port_collection = {port_1, port_2} + >>> port_collection = [port_1, port_2] >>> >>> # Create Port List >>> new_portlist = driver.ex_create_portlist( @@ -3087,7 +3087,7 @@ class DimensionDataNodeDriver(NodeDriver): >>> # Port Collection >>> port_1 = DimensionDataPort(begin='4200') >>> port_2 = DimensionDataPort(begin='4201', end='4210') - >>> port_collection = {port_1, port_2} + >>> port_collection = [port_1, port_2] >>> >>> # Edit Port List >>> editPortlist = driver.ex_get_portlist( http://git-wip-us.apache.org/repos/asf/libcloud/blob/a32546f9/libcloud/test/compute/test_dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py index 941784e..36e9a63 100644 --- a/libcloud/test/compute/test_dimensiondata.py +++ b/libcloud/test/compute/test_dimensiondata.py @@ -1438,8 +1438,8 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): end='190.2.2.108') ip_address_3 = DimensionDataIpAddress(begin='190.2.2.0', prefix_size='24') - ip_address_collection = {ip_address_1, ip_address_2, - ip_address_3} + ip_address_collection = [ip_address_1, ip_address_2, + ip_address_3] # Create IP Address List success = self.driver.ex_create_ip_address_list( @@ -1461,8 +1461,8 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): end='190.2.2.108') ip_address_3 = DimensionDataIpAddress(begin='190.2.2.0', prefix_size='24') - ip_address_collection = {ip_address_1, ip_address_2, - ip_address_3} + ip_address_collection = [ip_address_1, ip_address_2, + ip_address_3] # Create IP Address List success = self.driver.ex_create_ip_address_list( @@ -1475,7 +1475,7 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): def test_ex_edit_ip_address_list(self): ip_address_1 = DimensionDataIpAddress(begin='190.2.2.111') - ip_address_collection = {ip_address_1} + ip_address_collection = [ip_address_1] child_ip_address_list = DimensionDataChildIpAddressList( id='2221ef78-4059-4bc1-b433-3f6ad698dc41', @@ -1502,7 +1502,7 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): def test_ex_edit_ip_address_list_STR(self): ip_address_1 = DimensionDataIpAddress(begin='190.2.2.111') - ip_address_collection = {ip_address_1} + ip_address_collection = [ip_address_1] child_ip_address_list = DimensionDataChildIpAddressList( id='2221ef78-4059-4bc1-b433-3f6ad698dc41', @@ -1615,7 +1615,7 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): port_1 = DimensionDataPort(begin='8080') port_2 = DimensionDataIpAddress(begin='8899', end='9023') - port_collection = {port_1, port_2} + port_collection = [port_1, port_2] # Create IP Address List success = self.driver.ex_create_portlist( @@ -1635,13 +1635,13 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): port_1 = DimensionDataPort(begin='8080') port_2 = DimensionDataIpAddress(begin='8899', end='9023') - port_collection = {port_1, port_2} + port_collection = [port_1, port_2] child_port_1 = DimensionDataChildPortList( id="333174a2-ae74-4658-9e56-50fc90e086cf", name='test port 1') child_port_2 = DimensionDataChildPortList( id="311174a2-ae74-4658-9e56-50fc90e04444", name='test port 2') - child_ports = {child_port_1, child_port_2} + child_ports = [child_port_1, child_port_2] # Create IP Address List success = self.driver.ex_create_portlist( @@ -1662,13 +1662,13 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): port_1 = DimensionDataPort(begin='8080') port_2 = DimensionDataIpAddress(begin='8899', end='9023') - port_collection = {port_1, port_2} + port_collection = [port_1, port_2] child_port_1 = DimensionDataChildPortList( id="333174a2-ae74-4658-9e56-50fc90e086cf", name='test port 1') child_port_2 = DimensionDataChildPortList( id="311174a2-ae74-4658-9e56-50fc90e04444", name='test port 2') - child_ports_ids = {child_port_1.id, child_port_2.id} + child_ports_ids = [child_port_1.id, child_port_2.id] # Create IP Address List success = self.driver.ex_create_portlist( @@ -1689,13 +1689,13 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): port_1 = DimensionDataPort(begin='8080') port_2 = DimensionDataIpAddress(begin='8899', end='9023') - port_collection = {port_1, port_2} + port_collection = [port_1, port_2] child_port_1 = DimensionDataChildPortList( id="333174a2-ae74-4658-9e56-50fc90e086cf", name='test port 1') child_port_2 = DimensionDataChildPortList( id="311174a2-ae74-4658-9e56-50fc90e04444", name='test port 2') - child_ports = {child_port_1.id, child_port_2.id} + child_ports = [child_port_1.id, child_port_2.id] # Create IP Address List success = self.driver.ex_edit_portlist( @@ -1713,13 +1713,13 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): port_1 = DimensionDataPort(begin='8080') port_2 = DimensionDataIpAddress(begin='8899', end='9023') - port_collection = {port_1, port_2} + port_collection = [port_1, port_2] child_port_1 = DimensionDataChildPortList( id="333174a2-ae74-4658-9e56-50fc90e086cf", name='test port 1') child_port_2 = DimensionDataChildPortList( id="311174a2-ae74-4658-9e56-50fc90e04444", name='test port 2') - child_ports_ids = {child_port_1.id, child_port_2.id} + child_ports_ids = [child_port_1.id, child_port_2.id] # Create IP Address List success = self.driver.ex_edit_portlist(