mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
adding support for different series of cisco controllers
This commit is contained in:
@@ -93,6 +93,7 @@ def usage():
|
||||
print("-c|--channel: List of channels, with optional path-loss to test: 36:64 100:60")
|
||||
print("-n|--nss: List of spatial streams to test: 1 2 3 4")
|
||||
print("-T|--txpower: List of TX power values to test: 1 2 3 4 5 6 7 8")
|
||||
print("--series: 9800 the default is 3504")
|
||||
print("--outfile: Write results here.")
|
||||
print("--station: LANforge station name (sta00000)")
|
||||
print("--upstream_port: LANforge upstream port name (eth1)")
|
||||
@@ -148,6 +149,7 @@ def main():
|
||||
parser.add_argument("-n", "--nss", type=str, help="List of spatial streams to test. NA means no change")
|
||||
parser.add_argument("-T", "--txpower", type=str, help="List of txpowers to test. NA means no change")
|
||||
|
||||
parser.add_argument("--series", type=str, help="--series 9800 , defaults to 3504",default="3504")
|
||||
parser.add_argument("--upstream_port", type=str, help="LANforge upsteram-port to use (eth1, etc)")
|
||||
parser.add_argument("--station", type=str, help="LANforge station to use (sta0000, etc)")
|
||||
parser.add_argument("--lfmgr", type=str, help="LANforge Manager IP address")
|
||||
@@ -193,6 +195,7 @@ def main():
|
||||
pf_dbm = args.pf_dbm
|
||||
if (args.pf_a4_dropoff != None):
|
||||
pf_a4_dropoff = args.pf_p4_dropoff
|
||||
|
||||
filehandler = None
|
||||
except Exception as e:
|
||||
logging.exception(e);
|
||||
@@ -381,7 +384,7 @@ def main():
|
||||
|
||||
myrd = ""
|
||||
advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "summary"], capture_output=True)
|
||||
"--action", "summary","--series",args.series], capture_output=True)
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore');
|
||||
print(pss)
|
||||
|
||||
@@ -448,9 +451,9 @@ def main():
|
||||
|
||||
# Disable AP, apply settings, enable AP
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "disable"])
|
||||
"--action", "disable","--series",args.series])
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "cmd", "--value", "config 802.11a disable network"])
|
||||
"--action", "cmd", "--value", "config 802.11a disable network","--series",args.series])
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "cmd", "--value", "config 802.11b disable network"])
|
||||
|
||||
@@ -466,7 +469,7 @@ def main():
|
||||
if (ch != "NA"):
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "channel", "--value", ch])
|
||||
|
||||
# disables transmission for the entier 802.11z network
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "cmd", "--value", "config 802.11a enable network"])
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
@@ -475,10 +478,11 @@ def main():
|
||||
"--action", "enable"])
|
||||
|
||||
# Wait a bit for AP to come back up
|
||||
time.sleep(1);
|
||||
time.sleep(1)
|
||||
|
||||
advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "advanced"], capture_output=True)
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore');
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
searchap = False
|
||||
|
||||
@@ -248,7 +248,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "summary"], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series,"--action", "summary"], capture_output=True)
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -273,7 +273,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
def controller_show_ap_channel(self):
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "ap_channel"], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "ap_channel"], capture_output=True)
|
||||
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
@@ -302,7 +302,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
#(Cisco Controller) >config 802.11a disable APA453.0E7B.CF9C
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "disable","--band",self.args.cisco_band], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "disable","--band",self.args.cisco_band], capture_output=True)
|
||||
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
@@ -311,7 +311,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
#(Cisco Controller) >config 802.11a channel ap APA453.0E7B.CF9C 52
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "channel","--value",self.args.cisco_channel], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "channel","--value",self.args.cisco_channel], capture_output=True)
|
||||
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
@@ -322,7 +322,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
cisco_channel_36 = "36"
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "channel","--value",cisco_channel_36], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "channel","--value",cisco_channel_36], capture_output=True)
|
||||
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
@@ -332,7 +332,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
#(Cisco Controller) >config 802.11a chan_width APA453.0E7B.CF9C 20
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "bandwidth","--value",self.args.cisco_chan_width], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "bandwidth","--value",self.args.cisco_chan_width], capture_output=True)
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -341,7 +341,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
||||
#(Cisco Controller) >config 802.11a enable APA453.0E7B.CF9C
|
||||
advanced = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", "ssh", "-d", self.args.cisco_ctlr, "-u",
|
||||
self.args.cisco_user, "-p", self.args.cisco_passwd,
|
||||
"-a", self.args.cisco_ap, "--action", "enable","--band",self.args.cisco_band], capture_output=True)
|
||||
"-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--action", "enable","--band",self.args.cisco_band], capture_output=True)
|
||||
pss = advanced.stdout.decode('utf-8', 'ignore')
|
||||
print(pss)
|
||||
|
||||
@@ -738,6 +738,7 @@ python3 test_l3_longevity.py --cisco_ctlr 192.168.100.112 --cisco_dfs True --mgr
|
||||
parser.add_argument('--cisco_channel', help='--cisco_channel <channel>',default=None)
|
||||
parser.add_argument('--cisco_chan_width', help='--cisco_chan_width <20 40 80 160>',default="20",choices=["20","40","80","160"])
|
||||
parser.add_argument('--cisco_band', help='--cisco_band <a | b | abgn>',default="a",choices=["a", "b", "abgn"])
|
||||
parser.add_argument('--cisco_series', help='--cisco_series <9800 | 3504>',default="3504",choices=["9800","3504"])
|
||||
|
||||
parser.add_argument('--amount_ports_to_reset', help='--amount_ports_to_reset \"<min amount ports> <max amount ports>\" ', default=None)
|
||||
parser.add_argument('--port_reset_seconds', help='--ports_reset_seconds \"<min seconds> <max seconds>\" ', default="10 30")
|
||||
|
||||
Reference in New Issue
Block a user