-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Trying to use variables with the cli add on configuration feature and it errors when applying. Have tried with single quotes, double quotes, and as documented with no quotes for the value with the same result. The template will push to the device when checking, but without variables values populated. The cli add on does push successfully with hardcoded/static values, just not with variables. vManage version 20.12.5.
feature_profiles:
cli_profiles:
- name: CLI-Add-On
description: CLI Add On
config:
name: cli-add-onconfig
cli_configuration: |
! CLI add on test comment
vrf definition {{vrf}}
rd {{rd}}
route-target export {{rt_export}}
route-target import {{rt_import}}
!
router bgp {{asn}}
address-family ipv4 unicast vrf {{af_vrf}}
neighbor {{nei}} remote-as {{nei_asn}}
neighbor {{nei}} activate
Variables value variation 1:
vrf: 10
rd: 1:10
rt_export: 65499:10
rt_import: 65499:10
asn: 65499
af_vrf: 10
nei: 10.10.10.10
nei_asn: 65499
Variables value variation 2:
vrf: "10"
rd: "1:10"
rt_export: "65499:10"
rt_import: "65499:10"
asn: "65499"
af_vrf: "10"
nei: "10.10.10.10"
nei_asn: "65499"
Variables value variation 3:
vrf: '10'
rd: '1:10'
rt_export: '65499:10'
rt_import: '65499:10'
asn: '65499'
af_vrf: '10'
nei: '10.10.10.10'
nei_asn: '65499'
Failed to configure configuration group device variables (PUT), got error: HTTP Request failed: StatusCode 400, {"error":{"message":"Invalid Json Payload
│ Input","code":"SCHVALID0001","details":"{"Validation Errors":{"Required But Missing Attributes":["vrf"],"Invalid Format
│ Attributes":["af_vrf","asn","nei_asn"]}}","type":"error"}}