From e01762afb78c7c4938ce16d52b7f47fdbb4ed4dc Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Mon, 5 Dec 2016 10:20:45 +0200 Subject: 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 --- test/functest/results.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/functest/results.py') 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 -- cgit 1.2.3-korg