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 <tsp@apache.org>
(cherry picked from commit b88fe8233af699786de6d08a6bc981546538898d)
This commit is contained in:
Prasanna Santhanam 2013-07-29 14:36:59 +05:30
parent 26d8c668f9
commit 9c36ad722b

View File

@ -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)