mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-20 12:04:52 +00:00
lf_tx_power.py : autopep8 updates
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
committed by
shivam
parent
b47b5dc09b
commit
00c3a53af1
@@ -421,7 +421,6 @@ def main():
|
|||||||
parser.add_argument('--tx_power_adjust_6E', action="store_true", help="[test configuration] --power_adjust_6E stores true, 6E: 20 Mhz pw 1-6, 40 Mhz pw 1-7 ")
|
parser.add_argument('--tx_power_adjust_6E', action="store_true", help="[test configuration] --power_adjust_6E stores true, 6E: 20 Mhz pw 1-6, 40 Mhz pw 1-7 ")
|
||||||
# parser.add_argument('--per_ss', action="store_true", help="[test configuration] --per_ss stores true, per spatial stream used in pass fail criteria")
|
# parser.add_argument('--per_ss', action="store_true", help="[test configuration] --per_ss stores true, per spatial stream used in pass fail criteria")
|
||||||
|
|
||||||
|
|
||||||
# test configuration
|
# test configuration
|
||||||
parser.add_argument("--testbed_id", "--test_rig", dest='test_rig', type=str, help="[testbed configuration] --test_rig", default="")
|
parser.add_argument("--testbed_id", "--test_rig", dest='test_rig', type=str, help="[testbed configuration] --test_rig", default="")
|
||||||
parser.add_argument("--testbed_location", dest='testbed_location', type=str, help="[testbed configuration] --testbed_location <from show ap summary Location>", default="default location")
|
parser.add_argument("--testbed_location", dest='testbed_location', type=str, help="[testbed configuration] --testbed_location <from show ap summary Location>", default="default location")
|
||||||
@@ -961,7 +960,7 @@ def main():
|
|||||||
# when using https://regex101.com/ for tool beginning of string begins with ^
|
# when using https://regex101.com/ for tool beginning of string begins with ^
|
||||||
if (searchap):
|
if (searchap):
|
||||||
if args.series == "9800":
|
if args.series == "9800":
|
||||||
pat = "%s\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+%s\\s+(\\S+)" % (args.ap,args.testbed_location)
|
pat = "%s\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+%s\\s+(\\S+)" % (args.ap, args.testbed_location)
|
||||||
else:
|
else:
|
||||||
pat = "%s\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+.* (\\S+)\\s+\\S+\\s*\\S+\\s+\\[" % (args.ap)
|
pat = "%s\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+.* (\\S+)\\s+\\S+\\s*\\S+\\s+\\[" % (args.ap)
|
||||||
m = re.search(pat, line)
|
m = re.search(pat, line)
|
||||||
@@ -1543,7 +1542,6 @@ def main():
|
|||||||
# exit_test(workbook)
|
# exit_test(workbook)
|
||||||
summary = "empty_process_error"
|
summary = "empty_process_error"
|
||||||
|
|
||||||
|
|
||||||
# Gather probe results and record data, verify NSS, BW, Channel
|
# Gather probe results and record data, verify NSS, BW, Channel
|
||||||
i = 0
|
i = 0
|
||||||
beacon_sig = None
|
beacon_sig = None
|
||||||
@@ -1751,7 +1749,6 @@ def main():
|
|||||||
diff_a3 = ""
|
diff_a3 = ""
|
||||||
diff_a4 = ""
|
diff_a4 = ""
|
||||||
|
|
||||||
|
|
||||||
pfs = "PASS"
|
pfs = "PASS"
|
||||||
pfrange = pf_dbm
|
pfrange = pf_dbm
|
||||||
|
|
||||||
@@ -1764,7 +1761,6 @@ def main():
|
|||||||
w_tot = "Info: Controller dBm and Calculated dBm power different by greater than +/- {} dBm".format(
|
w_tot = "Info: Controller dBm and Calculated dBm power different by greater than +/- {} dBm".format(
|
||||||
args.pf_dbm) # pass / fail dbm
|
args.pf_dbm) # pass / fail dbm
|
||||||
|
|
||||||
|
|
||||||
logg.info("diff_dbm {} calc_dbm {} - cc_dbmi {}".format(diff_dbm, calc_dbm, cc_dbmi))
|
logg.info("diff_dbm {} calc_dbm {} - cc_dbmi {}".format(diff_dbm, calc_dbm, cc_dbmi))
|
||||||
diff_dbm_beacon = calc_dbm_beacon - cc_dbmi
|
diff_dbm_beacon = calc_dbm_beacon - cc_dbmi
|
||||||
logg.info("diff_dbm_beacon {} calc_dbm_beacon {} - cc_dbmi {}".format(diff_dbm_beacon, calc_dbm_beacon, cc_dbmi))
|
logg.info("diff_dbm_beacon {} calc_dbm_beacon {} - cc_dbmi {}".format(diff_dbm_beacon, calc_dbm_beacon, cc_dbmi))
|
||||||
@@ -1773,7 +1769,6 @@ def main():
|
|||||||
w_tot = "WARN: Controller dBm and Calculated dBm Beacon power different by greater than +/- {} dBm".format(
|
w_tot = "WARN: Controller dBm and Calculated dBm Beacon power different by greater than +/- {} dBm".format(
|
||||||
args.beacon_dbm_diff)
|
args.beacon_dbm_diff)
|
||||||
|
|
||||||
|
|
||||||
# Allowed per path is what we expect the AP should be transmitting at.
|
# Allowed per path is what we expect the AP should be transmitting at.
|
||||||
# calc_ant1 is what we calculated it actually transmitted at based on rssi
|
# calc_ant1 is what we calculated it actually transmitted at based on rssi
|
||||||
# pathloss and antenna gain. Allowed per-path is modified taking into account that multi
|
# pathloss and antenna gain. Allowed per-path is modified taking into account that multi
|
||||||
@@ -1786,7 +1781,7 @@ def main():
|
|||||||
logg.info("(Offset 1) diff_a1 (): {} = calc_ant1: {} - allowed_per_path: {}".format(diff_a1, calc_ant1, allowed_per_path))
|
logg.info("(Offset 1) diff_a1 (): {} = calc_ant1: {} - allowed_per_path: {}".format(diff_a1, calc_ant1, allowed_per_path))
|
||||||
|
|
||||||
# if args.per_ss:
|
# if args.per_ss:
|
||||||
if (abs(diff_a1) > pfrange ):
|
if (abs(diff_a1) > pfrange):
|
||||||
pf = 0
|
pf = 0
|
||||||
if (int(_nss) == 2):
|
if (int(_nss) == 2):
|
||||||
# NSS of 2 means each chain should transmit at 1/2 total power, thus the '- 3'
|
# NSS of 2 means each chain should transmit at 1/2 total power, thus the '- 3'
|
||||||
@@ -2360,7 +2355,6 @@ def main():
|
|||||||
pss = cs.ap_dot11_24ghz_shutdown()
|
pss = cs.ap_dot11_24ghz_shutdown()
|
||||||
logg.info(pss)
|
logg.info(pss)
|
||||||
|
|
||||||
|
|
||||||
if args.band == 'dual_band_6g':
|
if args.band == 'dual_band_6g':
|
||||||
pss = cs.config_dot11_dual_band_6ghz_tx_power()
|
pss = cs.config_dot11_dual_band_6ghz_tx_power()
|
||||||
logg.info(pss)
|
logg.info(pss)
|
||||||
|
|||||||
Reference in New Issue
Block a user