Updated Branches: refs/heads/master 494ccd821 -> 5d75c6b75
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/5d75c6b7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5d75c6b7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5d75c6b7 Branch: refs/heads/master Commit: 5d75c6b75c3ee65a15563d4c6b62cae7761afd86 Parents: 494ccd82 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:03:57 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/5d75c6b7/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(