The DEFAULT_TIMEOUT variable will be used from different modules so make this variable
available in common code.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Common/NetTestCommand.py | 2 ++
lnst/Controller/Machine.py | 3 +--
lnst/Slave/NetTestSlave.py | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index 7b45b33..fbb15a2 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -21,6 +21,8 @@ import re
from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
from lnst.Common.ConnectionHandler import recv_data, send_data
+DEFAULT_TIMEOUT = 60
+
def str_command(command):
attrs = ["type(%s)" % command["type"]]
if command["type"] == "test":
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index eefb3aa..530aef8 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -28,13 +28,12 @@ from lnst.Common.Utils import wait_for, md5sum, dir_md5sum,
create_tar_archive
from lnst.Common.Utils import check_process_running
from lnst.Common.ConnectionHandler import send_data, recv_data
from lnst.Common.ConnectionHandler import ConnectionHandler
+from lnst.Common.NetTestCommand import DEFAULT_TIMEOUT
# conditional support for libvirt
if check_process_running("libvirtd"):
from lnst.Controller.VirtUtils import VirtNetCtl, VirtDomainCtl
-DEFAULT_TIMEOUT = 60
-
class MachineError(Exception):
pass
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index d2f7834..7819b82 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -32,6 +32,7 @@ from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
from lnst.Common.ResourceCache import ResourceCache
from lnst.Common.NetTestCommand import NetTestCommandContext
from lnst.Common.NetTestCommand import CommandException, NetTestCommand
+from lnst.Common.NetTestCommand import DEFAULT_TIMEOUT
from lnst.Slave.NmConfigDevice import is_nm_managed_by_name
from lnst.Common.Utils import check_process_running
from lnst.Common.ConnectionHandler import recv_data, send_data
--
1.9.3