The config_only action did not work correctly since deconfigure
parameter of NetTestController::_cleanup_slaves() has not been used
for bypassing deconfiguration of configured interfaces at all. This
patch fixes this behavior.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/Machine.py | 7 ++++---
lnst/Controller/NetTestController.py | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 2ae008c..d4348e2 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -150,9 +150,10 @@ class Machine(object):
self._rpc_call("kill_cmds")
- for iface in reversed(self._interfaces):
- iface.deconfigure()
- iface.cleanup()
+ if deconfigure:
+ for iface in reversed(self._interfaces):
+ iface.deconfigure()
+ iface.cleanup()
self._rpc_call("bye")
self._msg_dispatcher.disconnect_slave(self.get_id())
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index ae2a78a..88d3156 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -171,7 +171,7 @@ class NetTestController:
for machine_id, machine in self._machines.iteritems():
if machine.is_configured():
- machine.cleanup()
+ machine.cleanup(deconfigure)
#clean-up slave logger
self._log_ctl.remove_slave(machine_id)
--
1.8.1.4