Hello, I am trying to write a script that will be used in doing basic database changes in a wireless controller. THe goal is to have the script pull the info for each access point from the text file and reprovision them with that data. The engineers are currently having to manually enter this data into the controller for each AP and it takes forever....
I am using Secure CRT for the console interface to the controller. Here is the basic script I recorded from that application. How would I have the script pull data from a text file called APData.txt for example and then keep looping until the end of file.
The items that would be in the data file would be the ip address, Ap name and syslocation info. In the example below the ap-name field would be where "Scripted 2" appears and the syslocation field would be where "SNMP loc 2" is.
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
Sub Main
crt.Screen.Send "con t" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (AP provisioning) #"
crt.Screen.Send "read-bootinfo ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (AP provisioning) #"
crt.Screen.Send "provision-ap copy-provisioning-params ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap ap-name " & chr(34) & "Scripted 2" & chr(34) & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap syslocation " & chr(34) & "SNMP loc 2" & chr(34) & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap reprovision ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "exit" & chr(13)
End Sub
I am using Secure CRT for the console interface to the controller. Here is the basic script I recorded from that application. How would I have the script pull data from a text file called APData.txt for example and then keep looping until the end of file.
The items that would be in the data file would be the ip address, Ap name and syslocation info. In the example below the ap-name field would be where "Scripted 2" appears and the syslocation field would be where "SNMP loc 2" is.
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
Sub Main
crt.Screen.Send "con t" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (AP provisioning) #"
crt.Screen.Send "read-bootinfo ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (AP provisioning) #"
crt.Screen.Send "provision-ap copy-provisioning-params ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap ap-name " & chr(34) & "Scripted 2" & chr(34) & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap syslocation " & chr(34) & "SNMP loc 2" & chr(34) & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "provision-ap reprovision ip-addr 192.168.0.254" & chr(13)
crt.Screen.WaitForString "(WPAruba200) (config) #"
crt.Screen.Send "exit" & chr(13)
End Sub