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