summaryrefslogtreecommitdiffstats
path: root/test/functest/results.py
diff options
context:
space:
mode:
authorRomanos Skiadas <rski@intracom-telecom.com>2016-12-05 10:20:45 +0200
committerRomanos Skiadas <rski@intracom-telecom.com>2016-12-13 15:23:01 +0200
commite01762afb78c7c4938ce16d52b7f47fdbb4ed4dc (patch)
treeca2238122a0aa6789fa59ab727047f09d1664e4d /test/functest/results.py
parent2417d16aa6767a4c1bb6f28104076bb4b11d5e10 (diff)
Don't pass ips to get_ssh_output and check_ping
Remove the IP arguments from these functions and use the VM objects passed to them to find their IPs. This simplifies the calls. Change-Id: Ideb08b6fdf0648870c2854f057708a88bb482d0c Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
Diffstat (limited to 'test/functest/results.py')
-rw-r--r--test/functest/results.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/functest/results.py b/test/functest/results.py
index 343c962..37dfc24 100644
--- a/test/functest/results.py
+++ b/test/functest/results.py
@@ -25,11 +25,14 @@ class Results(object):
self.num_tests_failed = 0
def get_ping_status(self,
- vm_source, ip_source,
- vm_target, ip_target,
+ vm_source,
+ vm_target,
expected="PASS", timeout=30):
console_log = vm_source.get_console_output()
+ ip_source = vm_source.networks.itervalues().next()[0]
+ ip_target = vm_target.networks.itervalues().next()[0]
+
if "request failed" in console_log:
# Normally, cirros displays this message when userdata fails
logger.debug("It seems userdata is not supported in "
@@ -112,10 +115,11 @@ class Results(object):
def add_success(self, test):
self.add_to_summary(2, "PASS", test)
- def check_ssh_output(self, vm_source, ip_source,
- vm_target, ip_target,
+ def check_ssh_output(self, vm_source, vm_target,
expected, timeout=30):
console_log = vm_source.get_console_output()
+ ip_source = vm_source.networks.itervalues().next()[0]
+ ip_target = vm_target.networks.itervalues().next()[0]
if "request failed" in console_log:
# Normally, cirros displays this message when userdata fails