mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	cisco_wifi_ctl.py , lf_cisco_power.py : bug fixes
This commit is contained in:
		| @@ -99,7 +99,6 @@ def main(): | |||||||
|    parser.add_argument("-s", "--scheme",  type=str, choices=["serial", "ssh", "telnet"], help="Connect via serial, ssh or telnet") |    parser.add_argument("-s", "--scheme",  type=str, choices=["serial", "ssh", "telnet"], help="Connect via serial, ssh or telnet") | ||||||
|    parser.add_argument("-t", "--tty",     type=str, help="tty serial device") |    parser.add_argument("-t", "--tty",     type=str, help="tty serial device") | ||||||
|    parser.add_argument("-l", "--log",     type=str, help="logfile for messages, stdout means output to console",default="stdout") |    parser.add_argument("-l", "--log",     type=str, help="logfile for messages, stdout means output to console",default="stdout") | ||||||
|    parser.add_argument("--append",        action='store_true', help="--append  append to logfile file") |  | ||||||
|    #parser.add_argument("-r", "--radio",   type=str, help="select radio") |    #parser.add_argument("-r", "--radio",   type=str, help="select radio") | ||||||
|    parser.add_argument("-w", "--wlan",    type=str, help="wlan name") |    parser.add_argument("-w", "--wlan",    type=str, help="wlan name") | ||||||
|    parser.add_argument("-i", "--wlanID",  type=str, help="wlan ID") |    parser.add_argument("-i", "--wlanID",  type=str, help="wlan ID") | ||||||
| @@ -125,7 +124,6 @@ def main(): | |||||||
|       user = args.user |       user = args.user | ||||||
|       passwd = args.passwd |       passwd = args.passwd | ||||||
|       logfile = args.log |       logfile = args.log | ||||||
|       append  = args.append |  | ||||||
|       if (args.band != None): |       if (args.band != None): | ||||||
|           band = args.band |           band = args.band | ||||||
|           if (band == "abgn"): |           if (band == "abgn"): | ||||||
| @@ -143,10 +141,7 @@ def main(): | |||||||
|    file_handler = None |    file_handler = None | ||||||
|    if (logfile is not None): |    if (logfile is not None): | ||||||
|        if (logfile != "stdout"): |        if (logfile != "stdout"): | ||||||
|            if append: |            file_handler = logging.FileHandler(logfile, "w") | ||||||
|               file_handler = logging.FileHandler(logfile, "a") |  | ||||||
|            else:    |  | ||||||
|               file_handler = logging.FileHandler(logfile, "w") |  | ||||||
|            file_handler.setLevel(logging.DEBUG) |            file_handler.setLevel(logging.DEBUG) | ||||||
|            file_handler.setFormatter(formatter) |            file_handler.setFormatter(formatter) | ||||||
|            logg.addHandler(file_handler) |            logg.addHandler(file_handler) | ||||||
|   | |||||||
| @@ -308,8 +308,7 @@ def main(): | |||||||
|       if (args.pf_a4_dropoff != None): |       if (args.pf_a4_dropoff != None): | ||||||
|           pf_a4_dropoff = args.pf_p4_dropoff |           pf_a4_dropoff = args.pf_p4_dropoff | ||||||
|       if (args.verbose): |       if (args.verbose): | ||||||
|           # capture the controller output , thus won't got to stdout some output always present |           cap_ctl_out     = True | ||||||
|           cap_ctl_out        = True |  | ||||||
|       else: |       else: | ||||||
|           cap_ctl_out     = False  |           cap_ctl_out     = False  | ||||||
|  |  | ||||||
| @@ -615,7 +614,7 @@ def main(): | |||||||
|    try: |    try: | ||||||
|       logg.info("9800/3504 cisco_wifi_ctl.py: summary") |       logg.info("9800/3504 cisco_wifi_ctl.py: summary") | ||||||
|       advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |       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","--series",args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |                                  "--action", "summary","--series",args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|       pss = advanced.stdout.decode('utf-8', 'ignore'); |       pss = advanced.stdout.decode('utf-8', 'ignore'); | ||||||
|       logg.info(pss) |       logg.info(pss) | ||||||
|    except subprocess.CalledProcessError as process_error: |    except subprocess.CalledProcessError as process_error: | ||||||
| @@ -700,7 +699,7 @@ def main(): | |||||||
|                    try: |                    try: | ||||||
|                        logg.info("3504/9800 cisco_wifi_ctl.py: disable AP {}".format(args.ap)) |                        logg.info("3504/9800 cisco_wifi_ctl.py: disable AP {}".format(args.ap)) | ||||||
|                        ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                        ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                        "--action", "disable","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                        "--action", "disable","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                        if cap_ctl_out:    |                        if cap_ctl_out:    | ||||||
|                           pss = ctl_output.stdout.decode('utf-8', 'ignore') |                           pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                           logg.info(pss)  |                           logg.info(pss)  | ||||||
| @@ -715,7 +714,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: disable_wlan") |                           logg.info("9800 cisco_wifi_ctl.py: disable_wlan") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "disable_wlan","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "disable_wlan","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -726,7 +725,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: disable_network_5ghz") |                           logg.info("9800 cisco_wifi_ctl.py: disable_network_5ghz") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "disable_network_5ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "disable_network_5ghz","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -738,7 +737,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: disable_network_24ghz") |                           logg.info("9800 cisco_wifi_ctl.py: disable_network_24ghz") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "disable_network_24ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "disable_network_24ghz","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -750,7 +749,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: manual") |                           logg.info("9800 cisco_wifi_ctl.py: manual") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "manual","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "manual","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -762,7 +761,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a disable network") |                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a disable network") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = 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","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "cmd", "--value", "config 802.11a disable network","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -774,7 +773,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("3504 cisco_wifi_ctl.py: config 802.11b disable network") |                           logg.info("3504 cisco_wifi_ctl.py: config 802.11b disable network") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = 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","--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "cmd", "--value", "config 802.11b disable network","--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           |                           | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
| @@ -790,7 +789,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800/3504 cisco_wifi_ctl.py: txPower {}".format(tx)) |                           logg.info("9800/3504 cisco_wifi_ctl.py: txPower {}".format(tx)) | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                        "--action", "txPower", "--value", tx, "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                        "--action", "txPower", "--value", tx, "--series" , args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -806,7 +805,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800/3504 cisco_wifi_ctl.py: channel {}".format(ch)) |                           logg.info("9800/3504 cisco_wifi_ctl.py: channel {}".format(ch)) | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = 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, "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                        "--action", "channel", "--value", ch, "--series" , args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -820,7 +819,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800/3504 cisco_wifi_ctl.py: bandwidth {}".format(bw)) |                           logg.info("9800/3504 cisco_wifi_ctl.py: bandwidth {}".format(bw)) | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                        "--action", "bandwidth", "--value", bw, "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                        "--action", "bandwidth", "--value", bw, "--series" , args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                              pss = ctl_output.stdout.decode('utf-8', 'ignore') |                              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss)  |                              logg.info(pss)  | ||||||
| @@ -839,7 +838,7 @@ def main(): | |||||||
|                           try: |                           try: | ||||||
|                               logg.info("9800 cisco_wifi_ctl.py: create_wlan wlan {} wlanID {} port {}".format(args.wlan, args.wlanID, args.port)) |                               logg.info("9800 cisco_wifi_ctl.py: create_wlan wlan {} wlanID {} port {}".format(args.wlan, args.wlanID, args.port)) | ||||||
|                               ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                               ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                       "--action", "create_wlan","--series",args.series, "--wlan", args.wlan, "--wlanID", args.wlanID,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)     |                                       "--action", "create_wlan","--series",args.series, "--wlan", args.wlan, "--wlanID", args.wlanID,"--port", args.port  ], capture_output=cap_ctl_out, check=True)     | ||||||
|                               if cap_ctl_out:    |                               if cap_ctl_out:    | ||||||
|                                  pss = ctl_output.stdout.decode('utf-8', 'ignore') |                                  pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                                  logg.info(pss)  |                                  logg.info(pss)  | ||||||
| @@ -851,7 +850,7 @@ def main(): | |||||||
|                           try: |                           try: | ||||||
|                               logg.info("9800 cisco_wifi_ctl.py: wireless_tag_policy") |                               logg.info("9800 cisco_wifi_ctl.py: wireless_tag_policy") | ||||||
|                               ctl_output =subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                               ctl_output =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", "--wlan", args.wlan, "--series", args.series, "--wlanID", args.wlanID, "--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)  |                                       "--action", "wireless_tag_policy", "--wlan", args.wlan, "--series", args.series, "--wlanID", args.wlanID, "--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True)  | ||||||
|                               if cap_ctl_out:    |                               if cap_ctl_out:    | ||||||
|                                  pss = ctl_output.stdout.decode('utf-8', 'ignore') |                                  pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                                  logg.info(pss)  |                                  logg.info(pss)  | ||||||
| @@ -862,7 +861,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: enable_wlan") |                           logg.info("9800 cisco_wifi_ctl.py: enable_wlan") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable_wlan", "--wlan", args.wlan, "--wlanID", args.wlanID, "--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)                  |                                    "--action", "enable_wlan", "--wlan", args.wlan, "--wlanID", args.wlanID, "--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True)                  | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                               pss = ctl_output.stdout.decode('utf-8', 'ignore') |                               pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                               logg.info(pss)  |                               logg.info(pss)  | ||||||
| @@ -876,7 +875,7 @@ def main(): | |||||||
|                        try:   |                        try:   | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: enable_network_5ghz") |                           logg.info("9800 cisco_wifi_ctl.py: enable_network_5ghz") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable_network_5ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)    |                                    "--action", "enable_network_5ghz","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True)    | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                             pss = ctl_output.stdout.decode('utf-8', 'ignore') |                             pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                             logg.info(pss)  |                             logg.info(pss)  | ||||||
| @@ -888,7 +887,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: enable_network_24ghz") |                           logg.info("9800 cisco_wifi_ctl.py: enable_network_24ghz") | ||||||
|                           ctl_output =subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output =subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable_network_24ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)                  |                                    "--action", "enable_network_24ghz","--series",args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True)                  | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                               pss = ctl_output.stdout.decode('utf-8', 'ignore') |                               pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                               logg.info(pss)  |                               logg.info(pss)  | ||||||
| @@ -900,7 +899,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") |                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = 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","--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "cmd", "--value", "config 802.11a enable network","--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                               pss = ctl_output.stdout.decode('utf-8', 'ignore') |                               pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                               logg.info(pss)  |                               logg.info(pss)  | ||||||
| @@ -912,7 +911,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") |                           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") | ||||||
|                           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           ctl_output = 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 enable network","--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "cmd", "--value", "config 802.11b enable network","--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                           if cap_ctl_out:    |                           if cap_ctl_out:    | ||||||
|                               pss = ctl_output.stdout.decode('utf-8', 'ignore') |                               pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                               logg.info(pss)  |                               logg.info(pss)  | ||||||
| @@ -924,7 +923,7 @@ def main(): | |||||||
|                    try:  |                    try:  | ||||||
|                       logg.info("9800/3504 cisco_wifi_ctl.py: enable") |                       logg.info("9800/3504 cisco_wifi_ctl.py: enable") | ||||||
|                       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True) |                                    "--action", "enable", "--series" , args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True) | ||||||
|                       if cap_ctl_out:    |                       if cap_ctl_out:    | ||||||
|                          pss = ctl_output.stdout.decode('utf-8', 'ignore') |                          pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|                          logg.info(pss)  |                          logg.info(pss)  | ||||||
| @@ -945,7 +944,7 @@ def main(): | |||||||
|                           try: |                           try: | ||||||
|                              logg.info("9800 cisco_wifi_ctl.py: advanced") |                              logg.info("9800 cisco_wifi_ctl.py: advanced") | ||||||
|                              advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                              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","--series" , args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |                                                  "--action", "advanced","--series" , args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|                              pss = advanced.stdout.decode('utf-8', 'ignore') |                              pss = advanced.stdout.decode('utf-8', 'ignore') | ||||||
|                              logg.info(pss) |                              logg.info(pss) | ||||||
|                           except subprocess.CalledProcessError as process_error: |                           except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1005,7 +1004,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                           logg.info("9800 cisco_wifi_ctl.py: show_wlan_summary") |                           logg.info("9800 cisco_wifi_ctl.py: show_wlan_summary") | ||||||
|                           wlan_summary = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                           wlan_summary = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                               "--action", "show_wlan_summary","--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=True, check=True) |                                               "--action", "show_wlan_summary","--series" , args.series,"--port", args.port  ], capture_output=True, check=True) | ||||||
|                           pss = wlan_summary.stdout.decode('utf-8', 'ignore') |                           pss = wlan_summary.stdout.decode('utf-8', 'ignore') | ||||||
|                           logg.info(pss) |                           logg.info(pss) | ||||||
|                        except subprocess.CalledProcessError as process_error: |                        except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1014,7 +1013,7 @@ def main(): | |||||||
|                        try: |                        try: | ||||||
|                            logg.info("3504 cisco_wifi_ctl.py: advanced") |                            logg.info("3504 cisco_wifi_ctl.py: advanced") | ||||||
|                            advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                            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","--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |                                               "--action", "advanced","--port", args.port ], capture_output=True, check=True) | ||||||
|                            pss = advanced.stdout.decode('utf-8', 'ignore') |                            pss = advanced.stdout.decode('utf-8', 'ignore') | ||||||
|                            logg.info(pss) |                            logg.info(pss) | ||||||
|                        except subprocess.CalledProcessError as process_error: |                        except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1113,7 +1112,7 @@ def main(): | |||||||
|                                try: |                                try: | ||||||
|                                   logg.info("9800 cisco_wifi_ctl.py: advanced") |                                   logg.info("9800 cisco_wifi_ctl.py: advanced") | ||||||
|                                   advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |                                   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","--series" , args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |                                               "--action", "advanced","--series" , args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|                                   pss = advanced.stdout.decode('utf-8', 'ignore') |                                   pss = advanced.stdout.decode('utf-8', 'ignore') | ||||||
|                                   logg.info(pss) |                                   logg.info(pss) | ||||||
|                                except subprocess.CalledProcessError as process_error: |                                except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1549,7 +1548,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800/3504 cisco_wifi_ctl.py: advanced") |           logg.info("9800/3504 cisco_wifi_ctl.py: advanced") | ||||||
|           advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           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","--series" , args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |              "--action", "advanced","--series" , args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|           pss = advanced.stdout.decode('utf-8', 'ignore') |           pss = advanced.stdout.decode('utf-8', 'ignore') | ||||||
|           logg.info(pss) |           logg.info(pss) | ||||||
|        except subprocess.CalledProcessError as process_error: |        except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1558,7 +1557,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800/3504 cisco_wifi_ctl.py: summary") |           logg.info("9800/3504 cisco_wifi_ctl.py: summary") | ||||||
|           advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           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","--series" , args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |              "--action", "summary","--series" , args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|           pss = advanced.stdout.decode('utf-8', 'ignore') |           pss = advanced.stdout.decode('utf-8', 'ignore') | ||||||
|           logg.info(pss) |           logg.info(pss) | ||||||
|        except subprocess.CalledProcessError as process_error: |        except subprocess.CalledProcessError as process_error: | ||||||
| @@ -1577,7 +1576,7 @@ def main(): | |||||||
|    try: |    try: | ||||||
|       logg.info("9800/3504 cisco_wifi_ctl.py: disable AP {}".format(args.ap)) |       logg.info("9800/3504 cisco_wifi_ctl.py: disable AP {}".format(args.ap)) | ||||||
|       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                    "--action", "disable", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "disable", "--series" , args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|       if cap_ctl_out: |       if cap_ctl_out: | ||||||
|           pss = ctl_output.stdout.decode('utf-8', 'ignore') |           pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|           logg.info(pss) |           logg.info(pss) | ||||||
| @@ -1591,7 +1590,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: no_wlan_wireless_tag_policy") |           logg.info("9800 cisco_wifi_ctl.py: no_wlan_wireless_tag_policy") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                           "--action", "no_wlan_wireless_tag_policy", "--wlan", args.wlan, "--series", "--wlanID", args.wlanID, args.series,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)  |                           "--action", "no_wlan_wireless_tag_policy", "--wlan", args.wlan, "--series", "--wlanID", args.wlanID, args.series,"--port", args.port  ], capture_output=cap_ctl_out, check=True)  | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1603,7 +1602,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: delete_wlan") |           logg.info("9800 cisco_wifi_ctl.py: delete_wlan") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                       "--action", "delete_wlan","--series",args.series, "--wlan", args.wlan, "--wlanID", args.wlanID,"--port", args.port,"--log", outfile_log, "--append" ], capture_output=cap_ctl_out, check=True)     |                       "--action", "delete_wlan","--series",args.series, "--wlan", args.wlan, "--wlanID", args.wlanID,"--port", args.port  ], capture_output=cap_ctl_out, check=True)     | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1615,7 +1614,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: disable_network_5ghz") |           logg.info("9800 cisco_wifi_ctl.py: disable_network_5ghz") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "disable_network_5ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True)       |                                    "--action", "disable_network_5ghz","--series",args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True)       | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1627,7 +1626,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: disable_network_24ghz") |           logg.info("9800 cisco_wifi_ctl.py: disable_network_24ghz") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "disable_network_24ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True)                  |                                    "--action", "disable_network_24ghz","--series",args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True)                  | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1640,7 +1639,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("3504 cisco_wifi_ctl.py: config 802.11a disable network") |           logg.info("3504 cisco_wifi_ctl.py: config 802.11a disable network") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = 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","--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "cmd", "--value", "config 802.11a disable network","--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1652,7 +1651,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("3504 cisco_wifi_ctl.py: config 802.11b disable network") |           logg.info("3504 cisco_wifi_ctl.py: config 802.11b disable network") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = 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","--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "cmd", "--value", "config 802.11b disable network","--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1665,7 +1664,7 @@ def main(): | |||||||
|        try:  |        try:  | ||||||
|           logg.info("9800/3504 cisco_wifi_ctl.py: txPower tx 1") |           logg.info("9800/3504 cisco_wifi_ctl.py: txPower tx 1") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                        "--action", "txPower", "--value", "1", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                        "--action", "txPower", "--value", "1", "--series" , args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1679,7 +1678,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800/3504 cisco_wifi_ctl.py: channel 36") |           logg.info("9800/3504 cisco_wifi_ctl.py: channel 36") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = 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", "36", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                        "--action", "channel", "--value", "36", "--series" , args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1692,7 +1691,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800/3504 cisco_wifi_ctl.py: bandwidth 20") |           logg.info("9800/3504 cisco_wifi_ctl.py: bandwidth 20") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                        "--action", "bandwidth", "--value", "20", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                        "--action", "bandwidth", "--value", "20", "--series" , args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1705,7 +1704,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: enable_network_5ghz") |           logg.info("9800 cisco_wifi_ctl.py: enable_network_5ghz") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable_network_5ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True)          |                                    "--action", "enable_network_5ghz","--series",args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True)          | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1717,7 +1716,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: enable_network_24ghz") |           logg.info("9800 cisco_wifi_ctl.py: enable_network_24ghz") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "enable_network_24ghz","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True)  |                                    "--action", "enable_network_24ghz","--series",args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True)  | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1729,7 +1728,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("9800 cisco_wifi_ctl.py: auto") |           logg.info("9800 cisco_wifi_ctl.py: auto") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                                    "--action", "auto","--series",args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                                    "--action", "auto","--series",args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1742,7 +1741,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") |           logg.info("3504 cisco_wifi_ctl.py: config 802.11a enable network") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = 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","--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "cmd", "--value", "config 802.11a enable network","--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1754,7 +1753,7 @@ def main(): | |||||||
|        try: |        try: | ||||||
|           logg.info("3504 cisco_wifi_ctl.py: config 802.11b enable network") |           logg.info("3504 cisco_wifi_ctl.py: config 802.11b enable network") | ||||||
|           ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |           ctl_output = 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 enable network","--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "cmd", "--value", "config 802.11b enable network","--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|           if cap_ctl_out: |           if cap_ctl_out: | ||||||
|              pss = ctl_output.stdout.decode('utf-8', 'ignore') |              pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|              logg.info(pss) |              logg.info(pss) | ||||||
| @@ -1766,7 +1765,7 @@ def main(): | |||||||
|    try: |    try: | ||||||
|       logg.info("9800/3504 cisco_wifi_ctl.py: enable") |       logg.info("9800/3504 cisco_wifi_ctl.py: enable") | ||||||
|       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |       ctl_output = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, | ||||||
|                    "--action", "enable", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append" ],capture_output=cap_ctl_out, check=True) |                    "--action", "enable", "--series" , args.series,"--port", args.port  ],capture_output=cap_ctl_out, check=True) | ||||||
|       if cap_ctl_out: |       if cap_ctl_out: | ||||||
|          pss = ctl_output.stdout.decode('utf-8', 'ignore') |          pss = ctl_output.stdout.decode('utf-8', 'ignore') | ||||||
|          logg.info(pss) |          logg.info(pss) | ||||||
| @@ -1787,7 +1786,7 @@ def main(): | |||||||
|    try: |    try: | ||||||
|       logg.info("9800/3504 cisco_wifi_ctl.py: advanced") |       logg.info("9800/3504 cisco_wifi_ctl.py: advanced") | ||||||
|       advanced = subprocess.run(["./cisco_wifi_ctl.py", "--scheme", scheme, "-d", args.dest, "-u", args.user, "-p", args.passwd, "-a", args.ap, "--band", band, |       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", "--series" , args.series,"--port", args.port,"--log", outfile_log, "--append"], capture_output=True, check=True) |                               "--action", "advanced", "--series" , args.series,"--port", args.port ], capture_output=True, check=True) | ||||||
|       pss = advanced.stdout.decode('utf-8', 'ignore'); |       pss = advanced.stdout.decode('utf-8', 'ignore'); | ||||||
|       logg.info(pss) |       logg.info(pss) | ||||||
|    except subprocess.CalledProcessError as process_error: |    except subprocess.CalledProcessError as process_error: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Chuck SmileyRekiere
					Chuck SmileyRekiere