Remove all useless scapy WARNING: on import from scapy
Just delay a whee bit in SSH agent before closing channel/session.
For some reason, there seems to be unread data in the tcp queue.
When closed quickly ends up RST'ing the tcp/onos-karaf server side session.
This causes a bogus "Connection reset by peer" exception in the ONOS log for every cli session established to ONOS from cord-tester
Change-Id: I954429b7d132d89b0f0515b267468bf4127ac127
diff --git a/src/test/utils/CordLogger.py b/src/test/utils/CordLogger.py
index e58e4ff..cbebee5 100644
--- a/src/test/utils/CordLogger.py
+++ b/src/test/utils/CordLogger.py
@@ -1,4 +1,6 @@
from OnosLog import OnosLog
+import logging
+logging.getLogger('scapy.runtime').setLevel(logging.ERROR)
from scapy.all import log
from onosclidriver import OnosCliDriver
from OnosCtrl import OnosCtrl
@@ -9,6 +11,7 @@
import unittest
import os
import time
+import warnings
def get_controller_names(controllers):
controller_names = [ 'cord-onos' if controllers.index(c) == 0 else 'cord-onos-{}'.format(controllers.index(c)+1) for c in controllers ]
@@ -31,6 +34,10 @@
archive_dir = os.path.join(setup_dir, 'test_logs')
onos_data_dir = os.path.join(setup_dir, 'cord-onos-data')
+ def __init__(self, *args, **kwargs):
+ warnings.simplefilter('ignore')
+ super(CordLogger, self).__init__(*args, **kwargs)
+
@classmethod
def cliSessionEnter(cls):
try: