- Want to leverage the PI's API for the WLAN SSID modification. Would like to find some right API calls to modify the existing SSID name and password. However, going through the WLAN Provisioning API, realized that either "Creates a WLAN template on the server" or "Modifies an existing WLAN template" offers the limited payload parameters to define the WLAN ID,SSID, or password.
- PI v2.2, and migrating to 3.0 now. WLC is 8510.
- By Going through the CLI Template Configuration, can we customize a specific CLI Template instead of the WLAN Provisioning just to:
- Rename the SSID
- Change the password for the SSID
- Deploy the configuration
Want to build a CLI Template over the PI3.0 first for the later API calls. The template works OK from the PI, and able to deploy it anytime. For example, if would like to change an OPEN SSID without a password and would use:
config wlan disable $wlan_id
config wlan ssid $wlan_id $ssid
config wlan enable $wlan_id
However, when trying to make the API call by the PUT cliTemplateConfiguration/deploy /webacs/api/v1/op/cliTemplateConfiguration/deploy
The error message is: Error in running XDE Procedure, Error Message::Error occured while communicating with the device. Check device credentials and SSH/telnet reachability.
The WLAN Provisioning Service offers a limited subset of properties that can be set in a created or updated WLAN template (though it can deploy any WLAN template present on the appliance).
What type of controller are you using.
you're able to deploy that template from the Prime Infrastructure UI to your controller, but it's failing when over the API.
When deploying a CLI template, the targetDeviceID should be the id attribute of the devicesDTO. For example, with the following
<?xml version="1.0" ?> <queryResponse type="Devices" count="1" first="0" last="0" rootUrl="https://szier/webacs/api/v1/data" requestUrl="https://szier/webacs/api/v1/data/Devices?.full=true" responseType="listEntityInstances"> <entity url="https://szier/webacs/api/v1/data/Devices/12345" type="Devices" dtoType="devicesDTO"> <devicesDTO id="12345" displayName="12345"> <deviceId>67890</deviceId> <deviceName>Cisco_f6:4d:a4</deviceName> <managementStatus>MANAGED_AND_SYNCHRONIZED</managementStatus> <productFamily>Wireless Controller</productFamily> <reachability>REACHABLE</reachability> </devicesDTO> </entity> </queryResponse>
You should use 12345, not 67890 as the targetDeviceID.
Using the devicesDTO id just like"12345". The lab is WLC5508 Firmware 8.1 and PI3.0.
Here is a summary about the test.
1. From PI v3.0 UI to create a CLI Template "ChangeSSID", deploy it to the WLC5508 v8.1 from UI. When deploy, add the parameters such as a new ssid. This is successful. The WLC5508 accepts the template and changed the SSID and the password accordingly.
2. Get the device ID. in my case devicesDTO id="216216"
3. Deploy the template through a Job
/webacs/api/v1/op/cliTemplateConfiguration/deployTemplateThroughJob,
The response is that "An deploy job has been successfully created."
4. Check from PI's UI, a Job is scheduled but failed. No failure reason.
5. If use /webacs/api/v1/op/cliTemplateConfiguration/deploy, then "Error in running XDE Procedure, Error Message::Error occured while communicating with the device. Check device credentials and SSH/telnet reachability."
After a WLC and PI reboot, we deleted the WLC from the PI and re-added it, the device ID changed . Then the whole CLI template API call starts to work. Don't know the root-cause but definitely there is authentication error between the WLC and PI.
One note about the job that gets created by the template deployment service; you can use the job run history service (/webacs/api/v1/op/jobService/runhistory?jobName=name_from_deployment_service) to get the status of the job. In the event deployment fails, the detailed error message should also be returned by the run history service.
Comments
0 comments
Please sign in to leave a comment.