Skip to content

Commit 6c2990e

Browse files
Add mdt support to vrf resource (#387)
1 parent 5bf21f1 commit 6c2990e

File tree

9 files changed

+1015
-2
lines changed

9 files changed

+1015
-2
lines changed

docs/data-sources/vrf.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ data "iosxe_vrf" "example" {
3535
- `address_family_ipv6` (Boolean) Address family
3636
- `description` (String) VRF specific description
3737
- `id` (String) The path of the retrieved object.
38+
- `ipv4_mdt_auto_discovery_interworking_vxlan_pim` (Boolean) Enable BGP auto-discovery for VxLAN PIM interworking
39+
- `ipv4_mdt_auto_discovery_interworking_vxlan_pim_inter_as` (Boolean) Enable Inter-AS BGP auto-discovery for VxLAN PIM interworking
40+
- `ipv4_mdt_auto_discovery_vxlan` (Boolean) Enable BGP auto-discovery for VxLAN
41+
- `ipv4_mdt_auto_discovery_vxlan_inter_as` (Boolean) Enable Inter-AS BGP auto-discovery for VxLAN
42+
- `ipv4_mdt_data_multicast` (Attributes List) MDT data multicast group ranges (see [below for nested schema](#nestedatt--ipv4_mdt_data_multicast))
43+
- `ipv4_mdt_data_threshold` (Number) MDT switching threshold in Kbps (1-4294967)
44+
- `ipv4_mdt_default_address` (String) MDT default group IPv4 address
45+
- `ipv4_mdt_overlay_use_bgp` (Boolean) Enable BGP for MDT overlay signaling
46+
- `ipv4_mdt_overlay_use_bgp_spt_only` (Boolean) Enable Shortest path tree-only ASM mode
3847
- `ipv4_route_replicate` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_route_replicate))
3948
- `ipv4_route_target_export` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export))
4049
- `ipv4_route_target_export_stitching` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export_stitching))
@@ -50,6 +59,16 @@ data "iosxe_vrf" "example" {
5059
- `route_target_import` (Attributes Set) Import Target-VPN community (see [below for nested schema](#nestedatt--route_target_import))
5160
- `vpn_id` (String) Configure VPN ID in rfc2685 format
5261

62+
<a id="nestedatt--ipv4_mdt_data_multicast"></a>
63+
### Nested Schema for `ipv4_mdt_data_multicast`
64+
65+
Read-Only:
66+
67+
- `address` (String) Multicast group base address
68+
- `list` (String) Access-list for group range
69+
- `wildcard` (String) Wildcard mask for address range
70+
71+
5372
<a id="nestedatt--ipv4_route_replicate"></a>
5473
### Nested Schema for `ipv4_route_replicate`
5574

docs/resources/vrf.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ resource "iosxe_vrf" "example" {
6767
value = "22:22"
6868
}
6969
]
70+
ipv4_mdt_default_address = "239.1.1.1"
71+
ipv4_mdt_auto_discovery_vxlan = true
72+
ipv4_mdt_auto_discovery_vxlan_inter_as = true
73+
ipv4_mdt_overlay_use_bgp = true
74+
ipv4_mdt_overlay_use_bgp_spt_only = true
75+
ipv4_mdt_data_multicast = [
76+
{
77+
address = "239.1.2.0"
78+
wildcard = "0.0.0.255"
79+
}
80+
]
81+
ipv4_mdt_data_threshold = 50
7082
}
7183
```
7284

@@ -85,6 +97,16 @@ resource "iosxe_vrf" "example" {
8597
- Choices: `all`, `attributes`
8698
- `description` (String) VRF specific description
8799
- `device` (String) A device name from the provider configuration.
100+
- `ipv4_mdt_auto_discovery_interworking_vxlan_pim` (Boolean) Enable BGP auto-discovery for VxLAN PIM interworking
101+
- `ipv4_mdt_auto_discovery_interworking_vxlan_pim_inter_as` (Boolean) Enable Inter-AS BGP auto-discovery for VxLAN PIM interworking
102+
- `ipv4_mdt_auto_discovery_vxlan` (Boolean) Enable BGP auto-discovery for VxLAN
103+
- `ipv4_mdt_auto_discovery_vxlan_inter_as` (Boolean) Enable Inter-AS BGP auto-discovery for VxLAN
104+
- `ipv4_mdt_data_multicast` (Attributes List) MDT data multicast group ranges (see [below for nested schema](#nestedatt--ipv4_mdt_data_multicast))
105+
- `ipv4_mdt_data_threshold` (Number) MDT switching threshold in Kbps (1-4294967)
106+
- Range: `1`-`4294967`
107+
- `ipv4_mdt_default_address` (String) MDT default group IPv4 address
108+
- `ipv4_mdt_overlay_use_bgp` (Boolean) Enable BGP for MDT overlay signaling
109+
- `ipv4_mdt_overlay_use_bgp_spt_only` (Boolean) Enable Shortest path tree-only ASM mode
88110
- `ipv4_route_replicate` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_route_replicate))
89111
- `ipv4_route_target_export` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export))
90112
- `ipv4_route_target_export_stitching` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export_stitching))
@@ -104,6 +126,19 @@ resource "iosxe_vrf" "example" {
104126

105127
- `id` (String) The path of the object.
106128

129+
<a id="nestedatt--ipv4_mdt_data_multicast"></a>
130+
### Nested Schema for `ipv4_mdt_data_multicast`
131+
132+
Required:
133+
134+
- `address` (String) Multicast group base address
135+
- `wildcard` (String) Wildcard mask for address range
136+
137+
Optional:
138+
139+
- `list` (String) Access-list for group range
140+
141+
107142
<a id="nestedatt--ipv4_route_replicate"></a>
108143
### Nested Schema for `ipv4_route_replicate`
109144

examples/resources/iosxe_vrf/resource.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,16 @@ resource "iosxe_vrf" "example" {
5252
value = "22:22"
5353
}
5454
]
55+
ipv4_mdt_default_address = "239.1.1.1"
56+
ipv4_mdt_auto_discovery_vxlan = true
57+
ipv4_mdt_auto_discovery_vxlan_inter_as = true
58+
ipv4_mdt_overlay_use_bgp = true
59+
ipv4_mdt_overlay_use_bgp_spt_only = true
60+
ipv4_mdt_data_multicast = [
61+
{
62+
address = "239.1.2.0"
63+
wildcard = "0.0.0.255"
64+
}
65+
]
66+
ipv4_mdt_data_threshold = 50
5567
}

gen/definitions/vrf.yaml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,61 @@ attributes:
144144
default_value: true
145145
exclude_test: true
146146
example: true
147+
- yang_name: address-family/ipv4/mdt/default/address
148+
tf_name: ipv4_mdt_default_address
149+
description: MDT default group IPv4 address
150+
example: 239.1.1.1
151+
- yang_name: address-family/ipv4/mdt/auto-discovery/auto-discovery/vxlan/vxlan-config/vxlan
152+
xpath: address-family/ipv4/mdt/auto-discovery/vxlan-config/vxlan
153+
tf_name: ipv4_mdt_auto_discovery_vxlan
154+
description: Enable BGP auto-discovery for VxLAN
155+
example: true
156+
- yang_name: address-family/ipv4/mdt/auto-discovery/auto-discovery/vxlan/vxlan-config/inter-as
157+
xpath: address-family/ipv4/mdt/auto-discovery/vxlan-config/inter-as
158+
tf_name: ipv4_mdt_auto_discovery_vxlan_inter_as
159+
description: Enable Inter-AS BGP auto-discovery for VxLAN
160+
example: true
161+
- yang_name: address-family/ipv4/mdt/auto-discovery/auto-discovery/interworking/interworking/interworking/vxlan-pim/vxlan-pim-config/vxlan-pim
162+
xpath: address-family/ipv4/mdt/auto-discovery/interworking/vxlan-pim-config/vxlan-pim
163+
tf_name: ipv4_mdt_auto_discovery_interworking_vxlan_pim
164+
description: Enable BGP auto-discovery for VxLAN PIM interworking
165+
exclude_test: true
166+
example: true
167+
- yang_name: address-family/ipv4/mdt/auto-discovery/auto-discovery/interworking/interworking/interworking/vxlan-pim/vxlan-pim-config/inter-as
168+
xpath: address-family/ipv4/mdt/auto-discovery/interworking/vxlan-pim-config/inter-as
169+
tf_name: ipv4_mdt_auto_discovery_interworking_vxlan_pim_inter_as
170+
description: Enable Inter-AS BGP auto-discovery for VxLAN PIM interworking
171+
exclude_test: true
172+
example: true
173+
- yang_name: address-family/ipv4/mdt/overlay/use-bgp-config
174+
tf_name: ipv4_mdt_overlay_use_bgp
175+
description: Enable BGP for MDT overlay signaling
176+
example: true
177+
- yang_name: address-family/ipv4/mdt/overlay/use-bgp-config/spt-only
178+
tf_name: ipv4_mdt_overlay_use_bgp_spt_only
179+
description: Enable Shortest path tree-only ASM mode
180+
example: true
181+
- yang_name: address-family/ipv4/mdt/data/multicast
182+
tf_name: ipv4_mdt_data_multicast
183+
type: List
184+
description: MDT data multicast group ranges
185+
attributes:
186+
- yang_name: address
187+
description: Multicast group base address
188+
example: 239.1.2.0
189+
id: true
190+
- yang_name: wildcard
191+
description: Wildcard mask for address range
192+
example: 0.0.0.255
193+
id: true
194+
- yang_name: list
195+
description: Access-list for group range
196+
example: ACL_MDT
197+
exclude_test: true
198+
- yang_name: address-family/ipv4/mdt/data/threshold
199+
tf_name: ipv4_mdt_data_threshold
200+
description: MDT switching threshold in Kbps (1-4294967)
201+
example: 50
147202
test_prerequisites:
148203
- path: Cisco-IOS-XE-native:native/vrf/definition[name=VRF1]
149204
no_delete: true
@@ -153,4 +208,4 @@ test_prerequisites:
153208
- path: Cisco-IOS-XE-native:native/route-map[name=RM1]
154209
attributes:
155210
- name: name
156-
value: RM1
211+
value: RM1

internal/provider/data_source_iosxe_vrf.go

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/data_source_iosxe_vrf_test.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)