cc_module_9800_3504.py : dual-band bring up

cc_module_test.py : dual-band bring up
lf_tx_power.py : comments

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2022-04-06 16:23:53 -06:00
committed by shivam
parent 07e6da3aa6
commit baa70e879d
4 changed files with 165 additions and 64 deletions

View File

@@ -197,9 +197,9 @@ class create_controller_series_object:
elif self.band == '6g':
self.ap_band_slot = self.ap_band_slot_6g
elif self.band == 'dual_band_5g':
self.ap_band_slot = self.ap_band_slot_dual_band_5g
self.ap_band_slot = self.ap_dual_band_slot_5g
elif self.band == 'dual_band_6g':
self.ap_band_slot = self.ap_band_slot_dual_band_6g
self.ap_band_slot = self.ap_dual_band_slot_6g
# if self.ap_band_slot is None:
# logger.critical("ap_band_slot_6g needs to be set to 2 or 3")

View File

@@ -36,6 +36,8 @@ import argparse
import logging
import importlib
import os
from time import sleep
sys.path.append(os.path.join(os.path.abspath(__file__ + "././")))
@@ -310,69 +312,148 @@ class create_module_test_object:
self.cs.line_console_0()
# summary
self.cs.show_ap_summary()
# Disable AP, apply settings, enable AP
self.cs.show_ap_dot11_6gz_shutdown()
self.cs.show_ap_dot11_5gz_shutdown()
self.cs.show_ap_dot11_24gz_shutdown()
# set the dual-band slot
self.cs.ap_dual_band_slot_6g = '2'
# configure dual-band to be 6G
# disable dual-band mode
if self.cs.band == "dual_band_6g":
logger.info("ap_dot11_dual_band_mode_shutdown_6ghz")
self.cs.ap_dot11_dual_band_mode_shutdown_6ghz()
elif self.cs.band == "dual_band_5g":
logger.info("ap_dot11_dual_band_mode_shutdown_6ghz")
self.cs.ap_dot11_dual_band_mode_shutdown_5ghz()
# disable_wlan
self.cs.wlan_shutdown()
# disable_network_6ghz
self.cs.ap_dot11_6ghz_shutdown()
# disable_network_5ghz
self.cs.ap_dot11_5ghz_shutdown()
# disable_network_24ghz
self.cs.ap_dot11_24ghz_shutdown()
# manual
self.cs.ap_dot11_6ghz_radio_role_manual_client_serving()
self.cs.ap_dot11_5ghz_radio_role_manual_client_serving()
self.cs.ap_dot11_24ghz_radio_role_manual_client_serving()
# ap name APCC9C.3EF4.E0B0 dot11 dual-band slot 2 band 6ghz
# % Error: AP APCC9C.3EF4.E0B0 Slot 2 - Failed to change band, Radio role selection is not Manual
# set the radio role selection
if self.cs.band == 'dual_band_6g':
logger.info("ap_dot11_dual_band_6ghz_radio_role_manual_client_serving")
self.cs.ap_dot11_dual_band_6ghz_radio_role_manual_client_serving()
elif self.cs.band == 'dual_band_5g':
logger.info("ap_dot11_dual_band_5ghz_radio_role_manual_client_serving")
self.cs.ap_dot11_dual_band_5ghz_radio_role_manual_client_serving()
elif self.cs.band == '6g':
self.cs.ap_dot11_6ghz_radio_role_manual_client_serving()
# self.cs.ap_dot11_5ghz_radio_role_manual_client_serving()
# self.cs.ap_dot11_24ghz_radio_role_manual_client_serving()
# Configuration for 6g
# config dual-band mode
if self.cs.band == "dual_band_6g":
logger.info("config_ap_dot11_dual_band_to_6ghz")
self.cs.config_ap_dot11_dual_band_to_6ghz()
elif self.cs.band == "dual_band_5g":
logger.info("config_ap_dot11_dual_band_to_5ghz")
self.cs.config_ap_dot11_dual_band_to_5ghz
# enable dual-band mode
if self.cs.band == "dual_band_6g":
logger.info("ap_dot11_dual_band_no_mode_shutdown_6ghz")
self.cs.ap_dot11_dual_band_no_mode_shutdown_6ghz()
elif self.cs.band == "dual_band_5g":
logger.info("ap_dot11_dual_band_no_mode_shutdown_5ghz")
self.cs.ap_dot11_dual_band_no_mode_shutdown_5ghz()
# Configuration for 6g
# txPower
# TODO is this still needed
self.cs.config_dot11_6ghz_tx_power()
self.cs.bandwidth = '20'
# bandwidth (to set to 20 if channel change does not support)
self.cs.config_dot11_6ghz_channel_width()
self.cs.channel = '1'
logger.info("config_dot11_dual_band_6ghz_tx_power")
self.cs.config_dot11_dual_band_6ghz_tx_power()
# channel
self.cs.config_dot11_6ghz_channel()
self.cs.channel = '1'
logger.info("config_dot11_dual_band_6ghz_channel")
self.cs.config_dot11_dual_band_6ghz_channel()
self.cs.bandwidth = '40'
# bandwidth
self.cs.config_dot11_6ghz_channel_width()
self.cs.bandwidth = '20'
self.cs.config_dot11_dual_band_6ghz_channel_width()
# show_wlan_summary
self.cs.show_wlan_summary()
# delete_wlan
# TODO (there were two in tx_power the logs)
# need to check if wlan present
# delete wlan
self.cs.config_no_wlan()
# create_wlan_wpa3
self.cs.config_wlan_wpa3()
# wireless_tag_policy
self.cs.config_wireless_tag_policy_and_policy_profile()
# enable_wlan
self.cs.config_enable_wlan_send_no_shutdown()
# enable_network_5ghz
self.cs.config_no_ap_dot11_6ghz_shutdown()
# enable_network_24ghz
# self.cs.config_no_ap_dot11_5ghz_shutdown()
# enable
self.cs.config_ap_no_dot11_6ghz_shutdown()
# config_ap_no_dot11_24ghz_shutdown
# advanced
self.cs.show_ap_dot11_6gz_summary()
# enable_network_6ghz or enable_network_5ghz or enable_network_24ghz
if self.cs.band == 'dual_band_6g':
# enable 6g wlan
logger.info("config_no_ap_dot11_dual_band_6ghz_shutdown")
pss = self.cs.config_no_ap_dot11_dual_band_6ghz_shutdown()
logger.info(pss)
# enable 6g operation status
pss = self.cs.config_ap_no_dot11_dual_band_6ghz_shutdown()
logger.info(pss)
elif self.cs.band == 'dual_band_5g':
# enable 5g wlan
pss = self.cs.config_no_ap_dot11_dual_band_5ghz_shutdown()
logger.info(pss)
# enable 5g operation status
pss = self.cs.config_ap_no_dot11_dual_band_5ghz_shutdown()
logger.info(pss)
elif self.cs.band == '6g':
# enable 6g wlan
pss = self.cs.config_no_ap_dot11_6ghz_shutdown()
logger.info(pss)
# enable 6g operation status
pss = self.cs.config_ap_no_dot11_6ghz_shutdown()
logger.info(pss)
# 6g needs to see the 5g bands
elif self.cs.band == '5g' or self.cs.band == '6g' or self.cs.band == 'dual_band_6g':
# enable 5g wlan
pss = self.cs.config_no_ap_dot11_5ghz_shutdown()
logger.info(pss)
# enable 5g operation status
pss = self.cs.config_ap_no_dot11_5ghz_shutdown()
logger.info(pss)
elif self.cs.band == '24g':
# enable wlan 24ghz
pss = self.cs.config_no_ap_dot11_24ghz_shutdown()
logger.info(pss)
# enable 24ghz operation status
self.cs.config_ap_no_dot11_24ghz_shutdown()
logger.info(pss)
if self.cs.band == 'dual_band_6g':
pss = self.cs.show_ap_dot11_dual_band_6gz_summary()
logger.info("show ap dot11 dual-band (6ghz) summary")
logger.info("ap: {ap} ap_band_slot_6g: {slot} ".format(ap=self.cs.ap, slot=self.cs.ap_band_slot))
logger.info(pss)
elif self.cs.band == 'dual_band_5g':
pss = self.cs.show_ap_dot11_dual_band_5gz_summary()
logger.info("show ap dot11 dual-band (5ghz) summary")
logger.info("ap: {ap} ap_band_slot_5g: {slot} ".format(ap=self.cs.ap, slot=self.cs.ap_band_slot_5g))
logger.info(pss)
elif self.cs.band == '6g':
pss = self.cs.show_ap_dot11_6gz_summary()
logger.info("show ap dot11 6ghz summary")
logger.info("ap: {ap} ap_band_slot_6g: {slot} ".format(ap=self.cs.ap, slot=self.cs.ap_band_slot_6g))
logger.info(pss)
elif self.cs.band == '5g':
logger.info("show ap dot11 5ghz summary")
logger.info("ap: {ap} ap_band_slot_5g: {slot} ".format(ap=self.cs.ap, slot=self.cs.ap_band_slot_5g))
pss = self.cs.show_ap_dot11_5gz_summary()
logger.info(pss)
else:
logger.info("show ap dot11 24ghz summary")
logger.info("ap: {ap} ap_band_slot_24g: {slot} ".format(ap=self.cs.ap, slot=self.cs.ap_band_slot_24g))
pss = self.cs.show_ap_dot11_24gz_summary()
logger.info(pss)
# Temporary Work around
# disable the AP for 6g and enable
if self.cs.band == '6g':
self.cs.ap_name_shutdown()
sleep(5)
self.cs.ap_name_no_shutdown()
# show_wlan_summary
self.cs.show_wlan_summary()
def test_config_tx_power_6g_wpa3(self):
# TODO : leave for now for reference
# WLC1#show ap summary
@@ -1112,6 +1193,8 @@ INCLUDE_IN_README
# set up logger
logger_config = lf_logger_config.lf_logger_config()
logger_config.set_level('debug')
# dynamic import of the controller module
# 'cc_module_9800_3504'
series = importlib.import_module(args.module)
@@ -1139,7 +1222,9 @@ INCLUDE_IN_README
# mt.test_config_tx_power_5g_wpa2_AP3()
mt.test_config_tx_power_6g_wpa3_AP4()
# mt.test_config_tx_power_6g_wpa3_AP4()
mt.test_config_tx_power_dual_band_6g_wpa3()
# mt.test_config_tx_power_6g_wpa3_attempt2()

View File

@@ -1097,7 +1097,6 @@ def main():
elif args.band == '6g':
cs.ap_dot11_6ghz_shutdown()
# There is only 3 slots on 6g and dualband
cs.ap_dot11_5ghz_shutdown()
cs.ap_dot11_24ghz_shutdown()
@@ -1121,7 +1120,7 @@ def main():
if (tx != "NA"):
logg.info("9800/3504 test_parameters: set txPower: {tx_power}".format(tx_power=tx))
cs.tx_power = tx
if args.band == 'dual_band_6g':
cs.config_dot11_dual_band_6ghz_tx_power()
elif args.band == 'dual_band_5g':
@@ -2371,8 +2370,6 @@ def main():
elif args.band == 'dual_band_5g':
pss = cs.ap_dot11_dual_band_5ghz_shutdown()
logg.info(pss)
# Assume on non dual-band AP 9136 , yet 6164 does not support 6g
# TODO pass in AP model
else:
pss = cs.ap_dot11_6ghz_shutdown()
logg.info(pss)

View File

@@ -165,12 +165,12 @@ def main():
"enable_operation_status", "disable_operation_status", "summary", "advanced",
"cmd", "txPower", "bandwidth", "manual", "auto", "no_wlan", "show_ap_wlan_summary", "show_wlan_summary", "show_radio",
"ap_channel", "auto_rf", "channel", "show", "create_wlan", "create_wlan_wpa2", "create_wlan_wpa3", "enable_wlan", "disable_wlan", "wlan_qos",
"disable_dual_band_network_6ghz","disable_dual_band_network_5ghz","disable_network_6ghz", "disable_network_5ghz", "disable_network_24ghz",
"enable_dual_band_network_6ghz","enable_dual_band_network_5ghz","enable_network_6ghz", "enable_network_5ghz", "enable_network_24ghz",
"disable_network_dual_band_6ghz","disable_network_dual_band_5ghz","disable_network_6ghz", "disable_network_5ghz", "disable_network_24ghz",
"enable_network_dual_band_6ghz","enable_network_dual_band_5ghz","enable_network_6ghz", "enable_network_5ghz", "enable_network_24ghz",
"wireless_tag_policy", "no_wlan_wireless_tag_policy", "delete_wlan",
"show_ap_bssid_dual_band_6g", "show_ap_bssid_dual_band_5g", "show_ap_bssid_6g", "show_ap_bssid_5g", "show_ap_bssid_24g",
"11r_logs", "enable_ft_akm_ftpsk", "enable_ftotd_akm_ftpsk",
"config_dual_band_mode"])
"config_dual_band_mode","dual_band_no_mode_shutdown","dual_band_mode_shutdown"])
parser.add_argument("--value", type=str, help="set value")
# logging configuration
parser.add_argument(
@@ -1116,7 +1116,7 @@ def main():
if (args.action == "manual"):
if args.series == "9800":
if band == "dual_band_6g" or band == "dual_band_5g":
command = "ap name %s dot11 dual-band slot %s radio role manual client-serving" % (args.ap, args.ap_band_slot)
command = "ap name %s dot11 dual-band slot %s role manual client-serving" % (args.ap, args.ap_band_slot)
elif band == "6g":
command = "ap name %s dot11 6ghz slot %s radio role manual client-serving" % (args.ap, args.ap_band_slot)
elif band == '5g':
@@ -1137,8 +1137,23 @@ def main():
else:
command = "ap name %s dot11 24ghz slot %s radio role auto" % (args.ap, args.ap_band_slot)
# TODO Check if dual-band is separate
if (args.action == "disable_network_6ghz" or args.action == 'disable_network_dual_band_6ghz'):
if (args.action == "disable_network_dual_band_5ghz" or args.action == 'disable_network_dual_band_6ghz'):
if args.series == "9800":
command = "ap name %s dot11 dual-band slot %s shutdown" % (args.ap, args.ap_band_slot)
egg.sendline(command)
sleep(0.1)
i = egg.expect_exact(["Are you sure you want to continue? (y/n)[y]:", pexpect.TIMEOUT], timeout=timeout)
if i == 0:
logg.info("did get Are you sure you want to continue? (y/n)[y]:")
egg.sendline("y")
sleep(0.5)
if i == 1:
logg.info("did not get Are you sure you want to continue? (y/n)[y]:")
egg.sendline("y")
sleep(0.5)
if (args.action == "disable_network_6ghz"):
if args.series == "9800":
egg.sendline("config t")
sleep(0.1)
@@ -1159,7 +1174,7 @@ def main():
if i == 1:
logg.info("timed out on (config)# disable_network_6ghz")
if (args.action == "disable_network_5ghz" or args.action == "disable_network_dual_band_5ghz"):
if (args.action == "disable_network_5ghz"):
if args.series == "9800":
egg.sendline("config t")
sleep(0.1)
@@ -1207,7 +1222,11 @@ def main():
logg.info("3504 disable_network_24ghz")
command = 'config 802.11a disable network'
if (args.action == "enable_network_6ghz" or args.action == "enable_network_dual_band_6ghz"):
if (args.action == "enable_network_dual_band_5ghz" or args.action == "enable_network_dual_band_6ghz"):
if args.series == "9800":
command = "ap name %s no dot11 dual-band slot %s shutdown" % (args.ap, args.ap_band_slot)
if (args.action == "enable_network_6ghz"):
if args.series == "9800":
egg.sendline("config t")
sleep(0.1)
@@ -1218,7 +1237,7 @@ def main():
if i == 1:
logg.info("timed out on (config) prompt")
if (args.action == "enable_network_5ghz" or args.action == "enable_network_dual_band_5ghz"):
if (args.action == "enable_network_5ghz"):
if args.series == "9800":
egg.sendline("config t")
sleep(0.1)
@@ -1263,7 +1282,7 @@ def main():
if (args.action == "dual_band_mode_shutdown" and (args.ap is None or args.ap_band_slot is None)):
raise Exception("action requires AP name and ap band slot")
if (args.action == "dual_band_mode_shutdown"):
logg.info("command: ap name %s dot11 dual-band shutdown , slot %s : %s " % (args.ap, band, args.ap_band_slot, band))
logg.info("command: ap name %s dot11 dual-band shutdown , slot %s : %s " % (args.ap, args.ap_band_slot, band))
if args.series == "9800":
if band == "dual_band_6g":
@@ -1275,7 +1294,7 @@ def main():
if (args.action == "dual_band_no_mode_shutdown" and (args.ap is None or args.ap_band_slot is None)):
raise Exception("action requires AP name and ap band slot")
if (args.action == "dual_band_no_mode_shutdown"):
logg.info("command: ap name %s no dot11 dual-band shutdown , slot %s : %s " % (args.ap, band, args.ap_band_slot, band))
logg.info("command: ap name %s no dot11 dual-band shutdown , slot %s : %s " % (args.ap, args.ap_band_slot, band))
if args.series == "9800":
if band == "dual_band_6g":
@@ -1288,7 +1307,7 @@ def main():
if (args.action == "config_dual_band_mode" and (args.ap is None or args.ap_band_slot is None)):
raise Exception("action requires AP name and ap band slot")
if (args.action == "config_dual_band_mode"):
logg.info("send command to set the dual band mode : ap name %s no dot11 dual-ban slot %s : %s " % (args.ap, band, args.ap_band_slot, band))
logg.info("send command to set the dual band mode : ap name %s no dot11 dual-ban slot %s : %s " % (args.ap, args.ap_band_slot, band))
if args.series == "9800":
if band == "dual_band_6g":