mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 12:18:00 +00:00
Implement replace_special_char function
This commit is contained in:
@@ -555,6 +555,10 @@ class LFCliBase:
|
||||
timestamp):
|
||||
return (timestamp - datetime.datetime(1970,1,1)).total_seconds()*1000
|
||||
|
||||
def replace_special_char(self,
|
||||
str):
|
||||
return str.replace('+', ' ').replace('_', ' ')
|
||||
|
||||
Help_Mode = """Station WiFi modes: use the number value below:
|
||||
auto : 0,
|
||||
a : 1,
|
||||
|
||||
@@ -1191,6 +1191,7 @@ class L3CXProfile(LFCliBase):
|
||||
pass
|
||||
|
||||
#Step 1, column names
|
||||
col_names=[self.replace_special_char(x) for x in col_names]
|
||||
fields = ",".join(col_names)
|
||||
header_row=col_names
|
||||
# Step 2, monitor columns
|
||||
|
||||
@@ -8,7 +8,7 @@ SSID_USED="jedway-wpa2-x2048-5-3"
|
||||
PASSWD_USED="jedway-wpa2-x2048-5-3"
|
||||
RADIO_USED="wiphy1"
|
||||
SECURITY="wpa2"
|
||||
COL_NAMES="'"'name'"','"'tx bytes'"','"'rx bytes'"','"'dropped'"'"
|
||||
COL_NAMES="name,tx_bytes,rx_bytes,dropped"
|
||||
|
||||
START_NUM=0
|
||||
CURR_TEST_NUM=0
|
||||
@@ -74,7 +74,7 @@ TEST_DIR="/home/lanforge/report-data/${NOW}"
|
||||
mkdir "$TEST_DIR"
|
||||
function run_test() {
|
||||
for i in "${testCommands[@]}"; do
|
||||
NAME=cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
|
||||
NAME=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
CURR_TEST_NAME=${i%%.py*}
|
||||
CURR_TEST_NAME=${CURR_TEST_NAME#./*}
|
||||
CURR_TEST_NUM="${name_to_num[$CURR_TEST_NAME]}"
|
||||
|
||||
Reference in New Issue
Block a user