Updated Branches: refs/heads/4.2 de448ec47 -> 527f03722
CLOUDSTACK-4996: Resolved gateway accessibility issue Gateway of isolated network is pinged instead of shared network Signed-off-by: Girish Shilamkar <gir...@clogeny.com> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/527f0372 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/527f0372 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/527f0372 Branch: refs/heads/4.2 Commit: 527f03722f1ecc33db6936b096760df85c2f0057 Parents: de448ec Author: Ashutosh K <ashut...@clogeny.com> Authored: Thu Nov 7 16:00:43 2013 +0530 Committer: Girish Shilamkar <gir...@clogeny.com> Committed: Thu Nov 7 16:01:41 2013 +0530 ---------------------------------------------------------------------- .../component/test_vpc_vm_life_cycle.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/527f0372/test/integration/component/test_vpc_vm_life_cycle.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 425c284..5893cc3 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -26,6 +26,7 @@ from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * from marvin.remoteSSHClient import remoteSSHClient +from marvin.codes import PASS import time @@ -1195,10 +1196,20 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): ) self.debug("We should be allowed to ping virtual gateway") - self.debug("VM gateway: %s" % self.vm_1.nic[0].gateway) + self.debug("Finding the gateway corresponding to isolated network") + gateways = [nic.gateway for nic in self.vm_1.nic if nic.networkid == self.network_1.id] - res = ssh_1.execute("ping -c 1 %s" % self.vm_1.nic[0].gateway) - self.debug("ping -c 1 %s: %s" % (self.vm_1.nic[0].gateway, res)) + gateway_list_validation_result = validateList(gateways) + + self.assertEqual(gateway_list_validation_result[0], PASS, "gateway list validation failed due to %s" % + gateway_list_validation_result[2]) + + gateway = gateway_list_validation_result[1] + + self.debug("VM gateway: %s" % gateway) + + res = ssh_1.execute("ping -c 1 %s" % gateway) + self.debug("ping -c 1 %s: %s" % (gateway, res)) result = str(res) self.assertEqual(