Fix lint error
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/fc9c3960 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/fc9c3960 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/fc9c3960 Branch: refs/heads/trunk Commit: fc9c3960c173f3ed7fcabcac1e7b0c6d5ffed6cd Parents: 81829b4 Author: Samuel Chong <[email protected]> Authored: Thu Oct 13 11:37:42 2016 +1100 Committer: Samuel Chong <[email protected]> Committed: Thu Oct 13 11:37:42 2016 +1100 ---------------------------------------------------------------------- libcloud/compute/drivers/dimensiondata.py | 7 ++++--- libcloud/test/compute/test_dimensiondata.py | 24 ++---------------------- 2 files changed, 6 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/fc9c3960/libcloud/compute/drivers/dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py index 7cb197f..0381fb5 100644 --- a/libcloud/compute/drivers/dimensiondata.py +++ b/libcloud/compute/drivers/dimensiondata.py @@ -298,7 +298,8 @@ class DimensionDataNodeDriver(NodeDriver): >>> images = driver.list_images(location=location) >>> image = images[0] >>> - >>> node = driver.create_node(name='test_blah_2', image=image, auth=root_pw, + >>> node = driver.create_node(name='test_blah_2', image=image, + >>> auth=root_pw, >>> ex_description='test3 node', >>> ex_network=my_network, >>> ex_is_started=False) @@ -603,13 +604,13 @@ class DimensionDataNodeDriver(NodeDriver): 'additionalNic') if (nic.private_ip_v4 is None and - nic.vlan is None): + nic.vlan is None): raise ValueError("Either a vlan or private_ip_v4 " "must be specified for each " "additional nic.") if (nic.private_ip_v4 is not None and - nic.vlan is not None): + nic.vlan is not None): raise ValueError("Either a vlan or private_ip_v4 " "must be specified for each " "additional nic. Not both.") http://git-wip-us.apache.org/repos/asf/libcloud/blob/fc9c3960/libcloud/test/compute/test_dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py index d6376a4..d6bf345 100644 --- a/libcloud/test/compute/test_dimensiondata.py +++ b/libcloud/test/compute/test_dimensiondata.py @@ -236,16 +236,6 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): self.assertEqual(images[0].extra['cpu'].cpu_count, 4) self.assertEqual(images[0].extra['OS_displayName'], 'REDHAT6/64') - def test_create_node_response(self): - rootPw = NodeAuthPassword('pass123') - image = self.driver.list_images()[0] - network = self.driver.ex_list_networks()[0] - node = self.driver.create_node(name='test2', image=image, auth=rootPw, - ex_description='test2 node', ex_network=network, - ex_is_started=False) - self.assertEqual(node.id, 'e75ead52-692f-4314-8725-c8a4f4d13a87') - self.assertEqual(node.extra['status'].action, 'DEPLOY_SERVER') - def test_create_mcp1_node_optional_param(self): root_pw = NodeAuthPassword('pass123') image = self.driver.list_images()[0] @@ -271,7 +261,8 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): image = self.driver.list_images()[0] network = self.driver.ex_list_networks()[0] node = self.driver.create_node(name='test2', image=image, auth=None, - ex_description='test2 node', ex_network=network, + ex_description='test2 node', + ex_network=network, ex_is_started=False) self.assertEqual(node.id, 'e75ead52-692f-4314-8725-c8a4f4d13a87') self.assertEqual(node.extra['status'].action, 'DEPLOY_SERVER') @@ -646,17 +637,6 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin): self.assertEqual(node.id, 'e75ead52-692f-4314-8725-c8a4f4d13a87') self.assertEqual(node.extra['status'].action, 'DEPLOY_SERVER') - def test_create_node_network_domain_no_vlan_no_ipv4_fail(self): - rootPw = NodeAuthPassword('pass123') - image = self.driver.list_images()[0] - with self.assertRaises(ValueError): - self.driver.create_node(name='test2', - image=image, - auth=rootPw, - ex_description='test2 node', - ex_network_domain='fake_network_domain', - ex_is_started=False) - def test_create_node_bad_additional_nics_ipv4(self): rootPw = NodeAuthPassword('pass123') image = self.driver.list_images()[0]
