Hello everyone,
I got a general Master (device) template, within this template there is a "Service VPN" (feature) template, and within this last template, several sub-templates (VPN interfaces). I would like to add another VPN interface to this "Service VPN" template. Quite easy with the GUI (one click on +VPN Interface and I select the interface sub-template), but I would like to do it with an API call.
My code is approx. the following:
1) I retrieve the master template json config (GET /dataservice/template/device/object/{masterTemplateID} )
2) I Insert the ID of the already existing VPN sub-interface template into the sub-template list of the "Service VPN" template of the master template into a the json config I have just retrieved
3) I send put request (PUT + /dataservice/template/device/{masterTemplateID} + the new config as a payload).
4) The answer of this put request is a 200 response - ok.
{"header":bablabla ,"data":{"processId":"push_feature_template_configuration-xxx-xxx-xxxx","attachedDevices":[{"host-name":"hostname","deviceIP":"0.0.0.0.0","local-system-ip":"0.0.0.0.0","site-id":"0000000,"device-groups":["Branch"],"uuid":"XXXX-XXXX-XXXXXXX","personality":"vedge","configCloudxMode":"none"}]}}
However, even if I got this 200 response, when I go to the vmanage template, this new interface is NOT present in the template!
Does anyone got any ideas on how to fix that?
Thanks.
P.
Note: For info, a device is bind to this master template. If I do this step manually (adding interface sub-template in service vpn of master template, vmanage prompts me for a windows asking me to setup the IP address of that device for that new interface. However can't find a way to specify this with an API call.)