- Trouble configuring a VLAN on switch, using the “Configure VLAN” template. Below are the steps followed along with the results with each call. The goal here is to create a new VLAN on the switch with the Id of 5.
- Verify the “Configure VLAN” template exists:
- <========= Request & Response details removed====>
Are you accessing PI via a proxy
Which version of PI are you using
What patches and maintenance releases have you installed
Have you tried specifying values for the Dropdown type variables during deployment.
They are listed as not required, that might be an error.
3.1 Have you installed any of the maintenance releases or are you on 3.1.0.
In this case, the dropdowns are "mode" and "option" (they come back where "type" is "Dropdown").
In the deployTemplateThroughJob request, to specify those variables, along with a value, in the request payload.
- PI is running at: 3.1.0.0.132
-
Documentation tells that All variables need to be present in the deployTemplateThroughJob, even if they are not being used. If this is true, don't I need to specify the other variables and put a blank as the value for this to work. Would the following work.
Body:
{
"cliTemplateCommand" : {
"targetDevices" : {
"targetDevice" : {
"targetDeviceID" : "1363362", -- also use the displayID -- 1349348
"variableValues" : {
"variableValue" : {
"name" : "vlanid",
"value" : "5"
"name" : "mode",
"value" : "Access,Trunk",
"name" : "option",
"value" : "Create,Delete",
}
}
}
},
"templateName" : "Configure VLAN"
}
}
on 3.1.0, you'll want to specify all of the variable values. A couple corrections on this request body: first, you'll need to use an array for the multiple variable values. Second, you'll want to use the ID of the device as reported in the displayName and id attributes, not the deviceId parameter. Third, you'll want to specify either "Access" or "Trunk" for mode and either "Create" or "Delete" for option (you can also leave them blank, but should not specify both).
"variableValues" : { "variableValue" : [{ "name" : "vlanid", "value" : "5" } , { "name" : "mtu", "value" : "" } , { "name" : "interfaceName", "value" : "" } , { "name" : "vlanName", "value" : "" } , { "name" : "encapsulation", "value" : "" } , { "name" : "mode", "value" : "" } , { "name" : "option", "value" : "" } ]
}
In the next major release (3.2) you need to specify all of the variable values.
it was a defect in 3.1. The issue has been corrected in 3.2.
Comments
0 comments
Please sign in to leave a comment.