mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	lf_cisco_snp.py: updating cisco controller configuration - more will be added
This commit is contained in:
		@@ -28,11 +28,11 @@ class cisco_():
 | 
				
			|||||||
    def __init__(self, args):
 | 
					    def __init__(self, args):
 | 
				
			||||||
        self.args = args
 | 
					        self.args = args
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #show summary (to get AP) 
 | 
					    #show summary (to get AP) (3400/9800)
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action summary --series 9800 --log stdout
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action summary --series 9800 --log stdout
 | 
				
			||||||
    def controller_show_summary(self):
 | 
					    def controller_show_summary(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"summary"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"summary"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -51,10 +51,11 @@ class cisco_():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    #show ap dot11 5ghz summary (band defaults to 5ghz) --band a
 | 
					    #show ap dot11 5ghz summary (band defaults to 5ghz) --band a
 | 
				
			||||||
    #show ap dot11 24ghz summary use --band b for 2.4 ghz
 | 
					    #show ap dot11 24ghz summary use --band b for 2.4 ghz
 | 
				
			||||||
 | 
					    #action advanced  (3400/9800)
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action advanced --series 9800 --log stdout
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action advanced --series 9800 --log stdout
 | 
				
			||||||
    def controller_show_ap_summary(self):
 | 
					    def controller_show_ap_summary(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"advanced"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"advanced"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -74,7 +75,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action show_wlan_summary --series 9800 --log stdout
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 --action show_wlan_summary --series 9800 --log stdout
 | 
				
			||||||
    def controller_show_wlan_summary(self):
 | 
					    def controller_show_wlan_summary(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"show wlan summary"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"show wlan summary"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -95,7 +96,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable --series 9800
 | 
				
			||||||
    def controller_disable_ap(self):
 | 
					    def controller_disable_ap(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -117,7 +118,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_wlan --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_wlan --series 9800
 | 
				
			||||||
    def controller_disable_wlan(self):
 | 
					    def controller_disable_wlan(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_wlan"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_wlan"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -138,8 +139,9 @@ class cisco_():
 | 
				
			|||||||
    #disable network 5ghz
 | 
					    #disable network 5ghz
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_network_5ghz --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_network_5ghz --series 9800
 | 
				
			||||||
    def controller_disable_network_5ghz(self):
 | 
					    def controller_disable_network_5ghz(self):
 | 
				
			||||||
 | 
					        if self.args.cisco_scheme == "9800":
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_network_5ghz"))
 | 
					                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_network_5ghz"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -155,13 +157,33 @@ class cisco_():
 | 
				
			|||||||
                    format(process_error.returncode, process_error.output))
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
                time.sleep(1) 
 | 
					                time.sleep(1) 
 | 
				
			||||||
                exit(1)
 | 
					                exit(1)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            try:
 | 
				
			||||||
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} value: {}".format(self.args.cisco_scheme,
 | 
				
			||||||
 | 
					                    self.args.cisco_ctlr,self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series,
 | 
				
			||||||
 | 
					                    self.args.cisco_band,"cmd","config 802.11a disable network"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
 | 
					                                        self.args.cisco_user, "-p", self.args.cisco_passwd,
 | 
				
			||||||
 | 
					                                        "-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "cmd", "--value", "config 802.11a disable network"], 
 | 
				
			||||||
 | 
					                                        capture_output=self.args.cap_ctl_out, check=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                pss = ctl_output.stdout.decode('utf-8', 'ignore')
 | 
				
			||||||
 | 
					                print(pss)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            except subprocess.CalledProcessError as process_error:
 | 
				
			||||||
 | 
					                print("Controller unable to commicate to AP or unable to communicate to controller error code: {} output {}".
 | 
				
			||||||
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
 | 
					                time.sleep(1) 
 | 
				
			||||||
 | 
					                exit(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #disable network 24ghz
 | 
					    #disable network 24ghz
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_network_24ghz --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action disable_network_24ghz --series 9800
 | 
				
			||||||
    def controller_disable_network_24ghz(self):
 | 
					    def controller_disable_network_24ghz(self):
 | 
				
			||||||
 | 
					        if self.args.cisco_scheme == "9800":
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_network_24ghz"))
 | 
					                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"disable_network_24ghz"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -177,14 +199,35 @@ class cisco_():
 | 
				
			|||||||
                    format(process_error.returncode, process_error.output))
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
                time.sleep(1) 
 | 
					                time.sleep(1) 
 | 
				
			||||||
                exit(1)
 | 
					                exit(1)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            try:
 | 
				
			||||||
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} value: {}".format(self.args.cisco_scheme,
 | 
				
			||||||
 | 
					                    self.args.cisco_ctlr,self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series,
 | 
				
			||||||
 | 
					                    self.args.cisco_band,"cmd","config 802.11b disable network"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
 | 
					                                        self.args.cisco_user, "-p", self.args.cisco_passwd,
 | 
				
			||||||
 | 
					                                        "-a", self.args.cisco_ap,"--series", self.args.cisco_series, "--band", self.args.cisco_band, "--action", "cmd", "--value", "config 802.11b disable network"], 
 | 
				
			||||||
 | 
					                                        capture_output=self.args.cap_ctl_out, check=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                pss = ctl_output.stdout.decode('utf-8', 'ignore')
 | 
				
			||||||
 | 
					                print(pss)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            except subprocess.CalledProcessError as process_error:
 | 
				
			||||||
 | 
					                print("Controller unable to commicate to AP or unable to communicate to controller error code: {} output {}".
 | 
				
			||||||
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
 | 
					                time.sleep(1) 
 | 
				
			||||||
 | 
					                exit(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #set manual mode - Series 9800 must be set to manual mode
 | 
					    #set manual mode - Series 9800 must be set to manual mode
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action manual --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action manual --series 9800
 | 
				
			||||||
    # ap name <AP NAME> dot11 5ghz radio role manual client-serving
 | 
					    # ap name <AP NAME> dot11 5ghz radio role manual client-serving
 | 
				
			||||||
    def controller_role_manual(self):
 | 
					    def controller_role_manual(self):
 | 
				
			||||||
 | 
					        if self.args.cisco_scheme == "9800":
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"manual"))
 | 
					                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"manual"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -200,13 +243,16 @@ class cisco_():
 | 
				
			|||||||
                    format(process_error.returncode, process_error.output))
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
                time.sleep(1) 
 | 
					                time.sleep(1) 
 | 
				
			||||||
                exit(1)
 | 
					                exit(1)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Check the cisco_scheme used attemping 9800 series on 3504 controller: {}".format(self.args.cisco_scheme))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #set manual mode - Series 9800 must be set to auto mode
 | 
					    #set manual mode - Series 9800 must be set to auto mode
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action auto --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action auto --series 9800
 | 
				
			||||||
    # ap name <AP NAME> dot11 5ghz radio role manual client-serving
 | 
					    # ap name <AP NAME> dot11 5ghz radio role manual client-serving
 | 
				
			||||||
    def controller_role_auto(self):
 | 
					    def controller_role_auto(self):
 | 
				
			||||||
 | 
					        if self.args.cisco_scheme == "9800":
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"auto"))
 | 
					                    self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"auto"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -222,13 +268,14 @@ class cisco_():
 | 
				
			|||||||
                    format(process_error.returncode, process_error.output))
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
                time.sleep(1) 
 | 
					                time.sleep(1) 
 | 
				
			||||||
                exit(1)
 | 
					                exit(1)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Check the cisco_scheme used attemping 9800 series on 3504 controller: {}".format(self.args.cisco_scheme))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #test parameters summary (txPower 1-8)
 | 
					    #test parameters summary (txPower 1-8)
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action txPower  --value 5 --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action txPower  --value 5 --series 9800
 | 
				
			||||||
    def controller_set_tx_power(self):
 | 
					    def controller_set_tx_power(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"txPower", self.args.cisco_tx_power ))  # TODO fix txPower to tx_power in cisco_wifi_ctl.py
 | 
					                self.args.cisco_band,"txPower", self.args.cisco_tx_power ))  # TODO fix txPower to tx_power in cisco_wifi_ctl.py
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -252,7 +299,7 @@ class cisco_():
 | 
				
			|||||||
    # 3504 : (Cisco Controller) >config 802.11a channel ap APA453.0E7B.CF9C  52
 | 
					    # 3504 : (Cisco Controller) >config 802.11a channel ap APA453.0E7B.CF9C  52
 | 
				
			||||||
    def controller_set_channel(self):
 | 
					    def controller_set_channel(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"channel", self.args.cisco_channel ))
 | 
					                self.args.cisco_band,"channel", self.args.cisco_channel ))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -274,7 +321,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action bandwidth  --value 40 --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action bandwidth  --value 40 --series 9800
 | 
				
			||||||
    def controller_set_bandwidth(self):
 | 
					    def controller_set_bandwidth(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} value {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"channel", self.args.cisco_chan_width ))
 | 
					                self.args.cisco_band,"channel", self.args.cisco_chan_width ))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -295,8 +342,9 @@ class cisco_():
 | 
				
			|||||||
    #create wlan
 | 
					    #create wlan
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action create_wlan  --wlan "open-wlan"  --wlanID 1 --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action create_wlan  --wlan "open-wlan"  --wlanID 1 --series 9800
 | 
				
			||||||
    def controller_create_wlan(self):
 | 
					    def controller_create_wlan(self):
 | 
				
			||||||
 | 
					        if self.args.cisco_scheme == "9800":
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {} wlan {} wlanID".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					                print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {} wlan {} wlanID".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                    self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                    self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                    self.args.cisco_band,"create_wlan", self.args.cisco_wlan, self.args.cisco_wlanID ))
 | 
					                    self.args.cisco_band,"create_wlan", self.args.cisco_wlan, self.args.cisco_wlanID ))
 | 
				
			||||||
                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					                ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -312,7 +360,8 @@ class cisco_():
 | 
				
			|||||||
                    format(process_error.returncode, process_error.output))
 | 
					                    format(process_error.returncode, process_error.output))
 | 
				
			||||||
                time.sleep(1) 
 | 
					                time.sleep(1) 
 | 
				
			||||||
                exit(1)
 | 
					                exit(1)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Check the cisco_scheme used attemping 9800 series on 3504 controller: {}".format(self.args.cisco_scheme))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #create wireless tag policy  --9800 series needs to have wireless tag policy set
 | 
					    #create wireless tag policy  --9800 series needs to have wireless tag policy set
 | 
				
			||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action wireless_tag_policy --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action wireless_tag_policy --series 9800
 | 
				
			||||||
@@ -340,7 +389,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_wlan --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_wlan --series 9800
 | 
				
			||||||
    def controller_enable_wlan(self):
 | 
					    def controller_enable_wlan(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"enable_wlan"))
 | 
					                self.args.cisco_band,"enable_wlan"))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -362,7 +411,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_network_5ghz --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_network_5ghz --series 9800
 | 
				
			||||||
    def controller_enable_network_5ghz(self):
 | 
					    def controller_enable_network_5ghz(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"enable_network_5ghz"))
 | 
					                self.args.cisco_band,"enable_network_5ghz"))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -383,7 +432,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_network_24ghz --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable_network_24ghz --series 9800
 | 
				
			||||||
    def controller_enable_network_24ghz(self):
 | 
					    def controller_enable_network_24ghz(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"enable_network_24ghz"))
 | 
					                self.args.cisco_band,"enable_network_24ghz"))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -405,7 +454,7 @@ class cisco_():
 | 
				
			|||||||
    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable --series 9800
 | 
					    #./cisco_wifi_ctl.py --scheme ssh -d 172.19.36.168 -p <controller_pw> --port 23 -a "9120-Chamber-1" --band a --action enable --series 9800
 | 
				
			||||||
    def controller_enable_ap(self):
 | 
					    def controller_enable_ap(self):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,
 | 
				
			||||||
                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
					                self.args.cisco_user,self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, 
 | 
				
			||||||
                self.args.cisco_band,"enable"))
 | 
					                self.args.cisco_band,"enable"))
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -717,7 +766,7 @@ class L3VariableTime(LFCliBase):
 | 
				
			|||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            print("scheme {} ctlr {} user {} passwd {} AP {} series {} band {} action {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
					            print("scheme: {} ctlr: {} user: {} passwd: {} AP: {} series: {} band: {} action: {}".format(self.args.cisco_scheme,self.args.cisco_ctlr,self.args.cisco_user,
 | 
				
			||||||
                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"summary"))
 | 
					                self.args.cisco_passwd, self.args.cisco_ap, self.args.cisco_series, self.args.cisco_band,"summary"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
					            ctl_output = subprocess.run(["../cisco_wifi_ctl.py", "--scheme", self.args.cisco_scheme, "-d", self.args.cisco_ctlr, "-u",
 | 
				
			||||||
@@ -1335,9 +1384,15 @@ TODO: Radio descriptions in realm , the 1. refers to the chassi hopefully corres
 | 
				
			|||||||
                            print(cisco_args)
 | 
					                            print(cisco_args)
 | 
				
			||||||
                            
 | 
					                            
 | 
				
			||||||
                            cisco = cisco_(cisco_args)
 | 
					                            cisco = cisco_(cisco_args)
 | 
				
			||||||
 | 
					 | 
				
			||||||
                            #Disable AP
 | 
					                            #Disable AP
 | 
				
			||||||
                            cisco.controller_disable_ap()
 | 
					                            cisco.controller_disable_ap()
 | 
				
			||||||
 | 
					                            if cisco_args.series == "9800":
 | 
				
			||||||
 | 
					                                cisco.controller_disable_wlan()
 | 
				
			||||||
 | 
					                                cisco.controller_network_5ghz()
 | 
				
			||||||
 | 
					                                cisco.controller_network_24ghz()
 | 
				
			||||||
 | 
					                                cisco.controller_role_manual()
 | 
				
			||||||
 | 
					                            else:
 | 
				
			||||||
 | 
					                                pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # TODO may need a static list of radios read for scaling and performance
 | 
					    # TODO may need a static list of radios read for scaling and performance
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user