diff options
author | 2020-12-16 15:47:49 +0100 | |
---|---|---|
committer | 2020-12-28 12:11:29 +0100 | |
commit | 9822834527c84e6e2d36b8b6d9aa81d0facd2a8a (patch) | |
tree | 2562c9be8fd2d78d7f8eb3530e4df5802478479e /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py | |
parent | 63eeeaf4c2b27db28a0c4fb0c5806978b0a5796d (diff) |
Improved PROX cleanup when exiting
Sending now a 'quit' command to PROX, so that the thread running PROX in
an ssh session is now cleaned up correctly.
Also fixed a problem with the logging when running the code more than
once. We only create handlers now, when they do not yet exist.
Updated the rapid version.
Also added some more tests in the testcases.yaml for xtesting.
At the end of a run, the PROX.log files are copied in the results
directory.
The success criterium for a test 'pass_threshold' has been removed from
the test files and is to be controlled by the xtesting testcases.yaml
file.
Change-Id: Ifbbb1c91f32c9176f52025d9ae4c495b432a94c9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py')
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py index 8466c856..e47c1799 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py @@ -24,12 +24,14 @@ class RapidMachine(object): """ Class to deal with a PROX instance (VM, bare metal, container) """ - def __init__(self, key, user, vim, rundir, machine_params, configonly): + def __init__(self, key, user, vim, rundir, resultsdir, machine_params, + configonly): self.name = machine_params['name'] self.ip = machine_params['admin_ip'] self.key = key self.user = user self.rundir = rundir + self.resultsdir = resultsdir self.dp_ports = [] self.dpdk_port_index = [] self.configonly = configonly @@ -44,13 +46,13 @@ class RapidMachine(object): index += 1 else: break - self.rundir = rundir self.machine_params = machine_params self.vim = vim def __del__(self): if ((not self.configonly) and self.machine_params['prox_socket']): - self._client.scp_get('/prox.log', './{}.prox.log'.format(self.name)) + self._client.scp_get('/prox.log', '{}/{}.prox.log'.format( + self.resultsdir, self.name)) def get_cores(self): return (self.machine_params['cores']) @@ -113,7 +115,7 @@ class RapidMachine(object): def close_prox(self): if (not self.configonly) and self.machine_params['prox_socket'] and self.machine_params['prox_launch_exit']: - self.socket.quit() + self.socket.quit_prox() def connect_prox(self): if self.machine_params['prox_socket']: |