10-12-2021 12:16 AM
Hi,
I am creating a Service VPN feature template with VPN number as a variable. This feature is not supported in vManage GUI, but it works fine using the API.
I am creating feature template by making a call to POST /dataservice/template/feature/ with following payload:
"templateName": "vedge-service-vpn-template-1", "templateDescription": "Service VPN template for 1 vpn on vEdge devices", "templateType": "vpn-vedge", "deviceType": [ "vedge-cloud", "vedge-1000", "vedge-2000", "vedge-100", "vedge-100-B", "vedge-100-WM", "vedge-100-M", "vedge-5000", "vedge-ISR1100-4G", "vedge-ISR1100-4GLTE", "vedge-ISR1100-6G" ], "templateMinVersion": "15.0.0", "templateDefinition": { "vpn-id": { "vipObjectType": "object", "vipType": "variableName", "vipVariableName": "vpn_no_1" }, "name": { "vipObjectType": "object", "vipType": "ignore", "vipVariableName": "vpn_name" }, "ecmp-hash-key": { "layer4": { "vipObjectType": "object", "vipType": "ignore", "vipValue": "false", "vipVariableName": "vpn_layer4" } }, "tcp-optimization": { "vipObjectType": "node-only", "vipType": "ignore", "vipValue": "false", "vipVariableName": "vpn_tcp_optimization" }, "nat64-global": { "prefix": { "stateful": {} } }, "nat64": { "v4": { "pool": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "name" ] } } }, "route-import": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "protocol" ] }, "route-export": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "protocol" ] }, "host": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "hostname" ] }, "service": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "svc-type" ] }, "ip": { "gre-route": {}, "ipsec-route": {}, "service-route": {} }, "ipv6": {}, "omp": { "advertise": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "protocol" ] }, "ipv6-advertise": { "vipType": "ignore", "vipValue": [], "vipObjectType": "tree", "vipPrimaryKey": [ "protocol" ] } } }, "factoryDefault": false
The important part is as follows
"vpn-id": { "vipObjectType": "object", "vipType": "variableName", "vipVariableName": "vpn_no_1" }
When I add this template in a device template and deploy it on a device, I have to give values of variables, as follows
"/vpn_no_1/vpn-instance/vpn-id": "", "/vpn_no_1/vpn_if_name_Transport-Interface-Feature-Template-Dynamic-vEdges-1/interface/if-name": "", "/vpn_no_1/vpn_if_name_Transport-Interface-Feature-Template-Dynamic-vEdges-1/interface/nat": "", "/vpn_no_1/vpn_if_name_Transport-Interface-Feature-Template-Dynamic-vEdges-1/interface/tunnel-interface/color/value": ""
If I give these values, the device template is deployed successfully on the device.
My questions are:
- Is there something fundamentally wrong with the "variable vpn" approach? If not, why is it not supported by vMange UI (screenshot attached).
- Is it possible that the support for this feature is removed in newer version of vManage API (I am currently using vManage 20.5)
Looking for answers
Thanks in advance
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide