mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
lf_tx_power.py : comments around the work around for side B going from
1000000 to zero. Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
committed by
shivam
parent
ddf803c350
commit
6bf4d1054f
100
lf_tx_power.py
100
lf_tx_power.py
@@ -346,8 +346,6 @@ def close_workbook(workbook):
|
||||
workbook.close()
|
||||
sleep(0.5)
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
global lfmgr
|
||||
global lfstation
|
||||
@@ -1003,20 +1001,16 @@ def main():
|
||||
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "do_cmd",
|
||||
"--cmd", "rm_endp c-udp-power-B"], capture_output=False)
|
||||
|
||||
# Now, create the new connection
|
||||
#
|
||||
# higher is better because it means more frames at the signal level to be measured vs leaked frames at low signal lev
|
||||
# subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_endp", "--port_name", lfstation,
|
||||
# "--endp_type", "lf_udp", "--endp_name", "c-udp-power-A", "--speed", "0", "--report_timer", "1000"], capture_output=False)
|
||||
|
||||
# subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "create_endp", "--port_name", upstream_port,
|
||||
# "--endp_type", "lf_udp", "--endp_name", "c-udp-power-B", "--speed", "1000000", "--report_timer", "1000"], capture_output=False)
|
||||
|
||||
|
||||
# subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_cx", "--cx_name", "c-udp-power",
|
||||
# "--cx_endps", "c-udp-power-A,c-udp-power-B", "--report_timer", "1000"], capture_output=False)
|
||||
|
||||
################################ Start When work around fixed then only need these creation step ###############################
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_endp", "--port_name", lfstation,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-A", "--speed", "0", "--report_timer", "1000"], capture_output=False)
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "create_endp", "--port_name", upstream_port,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-B", "--speed", "1000000", "--report_timer", "1000"], capture_output=False)
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_cx", "--cx_name", "c-udp-power",
|
||||
"--cx_endps", "c-udp-power-A,c-udp-power-B", "--report_timer", "1000"], capture_output=False)
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_endp", "--port_name", lfstation,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-A", "--speed", "0", "--report_timer", "1000"]
|
||||
logg.info("command: {command}".format(command=command))
|
||||
@@ -1050,6 +1044,7 @@ def main():
|
||||
summary_output += line
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
################################ ^^ End When work around fixed then only need these creation step ###############################
|
||||
|
||||
|
||||
# Notes:
|
||||
@@ -1304,32 +1299,32 @@ def main():
|
||||
|
||||
# Stop traffic , if traffic was running , this is on the lanforge side. Commands that start with lf_ are directed
|
||||
# towards the lanforge
|
||||
# subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "do_cmd",
|
||||
# "--cmd", "set_cx_state all c-udp-power STOPPED"], capture_output=True)
|
||||
# command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "do_cmd",
|
||||
# "--cmd", "set_cx_state all c-udp-power STOPPED"]
|
||||
# summary_output = ''
|
||||
# summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
# for line in iter(summary.stdout.readline, ''):
|
||||
# logger.debug(line)
|
||||
# summary_output += line
|
||||
# summary.wait()
|
||||
# logger.info(summary_output)
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "do_cmd",
|
||||
"--cmd", "set_cx_state all c-udp-power STOPPED"], capture_output=True)
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "do_cmd",
|
||||
"--cmd", "set_cx_state all c-udp-power STOPPED"]
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
for line in iter(summary.stdout.readline, ''):
|
||||
logger.debug(line)
|
||||
summary_output += line
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
|
||||
# Down station
|
||||
# port_stats = subprocess.run(["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation,
|
||||
# "--set_ifstate", "down"])
|
||||
# CMR TODO this looks to be an issue
|
||||
# command = ["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation,
|
||||
# "--set_ifstate", "down"]
|
||||
# summary_output = ''
|
||||
# summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
# for line in iter(summary.stdout.readline, ''):
|
||||
# logger.debug(line)
|
||||
# summary_output += line
|
||||
# summary.wait()
|
||||
# logger.info(summary_output)
|
||||
command = ["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation,
|
||||
"--set_ifstate", "down"]
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
for line in iter(summary.stdout.readline, ''):
|
||||
logger.debug(line)
|
||||
summary_output += line
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
cs.show_ap_summary()
|
||||
|
||||
@@ -1908,7 +1903,8 @@ def main():
|
||||
pss = cs.show_ap_bssid_24ghz()
|
||||
logg.info(pss)
|
||||
|
||||
|
||||
####################### Start Work Around Part 1 #########################
|
||||
# TO DO this is part of the work around may not be needed
|
||||
# Create downstream connection
|
||||
# First, delete any old one
|
||||
# Note this code is duplicated later as a work around for the
|
||||
@@ -1921,10 +1917,10 @@ def main():
|
||||
|
||||
subprocess.run(["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "do_cmd",
|
||||
"--cmd", "rm_endp c-udp-power-B"], capture_output=False)
|
||||
|
||||
|
||||
# set speed
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_endp", "--port_name", lfstation,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-A", "--speed", "0", "--report_timer", "1000"]
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-A", "--speed", "0", "--report_timer", "1000"]
|
||||
logg.info("command: {command}".format(command=command))
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
@@ -1935,7 +1931,7 @@ def main():
|
||||
logger.info(summary_output)
|
||||
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "create_endp", "--port_name", upstream_port,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-B", "--speed", "1000000", "--report_timer", "1000"]
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-B", "--speed", "1000000", "--report_timer", "1000"]
|
||||
logg.info("command: {command}".format(command=command))
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
@@ -1946,8 +1942,8 @@ def main():
|
||||
logger.info(summary_output)
|
||||
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource, "--action", "create_cx", "--cx_name", "c-udp-power",
|
||||
"--cx_endps", "c-udp-power-A,c-udp-power-B", "--report_timer", "1000", "--endp_type", "lf_udp", "--port_name", lfstation,
|
||||
"--speed","1000000"]
|
||||
"--cx_endps", "c-udp-power-A,c-udp-power-B", "--report_timer", "1000", "--endp_type", "lf_udp", "--port_name", lfstation,
|
||||
"--speed","1000000"]
|
||||
logg.info("command: {command}".format(command=command))
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
@@ -1957,15 +1953,17 @@ def main():
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
# command = ["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation,
|
||||
# "--set_ifstate", "up"]
|
||||
# summary_output = ''
|
||||
# summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
# for line in iter(summary.stdout.readline, ''):
|
||||
# logger.debug(line)
|
||||
# summary_output += line
|
||||
# summary.wait()
|
||||
# logger.info(summary_output)
|
||||
command = ["./lf_portmod.pl", "--manager", lfmgr, "--card", lfresource, "--port_name", lfstation,
|
||||
"--set_ifstate", "up"]
|
||||
summary_output = ''
|
||||
summary = subprocess.Popen(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
for line in iter(summary.stdout.readline, ''):
|
||||
logger.debug(line)
|
||||
summary_output += line
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
######################## End Work Around Part 1 ##################################
|
||||
|
||||
|
||||
|
||||
@@ -1988,7 +1986,9 @@ def main():
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
# Config Speed on B after start
|
||||
|
||||
###################### Start Work Around Part 2 ############################
|
||||
# Config Speed on B after start <-- work around for Min Tx Rate being zero
|
||||
command = ["./lf_firemod.pl", "--manager", lfmgr, "--resource", lfresource2, "--action", "create_endp", "--port_name", upstream_port,
|
||||
"--endp_type", "lf_udp", "--endp_name", "c-udp-power-B", "--speed", "1000000", "--report_timer", "1000"]
|
||||
logg.info("command: {command}".format(command=command))
|
||||
@@ -1999,7 +1999,7 @@ def main():
|
||||
summary_output += line
|
||||
summary.wait()
|
||||
logger.info(summary_output)
|
||||
|
||||
###################### End Work Around Part 2 ######################
|
||||
|
||||
# Wait configured number of seconds more seconds
|
||||
logg.info("Waiting {} seconds to let traffic run for a bit, Channel {} NSS {} BW {} TX-Power {}".format(args.duration, ch, n, bw, tx))
|
||||
|
||||
Reference in New Issue
Block a user