mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-22 13:05:11 +00:00
lf_wifi_capacity_test.py prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
committed by
shivam
parent
2931c9c4c6
commit
9feaf8d683
@@ -307,6 +307,8 @@ import os
|
|||||||
import importlib
|
import importlib
|
||||||
import argparse
|
import argparse
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
@@ -320,6 +322,9 @@ cv_test_manager = importlib.import_module("py-json.cv_test_manager")
|
|||||||
cv_test = cv_test_manager.cv_test
|
cv_test = cv_test_manager.cv_test
|
||||||
cv_add_base_parser = cv_test_manager.cv_add_base_parser
|
cv_add_base_parser = cv_test_manager.cv_add_base_parser
|
||||||
cv_base_adjust_parser = cv_test_manager.cv_base_adjust_parser
|
cv_base_adjust_parser = cv_test_manager.cv_base_adjust_parser
|
||||||
|
lf_logger_config = importlib.import_module("py-scripts.lf_logger_config")
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class WiFiCapacityTest(cv_test):
|
class WiFiCapacityTest(cv_test):
|
||||||
@@ -416,7 +421,7 @@ class WiFiCapacityTest(cv_test):
|
|||||||
self.station_profile.create(radio=self.radio, sta_names_=sta, debug=self.debug)
|
self.station_profile.create(radio=self.radio, sta_names_=sta, debug=self.debug)
|
||||||
self.station_profile.admin_up()
|
self.station_profile.admin_up()
|
||||||
self.wait_for_ip(station_list=sta)
|
self.wait_for_ip(station_list=sta)
|
||||||
print("stations created")
|
logger.info("stations created")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.sync_cv()
|
self.sync_cv()
|
||||||
@@ -548,6 +553,14 @@ def main():
|
|||||||
|
|
||||||
cv_base_adjust_parser(args)
|
cv_base_adjust_parser(args)
|
||||||
|
|
||||||
|
# set up logger
|
||||||
|
logger_config = lf_logger_config.lf_logger_config()
|
||||||
|
|
||||||
|
# lf_logger_config_json will take presidence to changing debug levels
|
||||||
|
if args.lf_logger_config_json:
|
||||||
|
logger_config.lf_logger_config_json = args.lf_logger_config_json
|
||||||
|
logger_config.load_lf_logger_config()
|
||||||
|
|
||||||
WFC_Test = WiFiCapacityTest(lfclient_host=args.mgr,
|
WFC_Test = WiFiCapacityTest(lfclient_host=args.mgr,
|
||||||
lf_port=args.port,
|
lf_port=args.port,
|
||||||
lf_user=args.lf_user,
|
lf_user=args.lf_user,
|
||||||
|
|||||||
Reference in New Issue
Block a user