From 9c36ad722bef072e8ffcd124c20c0240e87c632b Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Mon, 29 Jul 2013 14:36:59 +0530 Subject: [PATCH] CLOUDSTACK-3795: When listing the publicipaddress provide assocNtwkId PublicIpAddresses.list takes an associatednetworkid which lists all the public ip addresses in the deployment's physical network associated with the vnet. Various tests failed because of `networkid` used in place of `associatednetworkid` Signed-off-by: Prasanna Santhanam (cherry picked from commit b88fe8233af699786de6d08a6bc981546538898d) --- .../test_redundant_router_network_rules.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/integration/component/test_redundant_router_network_rules.py b/test/integration/component/test_redundant_router_network_rules.py index d89a29b1c91..f71954b599b 100644 --- a/test/integration/component/test_redundant_router_network_rules.py +++ b/test/integration/component/test_redundant_router_network_rules.py @@ -201,8 +201,8 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "ssh"]) - def test_applyNetworkRules_MasterDown_deleteNetworkRules(self): - """Test apply network rules when master & backup routers rebooted + def test_networkRules_afterRebootRouters(self): + """Test network rules after master & backup routers rebooted """ # Steps to validate @@ -360,7 +360,7 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): public_ips = PublicIPAddress.list( self.apiclient, - networkid=network.id, + associatednetworkid=network.id, listall=True, isstaticnat=True ) @@ -667,7 +667,7 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): public_ips = PublicIPAddress.list( self.apiclient, - networkid=network.id, + associatednetworkid=network.id, listall=True, isstaticnat=True ) @@ -1007,7 +1007,7 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): public_ips = PublicIPAddress.list( self.apiclient, - networkid=network.id, + associatednetworkid=network.id, listall=True, isstaticnat=True ) @@ -1117,7 +1117,7 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): self.fail("SSH to guest VM failed: %s" % e) return - @attr(tags=["advanced", "advancedns", "ssh"]) + @attr(tags=["advanced", "advancedns", "ssh", "needle"]) def test_applyNetworkRules_MasterDown_deleteNetworkRules(self): """Test apply network rules when master down and delete network rules """ @@ -1284,7 +1284,7 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): public_ips = PublicIPAddress.list( self.apiclient, - networkid=network.id, + associatednetworkid=network.id, listall=True, isstaticnat=True ) @@ -1294,10 +1294,11 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase): "List public Ip for network should list the Ip addr" ) self.assertEqual( - public_ips[0].ipaddress, - public_ip.ipaddress.ipaddress, - "List public Ip for network should list the Ip addr" - ) + public_ips[0].ipaddress, + public_ip.ipaddress.ipaddress, + "Public Ip Address in the network created (%s) and listed (%s) do not match" % ( + public_ips[0].ipaddress, public_ip.ipaddress.ipaddress) + ) self.debug("creating a FW rule on IP: %s" % public_ip.ipaddress.ipaddress)