Skip to content

Commit feb928a

Browse files
authored
Add attributes to bgp resource (#344)
1 parent afef2bd commit feb928a

File tree

10 files changed

+106
-0
lines changed

10 files changed

+106
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Add `local_routing` attribute to `iosxe_interface_nve` resource and data source
1313
- 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
1414
- Add `ip_cef_load_sharing_algorithm_include_ports_source`, `ip_cef_load_sharing_algorithm_include_ports_destination`, `ipv6_cef_load_sharing_algorithm_include_ports_source`, `ipv6_cef_load_sharing_algorithm_include_ports_destination`, and `port_channel_load_balance` attributes to `iosxe_system` resource and data source
15+
- Add `router_id_ip`, `bgp_graceful_restart`, and `bgp_update_delay` to `iosxe_bgp` resource and data source
1516

1617
## 0.9.3
1718

docs/data-sources/bgp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ data "iosxe_bgp" "example" {
3131

3232
### Read-Only
3333

34+
- `bgp_graceful_restart` (Boolean) Graceful restart capability parameters
35+
- `bgp_update_delay` (Number) Set the max initial delay for sending update
3436
- `default_ipv4_unicast` (Boolean) Activate ipv4-unicast for a peer by default
3537
- `id` (String) The path of the retrieved object.
3638
- `log_neighbor_changes` (Boolean) Log neighbor up/down and reset reason

docs/resources/bgp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ resource "iosxe_bgp" "example" {
1717
asn = "65000"
1818
default_ipv4_unicast = false
1919
log_neighbor_changes = true
20+
router_id_ip = "172.16.255.1"
21+
bgp_graceful_restart = true
22+
bgp_update_delay = 200
2023
router_id_loopback = 100
2124
}
2225
```
@@ -30,6 +33,9 @@ resource "iosxe_bgp" "example" {
3033

3134
### Optional
3235

36+
- `bgp_graceful_restart` (Boolean) Graceful restart capability parameters
37+
- `bgp_update_delay` (Number) Set the max initial delay for sending update
38+
- Range: `1`-`3600`
3339
- `default_ipv4_unicast` (Boolean) Activate ipv4-unicast for a peer by default
3440
- `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`.
3541
- Choices: `all`, `attributes`

examples/resources/iosxe_bgp/resource.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ resource "iosxe_bgp" "example" {
22
asn = "65000"
33
default_ipv4_unicast = false
44
log_neighbor_changes = true
5+
router_id_ip = "172.16.255.1"
6+
bgp_graceful_restart = true
7+
bgp_update_delay = 200
58
router_id_loopback = 100
69
}

gen/definitions/bgp.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ attributes:
1616
xpath: bgp/router-id/interface/Loopback
1717
tf_name: router_id_loopback
1818
example: 100
19+
exclude_test: true
1920
- yang_name: bgp/router-id/id-choice/ip-id/ip-id
2021
xpath: bgp/router-id/ip-id
2122
tf_name: router_id_ip
2223
example: 172.16.255.1
2324
exclude_test: true
25+
- yang_name: bgp/gr-options/graceful-restart
26+
tf_name: bgp_graceful_restart
27+
example: true
28+
- yang_name: bgp/update-delay
29+
example: 200
2430
test_prerequisites:
2531
- path: Cisco-IOS-XE-native:native/interface/Loopback=100
2632
attributes:

internal/provider/data_source_iosxe_bgp.go

Lines changed: 8 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_bgp_test.go

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

internal/provider/model_iosxe_bgp.go

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

internal/provider/resource_iosxe_bgp.go

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

internal/provider/resource_iosxe_bgp_test.go

Lines changed: 6 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)