Skip to content

Commit 491f65e

Browse files
authored
Add various bgp attributes (#341)
1 parent c80af31 commit 491f65e

21 files changed

+555
-45
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
- Add `router_id_ip`, `bgp_graceful_restart`, and `bgp_update_delay` to `iosxe_bgp` resource and data source
5050
- Add `multi_area_ids` attribute to `iosxe_interface_ospf` resource and data source
5151
- Add `log_adjacency_changes`, `log_adjacency_changes_detail`, `nsf_cisco`, `nsf_cisco_enforce_global`, `nsf_ietf`, `nsf_ietf_restart_interval`, `max_metric_router_lsa_*`, `fast_reroute_per_prefix_enable_prefix_priority`, `redistribute_static_subnets` and `redistribute_connected_subnets` attributes to `iosxe_ospf` and `iosxe_ospf_vrf` resources and data sources
52+
- Enhance `set_communities` attribute documentation in `iosxe_route_map` to clarify support for well-known BGP community values (internet, local-AS, no-advertise, no-export, gshut)
53+
- Add `route_map` attribute with required subattributes to `iosxe_bgp_l2vpn_evpn_neighbor` resource and data source
54+
- Add `import_path_selection_all` and `ipv4_unicast_aggregate_addresses.summary_only` attributes to `iosxe_bgp_address_family_ipv4_vrf` resoutces and data sources
5255

5356
## 0.9.3
5457

docs/data-sources/bgp_address_family_ipv4_vrf.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Read-Only:
4747
- `ipv4_unicast_distance_bgp_external` (Number)
4848
- `ipv4_unicast_distance_bgp_internal` (Number)
4949
- `ipv4_unicast_distance_bgp_local` (Number)
50+
- `ipv4_unicast_import_path_selection_all` (Boolean) Import all available paths
5051
- `ipv4_unicast_maximum_paths_ebgp` (Number) eBGP-multipath
5152
- `ipv4_unicast_maximum_paths_ibgp` (Number)
5253
- `ipv4_unicast_networks` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--vrfs--ipv4_unicast_networks))
@@ -75,6 +76,7 @@ Read-Only:
7576

7677
- `ipv4_address` (String)
7778
- `ipv4_mask` (String)
79+
- `summary_only` (Boolean) Filter more specific routes from updates
7880

7981

8082
<a id="nestedatt--vrfs--ipv4_unicast_networks"></a>

docs/data-sources/bgp_l2vpn_evpn_neighbor.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ data "iosxe_bgp_l2vpn_evpn_neighbor" "example" {
3535

3636
- `activate` (Boolean) Enable the address family for this neighbor
3737
- `id` (String) The path of the retrieved object.
38+
- `route_maps` (Attributes List) Apply route map to neighbor (see [below for nested schema](#nestedatt--route_maps))
3839
- `route_reflector_client` (Boolean) Configure a neighbor as Route Reflector client
3940
- `send_community` (String)
4041
- `soft_reconfiguration` (String) Per neighbor soft reconfiguration
42+
43+
<a id="nestedatt--route_maps"></a>
44+
### Nested Schema for `route_maps`
45+
46+
Read-Only:
47+
48+
- `in_out` (String)
49+
- `route_map_name` (String)

docs/guides/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ description: |-
5858
- Add `router_id_ip`, `bgp_graceful_restart`, and `bgp_update_delay` to `iosxe_bgp` resource and data source
5959
- Add `multi_area_ids` attribute to `iosxe_interface_ospf` resource and data source
6060
- Add `log_adjacency_changes`, `log_adjacency_changes_detail`, `nsf_cisco`, `nsf_cisco_enforce_global`, `nsf_ietf`, `nsf_ietf_restart_interval`, `max_metric_router_lsa_*`, `fast_reroute_per_prefix_enable_prefix_priority`, `redistribute_static_subnets` and `redistribute_connected_subnets` attributes to `iosxe_ospf` and `iosxe_ospf_vrf` resources and data sources
61+
- Enhance `set_communities` attribute documentation in `iosxe_route_map` to clarify support for well-known BGP community values (internet, local-AS, no-advertise, no-export, gshut)
62+
- Add `route_map` attribute with required subattributes to `iosxe_bgp_l2vpn_evpn_neighbor` resource and data source
63+
- Add `import_path_selection_all` and `ipv4_unicast_aggregate_addresses.summary_only` attributes to `iosxe_bgp_address_family_ipv4_vrf` resoutces and data sources
6164

6265
## 0.9.3
6366

docs/resources/bgp_address_family_ipv4_vrf.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
2626
{
2727
ipv4_address = "50.0.0.0"
2828
ipv4_mask = "255.255.0.0"
29+
summary_only = true
2930
}
3031
]
3132
ipv4_unicast_redistribute_static = true
@@ -51,11 +52,12 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
5152
wildcard = "0.0.0.0"
5253
}
5354
]
54-
ipv4_unicast_distance_bgp_external = 20
55-
ipv4_unicast_distance_bgp_internal = 200
56-
ipv4_unicast_distance_bgp_local = 200
57-
ipv4_unicast_maximum_paths_ebgp = 2
58-
ipv4_unicast_maximum_paths_ibgp = 2
55+
ipv4_unicast_distance_bgp_external = 20
56+
ipv4_unicast_distance_bgp_internal = 200
57+
ipv4_unicast_distance_bgp_local = 200
58+
ipv4_unicast_maximum_paths_ebgp = 2
59+
ipv4_unicast_maximum_paths_ibgp = 2
60+
ipv4_unicast_import_path_selection_all = true
5961
}
6062
]
6163
}
@@ -95,6 +97,7 @@ Optional:
9597
- `ipv4_unicast_distance_bgp_external` (Number) - Range: `1`-`255`
9698
- `ipv4_unicast_distance_bgp_internal` (Number) - Range: `1`-`255`
9799
- `ipv4_unicast_distance_bgp_local` (Number) - Range: `1`-`255`
100+
- `ipv4_unicast_import_path_selection_all` (Boolean) Import all available paths
98101
- `ipv4_unicast_maximum_paths_ebgp` (Number) eBGP-multipath
99102
- Range: `1`-`32`
100103
- `ipv4_unicast_maximum_paths_ibgp` (Number) - Range: `1`-`32`
@@ -128,6 +131,10 @@ Required:
128131
- `ipv4_address` (String)
129132
- `ipv4_mask` (String)
130133

134+
Optional:
135+
136+
- `summary_only` (Boolean) Filter more specific routes from updates
137+
131138

132139
<a id="nestedatt--vrfs--ipv4_unicast_networks"></a>
133140
### Nested Schema for `vrfs.ipv4_unicast_networks`

docs/resources/bgp_l2vpn_evpn_neighbor.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ resource "iosxe_bgp_l2vpn_evpn_neighbor" "example" {
2020
send_community = "both"
2121
route_reflector_client = false
2222
soft_reconfiguration = "inbound"
23+
route_maps = [
24+
{
25+
in_out = "in"
26+
route_map_name = "RM1"
27+
}
28+
]
2329
}
2430
```
2531

@@ -38,6 +44,7 @@ resource "iosxe_bgp_l2vpn_evpn_neighbor" "example" {
3844
- `delete_mode` (String) Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is `all`.
3945
- Choices: `all`, `attributes`
4046
- `device` (String) A device name from the provider configuration.
47+
- `route_maps` (Attributes List) Apply route map to neighbor (see [below for nested schema](#nestedatt--route_maps))
4148
- `route_reflector_client` (Boolean) Configure a neighbor as Route Reflector client
4249
- `send_community` (String) - Choices: `both`, `extended`, `standard`
4350
- `soft_reconfiguration` (String) Per neighbor soft reconfiguration
@@ -47,6 +54,14 @@ resource "iosxe_bgp_l2vpn_evpn_neighbor" "example" {
4754

4855
- `id` (String) The path of the object.
4956

57+
<a id="nestedatt--route_maps"></a>
58+
### Nested Schema for `route_maps`
59+
60+
Required:
61+
62+
- `in_out` (String) - Choices: `in`, `out`
63+
- `route_map_name` (String)
64+
5065
## Import
5166

5267
Import is supported using the following syntax:

examples/resources/iosxe_bgp_address_family_ipv4_vrf/resource.tf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
1111
{
1212
ipv4_address = "50.0.0.0"
1313
ipv4_mask = "255.255.0.0"
14+
summary_only = true
1415
}
1516
]
1617
ipv4_unicast_redistribute_static = true
@@ -36,11 +37,12 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
3637
wildcard = "0.0.0.0"
3738
}
3839
]
39-
ipv4_unicast_distance_bgp_external = 20
40-
ipv4_unicast_distance_bgp_internal = 200
41-
ipv4_unicast_distance_bgp_local = 200
42-
ipv4_unicast_maximum_paths_ebgp = 2
43-
ipv4_unicast_maximum_paths_ibgp = 2
40+
ipv4_unicast_distance_bgp_external = 20
41+
ipv4_unicast_distance_bgp_internal = 200
42+
ipv4_unicast_distance_bgp_local = 200
43+
ipv4_unicast_maximum_paths_ebgp = 2
44+
ipv4_unicast_maximum_paths_ibgp = 2
45+
ipv4_unicast_import_path_selection_all = true
4446
}
4547
]
4648
}

examples/resources/iosxe_bgp_l2vpn_evpn_neighbor/resource.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,10 @@ resource "iosxe_bgp_l2vpn_evpn_neighbor" "example" {
55
send_community = "both"
66
route_reflector_client = false
77
soft_reconfiguration = "inbound"
8+
route_maps = [
9+
{
10+
in_out = "in"
11+
route_map_name = "RM1"
12+
}
13+
]
814
}

gen/definitions/bgp_address_family_ipv4_vrf.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ attributes:
4141
- yang_name: ipv4-mask
4242
id: true
4343
example: 255.255.0.0
44+
- yang_name: summary-only
45+
example: true
4446
- yang_name: ipv4-unicast/redistribute-vrf/static
4547
tf_name: ipv4_unicast_redistribute_static
4648
example: true
@@ -118,6 +120,8 @@ attributes:
118120
tf_name: ipv4_unicast_maximum_paths_ibgp
119121
xpath: ipv4-unicast/maximum-paths/ibgp/max
120122
example: 2
123+
- yang_name: ipv4-unicast/import/path/selection/all
124+
example: true
121125
test_prerequisites:
122126
- path: /Cisco-IOS-XE-native:native/vrf/definition[name=VRF1]
123127
no_delete: true

gen/definitions/bgp_l2vpn_evpn_neighbor.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ attributes:
2323
example: false
2424
- yang_name: soft-reconfiguration
2525
example: inbound
26+
- yang_name: route-map
27+
tf_name: route_maps
28+
type: List
29+
attributes:
30+
- yang_name: inout
31+
tf_name: in_out
32+
id: true
33+
example: in
34+
- yang_name: route-map-name
35+
example: RM1
2636
test_prerequisites:
2737
- path: /Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-bgp:bgp[id=65000]
2838
attributes:
@@ -40,3 +50,8 @@ test_prerequisites:
4050
- name: remote-as
4151
value: 65000
4252
dependencies: [0]
53+
- path: Cisco-IOS-XE-native:native/route-map=RM1
54+
attributes:
55+
- name: name
56+
value: RM1
57+

0 commit comments

Comments
 (0)