Skip to content

Commit 5d1b882

Browse files
authored
Add support for BGP maximum-paths for ebgp and ibgp (#333)
1 parent 41f800b commit 5d1b882

21 files changed

+176
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Add `iosxe_bgp_template_peer_policy` resource
1111
- Add `ip_dhcp_relay_information_option_vpn_id` attribute to `iosxe_interface_ethernet` resource and `iosxe_interface_vlan` resource
1212
- Add `local_routing` attribute to `iosxe_interface_nve` resource and data source
13+
- Add `ipv4_unicast_maximum_paths_ebgp` and `ipv4_unicast_maximum_paths_ibgp` attributes to the `iosxe_bgp_address_family_ipv4` and `iosxe_bgp_address_family_ipv4_vrf` resources
1314

1415
## 0.9.3
1516

docs/data-sources/bgp_address_family_ipv4.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ data "iosxe_bgp_address_family_ipv4" "example" {
3939
- `ipv4_unicast_distance_bgp_external` (Number)
4040
- `ipv4_unicast_distance_bgp_internal` (Number)
4141
- `ipv4_unicast_distance_bgp_local` (Number)
42+
- `ipv4_unicast_maximum_paths_ebgp` (Number) eBGP-multipath
43+
- `ipv4_unicast_maximum_paths_ibgp` (Number) iBGP-multipath
4244
- `ipv4_unicast_networks` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--ipv4_unicast_networks))
4345
- `ipv4_unicast_networks_mask` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--ipv4_unicast_networks_mask))
4446
- `ipv4_unicast_redistribute_connected` (Boolean) Connected

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,8 @@ 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_maximum_paths_ebgp` (Number) eBGP-multipath
51+
- `ipv4_unicast_maximum_paths_ibgp` (Number)
5052
- `ipv4_unicast_networks` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--vrfs--ipv4_unicast_networks))
5153
- `ipv4_unicast_networks_mask` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--vrfs--ipv4_unicast_networks_mask))
5254
- `ipv4_unicast_redistribute_connected` (Boolean) Connected

docs/guides/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ description: |-
1919
- Add `iosxe_bgp_template_peer_policy` resource
2020
- Add `ip_dhcp_relay_information_option_vpn_id` attribute to `iosxe_interface_ethernet` resource and `iosxe_interface_vlan` resource
2121
- Add `local_routing` attribute to `iosxe_interface_nve` resource and data source
22+
- Add `ipv4_unicast_maximum_paths_ebgp` and `ipv4_unicast_maximum_paths_ibgp` attributes to the `iosxe_bgp_address_family_ipv4` and `iosxe_bgp_address_family_ipv4_vrf` resources
2223

2324
## 0.9.3
2425

docs/resources/bgp_address_family_ipv4.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ resource "iosxe_bgp_address_family_ipv4" "example" {
4949
ipv4_unicast_distance_bgp_external = 20
5050
ipv4_unicast_distance_bgp_internal = 200
5151
ipv4_unicast_distance_bgp_local = 200
52+
ipv4_unicast_maximum_paths_ebgp = 2
53+
ipv4_unicast_maximum_paths_ibgp = 2
5254
}
5355
```
5456

@@ -70,6 +72,10 @@ resource "iosxe_bgp_address_family_ipv4" "example" {
7072
- `ipv4_unicast_distance_bgp_external` (Number) - Range: `1`-`255`
7173
- `ipv4_unicast_distance_bgp_internal` (Number) - Range: `1`-`255`
7274
- `ipv4_unicast_distance_bgp_local` (Number) - Range: `1`-`255`
75+
- `ipv4_unicast_maximum_paths_ebgp` (Number) eBGP-multipath
76+
- Range: `1`-`32`
77+
- `ipv4_unicast_maximum_paths_ibgp` (Number) iBGP-multipath
78+
- Range: `1`-`32`
7379
- `ipv4_unicast_networks` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--ipv4_unicast_networks))
7480
- `ipv4_unicast_networks_mask` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--ipv4_unicast_networks_mask))
7581
- `ipv4_unicast_redistribute_connected` (Boolean) Connected

docs/resources/bgp_address_family_ipv4_vrf.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
5454
ipv4_unicast_distance_bgp_external = 20
5555
ipv4_unicast_distance_bgp_internal = 200
5656
ipv4_unicast_distance_bgp_local = 200
57+
ipv4_unicast_maximum_paths_ebgp = 2
58+
ipv4_unicast_maximum_paths_ibgp = 2
5759
}
5860
]
5961
}
@@ -93,6 +95,9 @@ Optional:
9395
- `ipv4_unicast_distance_bgp_external` (Number) - Range: `1`-`255`
9496
- `ipv4_unicast_distance_bgp_internal` (Number) - Range: `1`-`255`
9597
- `ipv4_unicast_distance_bgp_local` (Number) - Range: `1`-`255`
98+
- `ipv4_unicast_maximum_paths_ebgp` (Number) eBGP-multipath
99+
- Range: `1`-`32`
100+
- `ipv4_unicast_maximum_paths_ibgp` (Number) - Range: `1`-`32`
96101
- `ipv4_unicast_networks` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--vrfs--ipv4_unicast_networks))
97102
- `ipv4_unicast_networks_mask` (Attributes List) Specify a network to announce via BGP (see [below for nested schema](#nestedatt--vrfs--ipv4_unicast_networks_mask))
98103
- `ipv4_unicast_redistribute_connected` (Boolean) Connected

examples/resources/iosxe_bgp_address_family_ipv4/resource.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ resource "iosxe_bgp_address_family_ipv4" "example" {
3434
ipv4_unicast_distance_bgp_external = 20
3535
ipv4_unicast_distance_bgp_internal = 200
3636
ipv4_unicast_distance_bgp_local = 200
37+
ipv4_unicast_maximum_paths_ebgp = 2
38+
ipv4_unicast_maximum_paths_ibgp = 2
3739
}

examples/resources/iosxe_bgp_address_family_ipv4_vrf/resource.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ resource "iosxe_bgp_address_family_ipv4_vrf" "example" {
3939
ipv4_unicast_distance_bgp_external = 20
4040
ipv4_unicast_distance_bgp_internal = 200
4141
ipv4_unicast_distance_bgp_local = 200
42+
ipv4_unicast_maximum_paths_ebgp = 2
43+
ipv4_unicast_maximum_paths_ibgp = 2
4244
}
4345
]
4446
}

gen/definitions/bgp_address_family_ipv4.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ attributes:
7777
example: 200
7878
- yang_name: ipv4-unicast/distance/bgp/local
7979
example: 200
80+
- yang_name: ipv4-unicast/maximum-paths/ebgp
81+
tf_name: ipv4_unicast_maximum_paths_ebgp
82+
example: 2
83+
- yang_name: ipv4-unicast/maximum-paths/ibgp-leaf
84+
tf_name: ipv4_unicast_maximum_paths_ibgp
85+
example: 2
8086

8187
test_prerequisites:
8288
- path: Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-bgp:bgp=65000

gen/definitions/bgp_address_family_ipv4_vrf.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ attributes:
2929
- yang_name: ipv4-unicast/bgp/router-id/id-choice/ip-id/ip-id
3030
xpath: ipv4-unicast/bgp/router-id/ip-id
3131
tf_name: ipv4_unicast_router_id_ip
32+
exclude_test: true
3233
example: 10.1.1.1
3334
exclude_test: true
3435
- yang_name: ipv4-unicast/aggregate-address
@@ -111,7 +112,13 @@ attributes:
111112
example: 200
112113
- yang_name: ipv4-unicast/distance/bgp/local
113114
example: 200
114-
115+
- yang_name: ipv4-unicast/maximum-paths/ebgp
116+
tf_name: ipv4_unicast_maximum_paths_ebgp
117+
example: 2
118+
- yang_name: ipv4-unicast/maximum-paths/ibgp/ibgp-choice/max/max
119+
tf_name: ipv4_unicast_maximum_paths_ibgp
120+
xpath: ipv4-unicast/maximum-paths/ibgp/max
121+
example: 2
115122
test_prerequisites:
116123
- path: Cisco-IOS-XE-native:native/vrf/definition=VRF1
117124
no_delete: true

0 commit comments

Comments
 (0)