commit 7ae12941ea1326a08b9bb624b65693d0cea54e51
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Oct 12 12:51:10 2012 +0200
NetTestController: disable LoggingServer
The LoggingServer is no longer used and logs are retrieved through rpc.
This means it is no longer needed to create and start the server.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
NetTest/NetTestController.py | 4 ++--
nettestctl.py | 11 +++--------
2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/NetTest/NetTestController.py b/NetTest/NetTestController.py
index 1a70e6b..888a5ba 100644
--- a/NetTest/NetTestController.py
+++ b/NetTest/NetTestController.py
@@ -21,7 +21,7 @@ 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 get_corespond_local_ip, MacPool
+from Common.NetUtils import MacPool
from NetTest.NetTestCommand import NetTestCommandContext, NetTestCommand, str_command
from Common.LoggingServer import LoggingServer
from Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
@@ -36,7 +36,7 @@ def ignore_event(**kwarg):
class NetTestController:
def __init__(self, recipe_path, remoteexec=False, cleanup=False,
- res_serializer=None, config=None, logServer=None):
+ res_serializer=None, config=None):
self._remoteexec = remoteexec
self._docleanup = cleanup
self._res_serializer = res_serializer
diff --git a/nettestctl.py b/nettestctl.py
index 201ed7f..4a32d99 100755
--- a/nettestctl.py
+++ b/nettestctl.py
@@ -46,11 +46,10 @@ def usage():
sys.exit()
def process_recipe(action, file_path, remoteexec, cleanup, res_serializer,
- packet_capture, config, loggingServer):
+ packet_capture, config):
nettestctl = NetTestController(file_path,
remoteexec=remoteexec, cleanup=cleanup,
- res_serializer=res_serializer,
- config=config, logServer=loggingServer)
+ res_serializer=res_serializer, config=config)
if action == "run":
return nettestctl.run_recipe(packet_capture)
elif action == "dump":
@@ -75,18 +74,14 @@ def get_recipe_result(args, file_path, remoteexec, cleanup,
res_serializer, packet_capture, config):
res_serializer.add_recipe(file_path)
Logs.set_logging_root_path(file_path)
- loggingServer = LoggingServer(Logs.root_path, Logs.debug)
- loggingServer.start()
res = None
try:
res = process_recipe(args, file_path, remoteexec, cleanup,
- res_serializer, packet_capture,
- config, loggingServer)
+ res_serializer, packet_capture, config)
except NetTestError as err:
logging.error(err)
- loggingServer.stop()
return ((file_path, res))
def main():