[PATCH] man: Adding initial version of manpages
by Radek Pazdera
This commit adds an initial version of manpages for the following
commands:
* lnst-ctl(1)
* lnst-slave(1)
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
man/lnst-ctl.1 | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
man/lnst-slave.1 | 91 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 200 insertions(+), 0 deletions(-)
create mode 100644 man/lnst-ctl.1
create mode 100644 man/lnst-slave.1
diff --git a/man/lnst-ctl.1 b/man/lnst-ctl.1
new file mode 100644
index 0000000..d14ac28
--- /dev/null
+++ b/man/lnst-ctl.1
@@ -0,0 +1,109 @@
+.TH LNST-CTL "1" "2012-11-12"
+
+.\" To view this file while editing, run it through groff:
+.\" groff -Tascii -man lnst-ctl.man | less -r
+
+.SH NAME
+lnst-ctl \- Linux Network Stack Test controller
+.SH SYNOPSIS
+.BR
+.B lnst-ctl
+[\fIOPTION\fR]... \fIRECIPE\fR... \fIACTION\fR
+.SH DESCRIPTION
+Linux Network Stack Test is a tool that supports development and execution
+of automated and portable network tests. For detailed description of the
+architecture of LNST please refer to project website
+(link listed on
+.B INTERNET RESOURCES
+bellow).
+.SH OPTIONS
+.TP
+.B \-c, \-\-cleanup
+Cleanup all slave machines berfore executing the recipes.
+.TP
+.B \-d, \-\-debug
+Toggle emitting debugging messages.
+.TP
+.B \-h, \-\-help
+Display usage of this command.
+.TP
+.B \-p, \-\-packet_capture
+Capture and log all ongoing network communication between the slaves
+during the test.
+.TP
+.BI "\-x, \-\-result" =file
+Write results in XML format to the specified
+.IR file .
+.PP
+.I RECIPE
+can be either a LNST recipe file or a directory containing recipe files.
+One or more files/directories can be passed at the same time. Each recipe
+is a XML file. The format is described in detail in the online documentation
+available at LNST wiki (link is listed on
+.B INTERNET RESOURCES
+bellow).
+
+.I ACTION
+can be one from
+.BR "run",
+.BR "config_only" ", and"
+.BR "dump".
+
+When it is set to
+.BR "run",
+all provided recipe files will be sequentially executed. The network will
+be configured accordingly to each recipe file and clean up
+afterwards.
+
+In case of
+.BR "config_only",
+the recipes provided are processed up to the point where all the machines
+are prepared and properly configured. No tests will be executed and the
+cleanup phase is omitted as well. This mode of operation is useful if you
+want to perform some specific actions or tests outside of LNST using
+the configuration specified in a recipe file.
+
+At last, when the
+.I ACTION
+chosen is
+.BR "dump",
+the network will be configured as specified in the recipe.
+.B lnst-ctl
+will then dump contents of its internal data structures to the standard
+output. This feature can be used for debugging recipes or network setups.
+.SH CONFIGURATION
+.B lnst-ctl
+will look for configuration in the following locations:
+
+.I /etc/lnst-ctl.conf
+.br
+.I ~/.lnst/lnst-ctl.conf
+
+For further description of file format or configuration options available,
+please refer to the configuration file itself, where each option is
+documented.
+
+.SH INTERNET RESOURCES
+Project Wiki: https://fedorahosted.org/lnst/
+.br
+Documentation: https://fedorahosted.org/lnst/ \" FIXME: Fix the link to documentation!
+.br
+Git Source Tree: http://git.fedorahosted.org/cgit/lnst.git/
+
+Mailing List: <lnst-developers(a)lists.fedorahosted.org>
+.SH AUTHORS
+\fBJiri Pirko\fR <jpirko(a)redhat.com>
+.br
+\fBJiri Zupka\fR <jzupka(a)redhat.com>
+.br
+\fBJan Tluka\fR <jtluka(a)redhat.com>
+.br
+\fBRadek Pazdera\fR <rpazdera(a)redhat.com>
+.br
+\fBOndrej Lichtner\fR <olichtne(a)redhat.com>
+.SH COPYRIGHT
+Copyright (C) 2012 Red Hat, Inc.
+
+LNST is distributed under GNU General Public License version 2. See
+the file "LICENSE" in the source distribution for information on terms &
+conditions for accessing and otherwise using LNST.
diff --git a/man/lnst-slave.1 b/man/lnst-slave.1
new file mode 100644
index 0000000..1169129
--- /dev/null
+++ b/man/lnst-slave.1
@@ -0,0 +1,91 @@
+.TH LNST-SLAVE "1" "2012-11-12"
+
+.\" To view this file while editing, run it through groff:
+.\" groff -Tascii -man lnst-slave.man | less -r
+
+.SH NAME
+lnst-slave \- Linux Network Stack Test slave daemon
+.SH SYNOPSIS
+.BR
+.B lnst-slave
+[\fB-d\fR] [\fB-e\fR] [\fB-h\fR] [\fB-i \fIpidfile\fR]
+[\fB-p \fIport_number\fR]
+.SH DESCRIPTION
+Linux Network Stack Test is a tool that supports development and execution
+of automated and portable network tests. For detailed description of the
+architecture of LNST please refer to project website
+(link listed on
+.B INTERNET RESOURCES
+bellow).
+.SH OPTIONS
+.TP
+.B \-d, \-\-debug
+Toggle emitting debugging messages.
+.TP
+.B \-e, \-\-daemonize
+Detach from parent process and run in background.
+.TP
+.B \-h, \-\-help
+Display usage of this command.
+.TP
+.BI "\-i, \-\-pidfile" =file
+File to write damonized process' PID to.
+.TP
+.BI "\-p, \-\-port" =port_number
+The port number
+.B lnst-slave
+should listen on for incomming commands.
+.SH CONFIGURATION
+.B lnst-slave
+will look for configuration in the following location:
+
+.I /etc/lnst-slave.conf
+
+For further description of file format or configuration options available,
+please refer to the configuration file itself, where each option is
+documented.
+.SH FILES
+Apart from configuration, there are few important locations that
+.B lnst-slave
+works with. All bellow mentioned paths can be changed in the
+configuration file.
+.SS Log Path
+Every test exectution and all the commands run by
+.B lnst-slave
+during the test are logged to the following location:
+
+.I /var/log/lnst
+.SS Cache Location
+Test modules and tools used by the controllers with this slave are cached
+in resources cache. The cache is by default located at:
+
+.I /var/cache/lnst
+
+The cache is fully under control of the
+.B lnst-slave
+daemon and is managed automatically. Making any modifications by hand is
+not recommended.
+.SH INTERNET RESOURCES
+Project Wiki: https://fedorahosted.org/lnst/
+.br
+Documentation: https://fedorahosted.org/lnst/ \" FIXME: Fix the link to documentation!
+.br
+Git Source Tree: http://git.fedorahosted.org/cgit/lnst.git/
+
+Mailing List: <lnst-developers(a)lists.fedorahosted.org>
+.SH AUTHORS
+\fBJiri Pirko\fR <jpirko(a)redhat.com>
+.br
+\fBJiri Zupka\fR <jzupka(a)redhat.com>
+.br
+\fBJan Tluka\fR <jtluka(a)redhat.com>
+.br
+\fBRadek Pazdera\fR <rpazdera(a)redhat.com>
+.br
+\fBOndrej Lichtner\fR <olichtne(a)redhat.com>
+.SH COPYRIGHT
+Copyright (C) 2012 Red Hat, Inc.
+
+LNST is distributed under GNU General Public License version 2. See
+the file "LICENSE" in the source distribution for information on terms &
+conditions for accessing and otherwise using LNST.
--
1.7.7.6
11 years, 5 months
[lnst trac] #26: add man pages
by fedora-badges
#26: add man pages
-------------------------+-----------------------
Reporter: olichtne | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
Add simple man pages, nothing very complicated yet, just something to
begin with.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/26>
lnst <http://example.org/>
My example project
11 years, 5 months
[lnst trac] #30: consolidate work with downloaded and/or compiled applications
by fedora-badges
#30: consolidate work with downloaded and/or compiled applications
-------------------------+-------------------------------------------------
Reporter: jirka | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone: Push LNST as a package into Fedora
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-------------------------------------------------
I see two now: multicast apps and iperf. I think it would be nito to have
some class which will handle downloading and compilation for us in one
place. Binaries should be always placed in /tmp/
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/30>
lnst <http://example.org/>
My example project
11 years, 5 months
[lnst trac] #46: Remove all references to nettestctl and nettestslave
by fedora-badges
#46: Remove all references to nettestctl and nettestslave
------------------------+-------------------------------------------------
Reporter: rpazdera | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: Push LNST as a package into Fedora
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-------------------------------------------------
Now that we went through with renaming the scripts, we should not forget
to change all the references to the old names to the new ones.
nettestctl -> lnst-ctl
nettestslave -> lnst-slave
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/46>
lnst <http://example.org/>
My example project
11 years, 5 months
[lnst] Restructuring project tree
by Jiří Pírko
commit a01772a6be3a923e1cb3e0e74cc8d1353acd77a2
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Fri Nov 9 16:27:59 2012 +0100
Restructuring project tree
This commit restructures the whole project so it can be easily
packaged for fedora.
Three logical parts were created:
Controller
Slave
Common - common code between Controller and Slave
The scripts (formerly known as nettestctl.py and nettestslave.py) were
also renamed to
lnst-ctl
lnst-slave
in order to maintain consistence in naming.
Some unused code was moved into a new directory 'obsolete'. Namely the
switch* stubs and netconfig.py script.
nettestctl.py => lnst-ctl | 9 +++----
nettestslave.py => lnst-slave | 8 +++---
{Common => lnst/Common}/Config.py | 5 ++-
{Common => lnst/Common}/Daemon.py | 0
{Common => lnst/Common}/ExecCmd.py | 0
{Common => lnst/Common}/LoggingHandler.py | 0
{Common => lnst/Common}/Logs.py | 2 +-
{NetTest => lnst/Common}/NetTestCommand.py | 2 +-
{Common => lnst/Common}/NetUtils.py | 0
{Common => lnst/Common}/PacketCapture.py | 0
{Common => lnst/Common}/ProcessManager.py | 0
{Common => lnst/Common}/RecipePath.py | 0
{Common => lnst/Common}/ResourceCache.py | 4 +-
{Common => lnst/Common}/ShellProcess.py | 4 +-
{Common => lnst/Common}/SlaveUtils.py | 4 +-
{Common => lnst/Common}/SshUtils.py | 2 +-
{Common => lnst/Common}/TestsCommon.py | 4 +-
{Common => lnst/Common}/Utils.py | 2 +-
{Common => lnst/Common}/VirtUtils.py | 4 +-
{Common => lnst/Common}/XmlProcessing.py | 4 +-
{Common => lnst/Common}/XmlRpc.py | 4 +-
{Common => lnst/Common}/XmlTemplates.py | 0
{Common => lnst/Common}/__init__.py | 0
{NetTest => lnst/Controller}/MachinePool.py | 4 +-
{NetTest => lnst/Controller}/NetTestController.py | 23 ++++++++++---------
{NetTest => lnst/Controller}/NetTestParse.py | 12 +++++-----
.../Controller}/NetTestResultSerializer.py | 2 +-
{NetConfig => lnst/Controller}/__init__.py | 0
{NetConfig => lnst/Slave}/NetConfig.py | 8 +++---
{NetConfig => lnst/Slave}/NetConfigCommon.py | 0
{NetConfig => lnst/Slave}/NetConfigDevNames.py | 6 ++--
{NetConfig => lnst/Slave}/NetConfigDevice.py | 6 ++--
{NetTest => lnst/Slave}/NetTestSlave.py | 21 +++++++++--------
{NetTest => lnst/Slave}/__init__.py | 0
{SwSwitch => lnst}/__init__.py | 0
{SwSwitch => obsolete/SwSwitch}/SwSwitch.py | 0
{Switch/Drivers => obsolete/SwSwitch}/__init__.py | 0
{Switch => obsolete/Switch}/Drivers/SwSwitch.py | 0
{Switch => obsolete/Switch/Drivers}/__init__.py | 0
{Switch => obsolete/Switch}/SwitchConfigParse.py | 0
{Switch => obsolete/Switch}/SwitchCtl.py | 0
{Switch => obsolete/Switch}/SwitchDriversCommon.py | 0
{Common => obsolete/Switch}/__init__.py | 0
netconfig.py => obsolete/netconfig.py | 0
switchconfig.py => obsolete/switchconfig.py | 0
swswitch.py => obsolete/swswitch.py | 0
test_modules/TestDummyFailing.py | 2 +-
test_modules/TestIcmp6Ping.py | 4 +-
test_modules/TestIcmpPing.py | 4 +-
test_modules/TestIperf.py | 6 ++--
test_modules/TestMulticast.py | 6 ++--
test_modules/TestNetCat.py | 4 +-
test_modules/TestPacketAssert.py | 2 +-
test_modules/TestPktCounter.py | 4 +-
test_modules/TestPktgenTx.py | 4 +-
test_modules/TestTCPConnect.py | 2 +-
test_modules/TestTCPListen.py | 2 +-
57 files changed, 91 insertions(+), 89 deletions(-)
---
diff --git a/nettestctl.py b/lnst-ctl
similarity index 96%
rename from nettestctl.py
rename to lnst-ctl
index 416e0ab..af9badb 100755
--- a/nettestctl.py
+++ b/lnst-ctl
@@ -16,11 +16,10 @@ import sys
import logging
import os
import re
-from NetTest.NetTestController import NetTestController, NetTestError
-from NetTest.NetTestResultSerializer import NetTestResultSerializer
-from Common.Logs import Logs
-import Common.ProcessManager
-from Common.Config import Config
+from lnst.Common.Logs import Logs
+from lnst.Common.Config import Config
+from lnst.Controller.NetTestController import NetTestController, NetTestError
+from lnst.Controller.NetTestResultSerializer import NetTestResultSerializer
def usage():
"""
diff --git a/nettestslave.py b/lnst-slave
similarity index 93%
rename from nettestslave.py
rename to lnst-slave
index 6367d73..3a66c2f 100755
--- a/nettestslave.py
+++ b/lnst-slave
@@ -15,10 +15,10 @@ import getopt
import sys
import os
import logging
-from NetTest.NetTestSlave import NetTestSlave
-from Common.Daemon import Daemon
-from Common.Logs import Logs
-from Common.Config import Config
+from lnst.Common.Daemon import Daemon
+from lnst.Common.Logs import Logs
+from lnst.Common.Config import Config
+from lnst.Slave.NetTestSlave import NetTestSlave
def usage():
"""
diff --git a/Common/Config.py b/lnst/Common/Config.py
similarity index 98%
rename from Common/Config.py
rename to lnst/Common/Config.py
index 56269b8..61e7354 100644
--- a/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -15,8 +15,9 @@ import sys
import logging
import re
from ConfigParser import ConfigParser
-from NetTest.NetTestSlave import DefaultRPCPort
-from NetUtils import verify_ip_address, verify_mac_address
+from lnst.Common.NetUtils import verify_ip_address, verify_mac_address
+
+DefaultRPCPort = 9999
class ConfigError(Exception):
pass
diff --git a/Common/Daemon.py b/lnst/Common/Daemon.py
similarity index 100%
rename from Common/Daemon.py
rename to lnst/Common/Daemon.py
diff --git a/Common/ExecCmd.py b/lnst/Common/ExecCmd.py
similarity index 100%
rename from Common/ExecCmd.py
rename to lnst/Common/ExecCmd.py
diff --git a/Common/LoggingHandler.py b/lnst/Common/LoggingHandler.py
similarity index 100%
rename from Common/LoggingHandler.py
rename to lnst/Common/LoggingHandler.py
diff --git a/Common/Logs.py b/lnst/Common/Logs.py
similarity index 99%
rename from Common/Logs.py
rename to lnst/Common/Logs.py
index 8dde988..a9910eb 100644
--- a/Common/Logs.py
+++ b/lnst/Common/Logs.py
@@ -13,7 +13,7 @@ import os, sys, shutil, datetime
from logging import Formatter
import logging.handlers
import traceback
-from Common.LoggingHandler import LogBuffer
+from lnst.Common.LoggingHandler import LogBuffer
LOCAL_IP = "(127.0.0.1)"
diff --git a/NetTest/NetTestCommand.py b/lnst/Common/NetTestCommand.py
similarity index 99%
rename from NetTest/NetTestCommand.py
rename to lnst/Common/NetTestCommand.py
index 0efae44..a41cc2f 100644
--- a/NetTest/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -16,7 +16,7 @@ import sys
import signal
import imp
import pickle, traceback
-from Common.ExecCmd import exec_cmd, ExecCmdFail
+from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
def str_command(command):
out = ("type (%s), machine_id (%s), value (%s)"
diff --git a/Common/NetUtils.py b/lnst/Common/NetUtils.py
similarity index 100%
rename from Common/NetUtils.py
rename to lnst/Common/NetUtils.py
diff --git a/Common/PacketCapture.py b/lnst/Common/PacketCapture.py
similarity index 100%
rename from Common/PacketCapture.py
rename to lnst/Common/PacketCapture.py
diff --git a/Common/ProcessManager.py b/lnst/Common/ProcessManager.py
similarity index 100%
rename from Common/ProcessManager.py
rename to lnst/Common/ProcessManager.py
diff --git a/Common/RecipePath.py b/lnst/Common/RecipePath.py
similarity index 100%
rename from Common/RecipePath.py
rename to lnst/Common/RecipePath.py
diff --git a/Common/ResourceCache.py b/lnst/Common/ResourceCache.py
similarity index 98%
rename from Common/ResourceCache.py
rename to lnst/Common/ResourceCache.py
index 9bc463f..fff617c 100644
--- a/Common/ResourceCache.py
+++ b/lnst/Common/ResourceCache.py
@@ -14,8 +14,8 @@ import os
import re
import time
import shutil
-from Common.Utils import md5sum
-from Common.ExecCmd import exec_cmd
+from lnst.Common.Utils import md5sum
+from lnst.Common.ExecCmd import exec_cmd
class ResourceCacheError(Exception):
pass
diff --git a/Common/ShellProcess.py b/lnst/Common/ShellProcess.py
similarity index 98%
rename from Common/ShellProcess.py
rename to lnst/Common/ShellProcess.py
index 83e45a8..56e2339 100644
--- a/Common/ShellProcess.py
+++ b/lnst/Common/ShellProcess.py
@@ -11,8 +11,8 @@ jzupka(a)redhat.com (Jiri Zupka)
"""
import pty, os, termios, time, signal, re, select
import logging, atexit
-from Common.Utils import wait_for
-from Common.ProcessManager import ProcessManager
+from lnst.Common.Utils import wait_for
+from lnst.Common.ProcessManager import ProcessManager
class ShellProcess:
class ProcessError(Exception):
diff --git a/Common/SlaveUtils.py b/lnst/Common/SlaveUtils.py
similarity index 93%
rename from Common/SlaveUtils.py
rename to lnst/Common/SlaveUtils.py
index 2c1f043..7c82487 100644
--- a/Common/SlaveUtils.py
+++ b/lnst/Common/SlaveUtils.py
@@ -6,9 +6,9 @@ __autor__ = """
jzupka(a)redhat.com (Jiri Zupka)
"""
-from Common.SshUtils import scp_to_remote, wait_for_login
-from Common.ShellProcess import ShellProcess
import sys
+from lnst.Common.SshUtils import scp_to_remote, wait_for_login
+from lnst.Common.ShellProcess import ShellProcess
def prepare_client_session(host, port, login, passwd=None, command=None,
prompt=None, install_path=None, test_dir=None):
diff --git a/Common/SshUtils.py b/lnst/Common/SshUtils.py
similarity index 99%
rename from Common/SshUtils.py
rename to lnst/Common/SshUtils.py
index d287970..91d3386 100644
--- a/Common/SshUtils.py
+++ b/lnst/Common/SshUtils.py
@@ -11,7 +11,7 @@ jzupka(a)redhat.com (Jiri Zupka)
"""
import time, logging
-from ShellProcess import ShellProcess
+from lnst.Common.ShellProcess import ShellProcess
class LoginError(Exception):
def __init__(self, msg, output):
diff --git a/Common/TestsCommon.py b/lnst/Common/TestsCommon.py
similarity index 98%
rename from Common/TestsCommon.py
rename to lnst/Common/TestsCommon.py
index 6d92667..38c3287 100644
--- a/Common/TestsCommon.py
+++ b/lnst/Common/TestsCommon.py
@@ -15,7 +15,7 @@ import logging
import sys
import os
import signal
-from NetTest.NetTestCommand import NetTestCommandGeneric
+from lnst.Common.NetTestCommand import NetTestCommandGeneric
class testLogger(logging.Logger):
def __init__(self, name, level=logging.NOTSET):
@@ -72,7 +72,7 @@ class TestGeneric(NetTestCommandGeneric):
def _signal_intr_handler(self, signum, frame):
os.write(self._write_pipe, "a")
-
+
def wait_on_interrupt(self):
'''
Should be used by test implementation for waiting on SIGINT
diff --git a/Common/Utils.py b/lnst/Common/Utils.py
similarity index 98%
rename from Common/Utils.py
rename to lnst/Common/Utils.py
index 3109a31..00f7428 100644
--- a/Common/Utils.py
+++ b/lnst/Common/Utils.py
@@ -15,7 +15,7 @@ import re
import os
import hashlib
import tempfile
-from ExecCmd import exec_cmd
+from lnst.Common.ExecCmd import exec_cmd
def die_when_parent_die():
try:
diff --git a/Common/VirtUtils.py b/lnst/Common/VirtUtils.py
similarity index 98%
rename from Common/VirtUtils.py
rename to lnst/Common/VirtUtils.py
index 28a3d7e..ac3a928 100644
--- a/Common/VirtUtils.py
+++ b/lnst/Common/VirtUtils.py
@@ -18,8 +18,8 @@ import time
import logging
from tempfile import NamedTemporaryFile
from xml.dom import minidom
-from ExecCmd import exec_cmd, ExecCmdFail
-from Common.NetUtils import normalize_hwaddr, scan_netdevs
+from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
+from lnst.Common.NetUtils import normalize_hwaddr, scan_netdevs
class VirtUtilsError(Exception):
pass
diff --git a/Common/XmlProcessing.py b/lnst/Common/XmlProcessing.py
similarity index 99%
rename from Common/XmlProcessing.py
rename to lnst/Common/XmlProcessing.py
index d313be5..839495d 100644
--- a/Common/XmlProcessing.py
+++ b/lnst/Common/XmlProcessing.py
@@ -14,8 +14,8 @@ import os
import logging
from xml.dom.minidom import parseString
from xml import sax
-from Common.XmlTemplates import XmlTemplates, XmlTemplateError
-from Common.RecipePath import RecipePath
+from lnst.Common.XmlTemplates import XmlTemplates, XmlTemplateError
+from lnst.Common.RecipePath import RecipePath
class XmlProcessingError(Exception):
diff --git a/Common/XmlRpc.py b/lnst/Common/XmlRpc.py
similarity index 98%
rename from Common/XmlRpc.py
rename to lnst/Common/XmlRpc.py
index d8217f8..2cee515 100644
--- a/Common/XmlRpc.py
+++ b/lnst/Common/XmlRpc.py
@@ -19,13 +19,13 @@ __author__ = """
jpirko(a)redhat.com (Jiri Pirko)
"""
-from SimpleXMLRPCServer import SimpleXMLRPCServer
-from Common.Logs import log_exc_traceback
import xmlrpclib
import sys
import socket
import SocketServer
import traceback
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+from lnst.Common.Logs import log_exc_traceback
# All public methods in this class are callable by clients.
class UtilityFuncs(object):
diff --git a/Common/XmlTemplates.py b/lnst/Common/XmlTemplates.py
similarity index 100%
rename from Common/XmlTemplates.py
rename to lnst/Common/XmlTemplates.py
diff --git a/Common/__init__.py b/lnst/Common/__init__.py
similarity index 100%
copy from Common/__init__.py
copy to lnst/Common/__init__.py
diff --git a/NetTest/MachinePool.py b/lnst/Controller/MachinePool.py
similarity index 99%
rename from NetTest/MachinePool.py
rename to lnst/Controller/MachinePool.py
index d623690..6b7bf67 100644
--- a/NetTest/MachinePool.py
+++ b/lnst/Controller/MachinePool.py
@@ -18,8 +18,8 @@ import os
import re
import copy
from xml.dom import minidom
-from Common.XmlProcessing import XmlDomTreeInit
-from NetTest.NetTestParse import MachineConfigParse
+from lnst.Common.XmlProcessing import XmlDomTreeInit
+from lnst.Controller.NetTestParse import MachineConfigParse
class MachinePool:
"""
diff --git a/NetTest/NetTestController.py b/lnst/Controller/NetTestController.py
similarity index 97%
rename from NetTest/NetTestController.py
rename to lnst/Controller/NetTestController.py
index 45c4941..b6af5ae 100644
--- a/NetTest/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -18,17 +18,18 @@ import re
import pickle
import tempfile
from xmlrpclib import Binary
-from Common.Logs import Logs, log_exc_traceback
-from Common.SshUtils import scp_from_remote
from pprint import pprint, pformat
-from Common.XmlRpc import ServerProxy, ServerException
-from NetTest.NetTestParse import NetTestParse
-from Common.SlaveUtils import prepare_client_session
-from Common.NetUtils import MacPool
-from NetTest.NetTestCommand import NetTestCommandContext, NetTestCommand, str_command
-from Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
-from Common.Utils import wait_for, md5sum, dir_md5sum, create_tar_archive
-from NetTest.MachinePool import MachinePool
+from lnst.Common.Logs import Logs, log_exc_traceback
+from lnst.Common.SshUtils import scp_from_remote
+from lnst.Common.XmlRpc import ServerProxy, ServerException
+from lnst.Common.SlaveUtils import prepare_client_session
+from lnst.Common.NetUtils import MacPool
+from lnst.Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
+from lnst.Common.Utils import wait_for, md5sum, dir_md5sum, create_tar_archive
+from lnst.Common.NetTestCommand import NetTestCommandContext, NetTestCommand
+from lnst.Common.NetTestCommand import str_command
+from lnst.Controller.NetTestParse import NetTestParse
+from lnst.Controller.MachinePool import MachinePool
class NetTestError(Exception):
pass
@@ -306,7 +307,7 @@ class NetTestController:
login = "root"
rpc_port = self._config.get_option('environment', 'rpcport')
session = prepare_client_session(hostname, port, login, passwd,
- "nettestslave.py -p %s" % rpc_port)
+ "lnst-slave -p %s" % rpc_port)
session.add_kill_handler(self._session_die)
info["session"] = session
diff --git a/NetTest/NetTestParse.py b/lnst/Controller/NetTestParse.py
similarity index 98%
rename from NetTest/NetTestParse.py
rename to lnst/Controller/NetTestParse.py
index 8d16638..bb40ed6 100644
--- a/NetTest/NetTestParse.py
+++ b/lnst/Controller/NetTestParse.py
@@ -13,12 +13,12 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import os
import re
-from Common.XmlProcessing import RecipeParser
-from Common.XmlProcessing import XmlDomTreeInit
-from Common.XmlProcessing import XmlProcessingError
-from Common.NetUtils import normalize_hwaddr
-from Common.Utils import bool_it
-from Common.RecipePath import RecipePath
+from lnst.Common.XmlProcessing import RecipeParser
+from lnst.Common.XmlProcessing import XmlDomTreeInit
+from lnst.Common.XmlProcessing import XmlProcessingError
+from lnst.Common.NetUtils import normalize_hwaddr
+from lnst.Common.Utils import bool_it
+from lnst.Common.RecipePath import RecipePath
class NetTestParse(RecipeParser):
def __init__(self, recipe_filepath):
diff --git a/NetTest/NetTestResultSerializer.py b/lnst/Controller/NetTestResultSerializer.py
similarity index 97%
rename from NetTest/NetTestResultSerializer.py
rename to lnst/Controller/NetTestResultSerializer.py
index c5e7d1a..3505a33 100644
--- a/NetTest/NetTestResultSerializer.py
+++ b/lnst/Controller/NetTestResultSerializer.py
@@ -11,8 +11,8 @@ __author__ = """
jpirko(a)redhat.com (Jiri Pirko)
"""
-from NetTestCommand import str_command
from xml.dom.minidom import getDOMImplementation
+from lnst.Controller.NetTestCommand import str_command
def serialize_obj(obj, dom, el, upper_name="unnamed"):
if isinstance(obj, dict):
diff --git a/NetConfig/__init__.py b/lnst/Controller/__init__.py
similarity index 100%
rename from NetConfig/__init__.py
rename to lnst/Controller/__init__.py
diff --git a/NetConfig/NetConfig.py b/lnst/Slave/NetConfig.py
similarity index 95%
rename from NetConfig/NetConfig.py
rename to lnst/Slave/NetConfig.py
index 75d5129..4b0e5a3 100644
--- a/NetConfig/NetConfig.py
+++ b/lnst/Slave/NetConfig.py
@@ -12,10 +12,10 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import copy
-from NetConfigDevNames import NetConfigDevNames
-from NetConfigDevice import NetConfigDevice
-from NetConfigDevice import NetConfigDeviceType
-from NetConfigCommon import get_slaves
+from lnst.Slave.NetConfigDevNames import NetConfigDevNames
+from lnst.Slave.NetConfigDevice import NetConfigDevice
+from lnst.Slave.NetConfigDevice import NetConfigDeviceType
+from lnst.Slave.NetConfigCommon import get_slaves
class NetConfig:
def __init__(self):
diff --git a/NetConfig/NetConfigCommon.py b/lnst/Slave/NetConfigCommon.py
similarity index 100%
rename from NetConfig/NetConfigCommon.py
rename to lnst/Slave/NetConfigCommon.py
diff --git a/NetConfig/NetConfigDevNames.py b/lnst/Slave/NetConfigDevNames.py
similarity index 95%
rename from NetConfig/NetConfigDevNames.py
rename to lnst/Slave/NetConfigDevNames.py
index 581f9b8..8033b35 100644
--- a/NetConfig/NetConfigDevNames.py
+++ b/lnst/Slave/NetConfigDevNames.py
@@ -12,9 +12,9 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import os
-from NetConfigCommon import get_option
-from Common.NetUtils import normalize_hwaddr
-from Common.NetUtils import scan_netdevs
+from lnst.Slave.NetConfigCommon import get_option
+from lnst.Common.NetUtils import normalize_hwaddr
+from lnst.Common.NetUtils import scan_netdevs
class NetConfigDevNames:
def __init__(self):
diff --git a/NetConfig/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
similarity index 98%
rename from NetConfig/NetConfigDevice.py
rename to lnst/Slave/NetConfigDevice.py
index 0a2d5d4..cd8a69e 100644
--- a/NetConfig/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -14,9 +14,9 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import re
import sys
-from Common.ExecCmd import exec_cmd
-from NetConfigCommon import get_slaves, get_option
-from Common.Utils import kmod_in_use, bool_it
+from lnst.Common.ExecCmd import exec_cmd
+from lnst.Slave.NetConfigCommon import get_slaves, get_option
+from lnst.Common.Utils import kmod_in_use, bool_it
class NetConfigDeviceGeneric:
'''
diff --git a/NetTest/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
similarity index 92%
rename from NetTest/NetTestSlave.py
rename to lnst/Slave/NetTestSlave.py
index 07d2de8..e198662 100644
--- a/NetTest/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -11,21 +11,22 @@ __author__ = """
jpirko(a)redhat.com (Jiri Pirko)
"""
-from Common.Logs import Logs, log_exc_traceback
import signal
import select, logging
import os
from tempfile import NamedTemporaryFile
-from Common.PacketCapture import PacketCapture
-from Common.XmlRpc import Server
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
-from NetConfig.NetConfig import NetConfig
-from NetConfig.NetConfigDevice import NetConfigDeviceAllCleanup
-from NetTest.NetTestCommand import NetTestCommandContext, NetTestCommand, CommandException
-from Common.Utils import die_when_parent_die
-from Common.NetUtils import scan_netdevs, test_tcp_connection
-from Common.ExecCmd import exec_cmd
-from Common.ResourceCache import ResourceCache
+from lnst.Common.Logs import Logs, log_exc_traceback
+from lnst.Common.PacketCapture import PacketCapture
+from lnst.Common.XmlRpc import Server
+from lnst.Common.Utils import die_when_parent_die
+from lnst.Common.NetUtils import scan_netdevs, test_tcp_connection
+from lnst.Common.ExecCmd import exec_cmd
+from lnst.Common.ResourceCache import ResourceCache
+from lnst.Common.NetTestCommand import NetTestCommandContext
+from lnst.Common.NetTestCommand import CommandException, NetTestCommand
+from lnst.Slave.NetConfig import NetConfig
+from lnst.Slave.NetConfigDevice import NetConfigDeviceAllCleanup
DefaultRPCPort = 9999
diff --git a/NetTest/__init__.py b/lnst/Slave/__init__.py
similarity index 100%
rename from NetTest/__init__.py
rename to lnst/Slave/__init__.py
diff --git a/SwSwitch/__init__.py b/lnst/__init__.py
similarity index 100%
rename from SwSwitch/__init__.py
rename to lnst/__init__.py
diff --git a/SwSwitch/SwSwitch.py b/obsolete/SwSwitch/SwSwitch.py
similarity index 100%
rename from SwSwitch/SwSwitch.py
rename to obsolete/SwSwitch/SwSwitch.py
diff --git a/Switch/Drivers/__init__.py b/obsolete/SwSwitch/__init__.py
similarity index 100%
rename from Switch/Drivers/__init__.py
rename to obsolete/SwSwitch/__init__.py
diff --git a/Switch/Drivers/SwSwitch.py b/obsolete/Switch/Drivers/SwSwitch.py
similarity index 100%
rename from Switch/Drivers/SwSwitch.py
rename to obsolete/Switch/Drivers/SwSwitch.py
diff --git a/Switch/__init__.py b/obsolete/Switch/Drivers/__init__.py
similarity index 100%
rename from Switch/__init__.py
rename to obsolete/Switch/Drivers/__init__.py
diff --git a/Switch/SwitchConfigParse.py b/obsolete/Switch/SwitchConfigParse.py
similarity index 100%
rename from Switch/SwitchConfigParse.py
rename to obsolete/Switch/SwitchConfigParse.py
diff --git a/Switch/SwitchCtl.py b/obsolete/Switch/SwitchCtl.py
similarity index 100%
rename from Switch/SwitchCtl.py
rename to obsolete/Switch/SwitchCtl.py
diff --git a/Switch/SwitchDriversCommon.py b/obsolete/Switch/SwitchDriversCommon.py
similarity index 100%
rename from Switch/SwitchDriversCommon.py
rename to obsolete/Switch/SwitchDriversCommon.py
diff --git a/Common/__init__.py b/obsolete/Switch/__init__.py
similarity index 100%
rename from Common/__init__.py
rename to obsolete/Switch/__init__.py
diff --git a/netconfig.py b/obsolete/netconfig.py
similarity index 100%
rename from netconfig.py
rename to obsolete/netconfig.py
diff --git a/switchconfig.py b/obsolete/switchconfig.py
similarity index 100%
rename from switchconfig.py
rename to obsolete/switchconfig.py
diff --git a/swswitch.py b/obsolete/swswitch.py
similarity index 100%
rename from swswitch.py
rename to obsolete/swswitch.py
diff --git a/test_modules/TestDummyFailing.py b/test_modules/TestDummyFailing.py
index 4ccce56..c48c90d 100644
--- a/test_modules/TestDummyFailing.py
+++ b/test_modules/TestDummyFailing.py
@@ -11,7 +11,7 @@ jpirko(a)redhat.com (Jiri Pirko)
"""
import logging
-from Common.TestsCommon import TestGeneric
+from lnst.Common.TestsCommon import TestGeneric
class TestDummyFailing(TestGeneric):
def run(self):
diff --git a/test_modules/TestIcmp6Ping.py b/test_modules/TestIcmp6Ping.py
index 086d3fc..7bc4e40 100644
--- a/test_modules/TestIcmp6Ping.py
+++ b/test_modules/TestIcmp6Ping.py
@@ -7,8 +7,8 @@ jtluka(a)redhat.com (Jan Tluka)
import logging
import re
-from Common.TestsCommon import TestGeneric
-from Common.ExecCmd import exec_cmd
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ExecCmd import exec_cmd
class TestIcmp6Ping(TestGeneric):
diff --git a/test_modules/TestIcmpPing.py b/test_modules/TestIcmpPing.py
index 5b6b3ea..73a9bd5 100644
--- a/test_modules/TestIcmpPing.py
+++ b/test_modules/TestIcmpPing.py
@@ -12,8 +12,8 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import re
-from Common.TestsCommon import TestGeneric
-from Common.ExecCmd import exec_cmd
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ExecCmd import exec_cmd
class TestIcmpPing(TestGeneric):
def _compose_cmd(self):
diff --git a/test_modules/TestIperf.py b/test_modules/TestIperf.py
index 84c887d..0a9b047 100644
--- a/test_modules/TestIperf.py
+++ b/test_modules/TestIperf.py
@@ -7,12 +7,12 @@ jtluka(a)redhat.com (Jan Tluka)
"""
import logging
-from Common.TestsCommon import TestGeneric
-from Common.ExecCmd import exec_cmd
-from Common.ShellProcess import ShellProcess
import time
import errno
import re
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ExecCmd import exec_cmd
+from lnst.Common.ShellProcess import ShellProcess
class TestIperf(TestGeneric):
def _compose_iperf_cmd(self, role):
diff --git a/test_modules/TestMulticast.py b/test_modules/TestMulticast.py
index 9909bcd..91a9d53 100644
--- a/test_modules/TestMulticast.py
+++ b/test_modules/TestMulticast.py
@@ -12,9 +12,9 @@ rpazdera(a)redhat.com (Radek Pazdera)
import logging
import re
-from Common.TestsCommon import TestGeneric
-from NetTest.NetTestCommand import CommandException
-from Common.ExecCmd import exec_cmd
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Controller.NetTestCommand import CommandException
+from lnst.Common.ExecCmd import exec_cmd
class TestMulticast(TestGeneric):
""" Wrapper for executing the multicast test tools in LNST
diff --git a/test_modules/TestNetCat.py b/test_modules/TestNetCat.py
index bae8dba..cf5199e 100644
--- a/test_modules/TestNetCat.py
+++ b/test_modules/TestNetCat.py
@@ -10,11 +10,11 @@ __author__ = """
jtluka(a)redhat.com (Jan Tluka)
"""
-from Common.TestsCommon import TestGeneric
-from Common.ShellProcess import ShellProcess
import re
import time
import logging
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ShellProcess import ShellProcess
class TestNetCat(TestGeneric):
def _get_stream(self):
diff --git a/test_modules/TestPacketAssert.py b/test_modules/TestPacketAssert.py
index 5f869db..1524800 100644
--- a/test_modules/TestPacketAssert.py
+++ b/test_modules/TestPacketAssert.py
@@ -15,7 +15,7 @@ import logging
import subprocess
import re
import signal
-from Common.TestsCommon import TestGeneric
+from lnst.Common.TestsCommon import TestGeneric
class TestPacketAssert(TestGeneric):
""" Assert for number of incomming/outgoing packets
diff --git a/test_modules/TestPktCounter.py b/test_modules/TestPktCounter.py
index 92a155c..727d472 100644
--- a/test_modules/TestPktCounter.py
+++ b/test_modules/TestPktCounter.py
@@ -13,8 +13,8 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import re
import os
-from Common.TestsCommon import TestGeneric
-from Common.ExecCmd import exec_cmd, ExecCmdFail
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
def get_pkt_count(indev_name, dport, proto):
if indev_name:
diff --git a/test_modules/TestPktgenTx.py b/test_modules/TestPktgenTx.py
index 030dd4f..c1ca86a 100644
--- a/test_modules/TestPktgenTx.py
+++ b/test_modules/TestPktgenTx.py
@@ -13,8 +13,8 @@ jpirko(a)redhat.com (Jiri Pirko)
import logging
import re
import os
-from Common.TestsCommon import TestGeneric
-from Common.ExecCmd import exec_cmd, ExecCmdFail
+from lnst.Common.TestsCommon import TestGeneric
+from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
class Pktgen:
def __init__(self, dev):
diff --git a/test_modules/TestTCPConnect.py b/test_modules/TestTCPConnect.py
index 50e9748..4a5dc5c 100644
--- a/test_modules/TestTCPConnect.py
+++ b/test_modules/TestTCPConnect.py
@@ -15,8 +15,8 @@ from time import sleep
from random import randrange, sample
import logging
import re
-from Common.TestsCommon import TestGeneric
import ctypes
+from lnst.Common.TestsCommon import TestGeneric
"""
Test description:
diff --git a/test_modules/TestTCPListen.py b/test_modules/TestTCPListen.py
index 4de1083..3aa4d47 100644
--- a/test_modules/TestTCPListen.py
+++ b/test_modules/TestTCPListen.py
@@ -12,9 +12,9 @@ import errno
import logging
import re
from multiprocessing import Process, Value
-from Common.TestsCommon import TestGeneric
from signal import signal, SIGINT
import ctypes
+from lnst.Common.TestsCommon import TestGeneric
"""
Test description:
11 years, 5 months
[lnst trac] #45: nettestlave running as a daemon
by fedora-badges
#45: nettestlave running as a daemon
------------------------+-------------------------------------------------
Reporter: rpazdera | Owner: somebody
Type: task | Status: new
Priority: major | Milestone: Push LNST as a package into Fedora
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-------------------------------------------------
In order to push LNST to Fedora, we will need to reconsider the way it
works.
Nowadays in case of remote exec, LNST will copy itself to the slave. This
is
unacceptable for Fedora.
Jirka proposed that the slave should be daemonized and started by systemd.
This means we will have only one method of slave execution and the remote
exec will be removed.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/45>
lnst <http://example.org/>
My example project
11 years, 5 months
[lnst trac] #44: Custom Tests should be transfered through rpc
by fedora-badges
#44: Custom Tests should be transfered through rpc
------------------------+-----------------------
Reporter: olichtne | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-----------------------
We want our users to be able to create their own test commands that are
currently located in the Tests/ directory. At the moment this works
because we can use remote_exec to transfer them to the slaves which are
then able to use them.
However this will not work when lnst is distributed as a package. We
agreed that user tests will be located in the directory ~/.lnst/Tests/ or
alternatively we can specify the path through a new config option.
Transfer of these tests will be done through rpc to a location where the
slave application can find them.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/44>
lnst <http://example.org/>
My example project
11 years, 5 months
[lnst trac] #43: nettestctl: creation of config files at first launch
by fedora-badges
#43: nettestctl: creation of config files at first launch
------------------------+-----------------------
Reporter: olichtne | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-----------------------
After installation lnst doesn't have any configuration files created yet.
At this point the application runs using the default values.
The first launch of the application should create the user configuration
file containing the currently setup values (these will probably be the
defaults).
The file will be ~/.lnst/lnst.conf
The following runs should be using the configuration contained within this
file.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/43>
lnst <http://example.org/>
My example project
11 years, 5 months
[PULL REQUEST] Restructuring Project Tree
by Radek Pazdera
I made some substantial changes to the LNST tree layout in order to make
it easier for us to distribute lnst as a package for Fedora.
Instad of sending a patch, I pushed them to github so the history is
retained
https://github.com/astro-/lnst/tree/
Commit a01772a6be3a923e1cb3e0e74cc8d1353acd77a2
===============================================
This commit restructures the whole project so it can be easily
packaged for fedora.
Three logical parts were created:
Controller
Slave
Common - common code between Controller and Slave
The scripts (formerly known as nettestctl.py and nettestslave.py) were
also renamed to
lnst-ctl
lnst-slave
in order to maintain consistence in naming.
Some unused code was moved into a new directory 'obsolete'. Namely the
switch* stubs and netconfig.py script.
---
Radek
11 years, 5 months