mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
test_l3_longevity.py : bug fix on capturing output from controller
This commit is contained in:
@@ -1306,7 +1306,7 @@ TODO: Radio descriptions in realm , the 1. refers to the chassi hopefully corres
|
||||
''')
|
||||
|
||||
# reorder to follow looping
|
||||
parser.add_argument('-cca','--cisco_ap', help='--cisco_ap List of APs to test default: Axel',default="C9120AXE-B")
|
||||
parser.add_argument('-cca','--cisco_ap', help='--cisco_ap List of APs to test default: Axel',default="APA453.0E7B.CF9C")
|
||||
parser.add_argument('-ccb','--cisco_band', help='--cisco_band <a | b | abgn>',default="a b abgn",choices=["a", "b", "abgn"])
|
||||
parser.add_argument('-cwm','--cisco_wifimode', help='List of of wifi mode to test default: 11ax 11ac 11n 11gb',default="11ax 11ac 11n 11gb")
|
||||
parser.add_argument('-ccc','--cisco_channel', help='--cisco_channel <channel> default 36',default="36")
|
||||
@@ -1366,7 +1366,6 @@ TODO: Radio descriptions in realm , the 1. refers to the chassi hopefully corres
|
||||
# Gather Test Data
|
||||
#################################################################
|
||||
|
||||
|
||||
if args.test_duration:
|
||||
test_duration = args.test_duration
|
||||
|
||||
|
||||
@@ -294,6 +294,7 @@ class L3VariableTime(LFCliBase):
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "summary"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -316,6 +317,8 @@ class L3VariableTime(LFCliBase):
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "advanced"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -337,6 +340,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "show_wlan_summary"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -358,6 +362,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "disable"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -380,6 +385,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "disable_wlan"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -402,6 +408,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "disable_network_5ghz"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -424,6 +431,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "disable_network_24ghz"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -447,6 +455,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "manual"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -469,6 +478,7 @@ class L3VariableTime(LFCliBase):
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "auto"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -492,6 +502,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "txPower","--value", self.args.cisco_tx_power],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -516,6 +527,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "channel","--value", self.args.cisco_channel],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -527,7 +539,7 @@ class L3VariableTime(LFCliBase):
|
||||
|
||||
#set bandwidth [20 40 80 160]
|
||||
#./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action bandwidth --value 40 --series 9800
|
||||
def controller_set_bandwidth(self):
|
||||
def controller_set_chan_width(self):
|
||||
try:
|
||||
print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
|
||||
self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series,
|
||||
@@ -538,8 +550,10 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "channel","--value", self.args.cisco_chan_width],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
print("Controller unable to commicate to AP or unable to communicate to controller error code: {} output {}".
|
||||
format(process_error.returncode, process_error.output))
|
||||
@@ -560,8 +574,10 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "create_wlan","--wlan", self.args.cisco_wlan, "--wlanID", self.args.cisco_wlanID],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
print("Controller unable to commicate to AP or unable to communicate to controller error code: {} output {}".
|
||||
format(process_error.returncode, process_error.output))
|
||||
@@ -582,6 +598,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "wireless_tag_policy"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -604,6 +621,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "enable_wlan"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -626,6 +644,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "enable_network_5ghz"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -647,6 +666,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "enable_network_24ghz"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -669,6 +689,7 @@ class L3VariableTime(LFCliBase):
|
||||
"--action", "enable"],
|
||||
capture_output=self.args.cap_ctl_out, check=True)
|
||||
|
||||
if self.args.cap_ctl_out:
|
||||
pss = ctl_output.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
@@ -795,8 +816,8 @@ class L3VariableTime(LFCliBase):
|
||||
print("testing dfs")
|
||||
self.controller_show_ap_channel()
|
||||
self.controller_disable_ap()
|
||||
self.controller_set_channel_ap()
|
||||
self.controller_set_chan_width_ap()
|
||||
self.controller_set_channel()
|
||||
self.controller_set_chan_width()
|
||||
self.controller_enable_ap()
|
||||
self.verify_cac_on_ap()
|
||||
self.lf_hackrf_enable()
|
||||
@@ -820,8 +841,8 @@ class L3VariableTime(LFCliBase):
|
||||
if self.args.cisco_channel == None:
|
||||
return
|
||||
self.controller_disable_ap()
|
||||
self.controller_set_channel_ap()
|
||||
self.controller_set_chan_width_ap()
|
||||
self.controller_set_channel()
|
||||
self.controller_set_chan_width()
|
||||
self.controller_enable_ap()
|
||||
self.controller_show_ap_channel()
|
||||
# need to actually check the CAC timer
|
||||
|
||||
Reference in New Issue
Block a user