mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
cisco_wifi_ctt.py , lf_cisco_power.py : needed to add following commands to the controller
"wireless tag policy default-policy-tag","no wlan open-wlan policy default-policy-profile"
This commit is contained in:
@@ -111,7 +111,7 @@ def main():
|
||||
"cmd", "txPower", "bandwidth", "manual", "auto","no_wlan","show_wlan_summary",
|
||||
"ap_channel", "channel", "show", "create_wlan", "enable_wlan", "disable_wlan", "wlan_qos",
|
||||
"disable_network_5ghz","disable_network_24ghz","enable_network_5ghz","enable_network_24ghz",
|
||||
"wireless_tag_policy"])
|
||||
"wireless_tag_policy","no_wlan_wireless_tag_policy"])
|
||||
parser.add_argument("--value", type=str, help="set value")
|
||||
|
||||
args = None
|
||||
@@ -1083,6 +1083,24 @@ def main():
|
||||
else:
|
||||
command = "show ap channel %s"%(args.ap)
|
||||
|
||||
if (args.action == "no_wlan_wireless_tag_policy"):
|
||||
logg.info("send wireless tag policy no wlan")
|
||||
egg.sendline("config t")
|
||||
sleep(0.1)
|
||||
i = egg.expect_exact(["(config)#",pexpect.TIMEOUT],timeout=2)
|
||||
if i == 0:
|
||||
for command in ["wireless tag policy default-policy-tag","no wlan open-wlan policy default-policy-profile"]:
|
||||
egg.sendline(command)
|
||||
sleep(1)
|
||||
j = egg.expect_exact(["(config-policy-tag)#",pexpect.TIMEOUT],timeout=2)
|
||||
if j == 0:
|
||||
logg.info("command sent: {}".format(command))
|
||||
if j == 1:
|
||||
logg.info("timed out on command prompt (config-policy-tag)# for command {}".format(command))
|
||||
if i == 1:
|
||||
logg.info("did not get the (config)# prompt")
|
||||
|
||||
|
||||
if (args.action == "wireless_tag_policy"):
|
||||
logg.info("send wireless tag policy")
|
||||
egg.sendline("config t")
|
||||
|
||||
@@ -1496,14 +1496,13 @@ def main():
|
||||
if args.series == "9800":
|
||||
|
||||
try:
|
||||
logg.info("9800 cisco_wifi_ctl.py: wireless_tag_policy")
|
||||
logg.info("9800 cisco_wifi_ctl.py: no_wlan_wireless_tag_policy")
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
"--action", "wireless_tag_policy","--series",args.series,"--port", args.port], capture_output=cap_ctl_out, check=True)
|
||||
"--action", "no_wlan_wireless_tag_policy","--series",args.series,"--port", args.port], capture_output=cap_ctl_out, check=True)
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
logg.info("Controller unable to commicate to AP or unable to communicate to controller error code: {} output {}".format(process_error.returncode, process_error.output))
|
||||
exit_test(workbook)
|
||||
|
||||
|
||||
try:
|
||||
logg.info("9800 cisco_wifi_ctl.py: delete_wlan")
|
||||
subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band,
|
||||
|
||||
Reference in New Issue
Block a user