aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping/vping_ssh.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-07-31 13:01:14 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-31 13:11:41 +0200
commit5522ecd302ee54b494714cb2e1af0fe2381e5c37 (patch)
treeef5806328fa5cd7da178b97f94328949cb0d9b51 /functest/opnfv_tests/openstack/vping/vping_ssh.py
parentb66827d753e09c29cd6f541119dc0ec4c6344511 (diff)
Add fallback mechanism if vlan
private_v4 and public_v4 are incorrectly set when vlan is used as overlay. JIRA: FUNCTEST-996 Change-Id: I120a247e92e0fd295769b2a0eeb15ce82a0eabc8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/vping/vping_ssh.py')
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_ssh.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py
index a8a6fd9a6..6420013a0 100644
--- a/functest/opnfv_tests/openstack/vping/vping_ssh.py
+++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py
@@ -45,7 +45,9 @@ class VPingSSH(singlevm.SingleVm2):
"""
assert self.ssh
(_, stdout, stderr) = self.ssh.exec_command(
- 'ping -c 1 ' + self.vm2.private_v4)
+ 'ping -c 1 {}'.format(
+ self.vm2.private_v4 or self.vm2.addresses[
+ self.network.name][0].addr))
self.__logger.info("output:\n%s", stdout.read())
self.__logger.info("error:\n%s", stderr.read())
return stdout.channel.recv_exit_status()