Skip to content

Commit

Permalink
Add bfd attributes to bgp resources
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Jul 29, 2023
1 parent b127fe9 commit 044d466
Show file tree
Hide file tree
Showing 30 changed files with 557 additions and 479 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- Add `iosxr_flow_exporter_map` resource and data source
- Add `bgp_bestpath` attributes to `iosxr_router_bgp` resource and data source
- Add `flow_ipv4` and `flow_ipv6` attributes to `iosxr_interface` resource and data source
- BREAKING CHANGE: Remove `neighbor_groups` attributes from `iosxr_router_bgp` resource and data source
- Add `bfd_fast_detect` attributes to `iosxr_router_bgp` resource and data source
- Add `bfd_multiplier` and `bfd_fast_detect` attributes to `iosxr_router_bgp_neighbor_group` resource and data source
- Add `bfd_fast_detect` attributes to `iosxr_router_bgp_vrf` resource and data source

## 0.2.2

Expand Down
17 changes: 3 additions & 14 deletions docs/data-sources/router_bgp.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ data "iosxr_router_bgp" "example" {
- `default_metric` (Number) default redistributed metric
- `ibgp_policy_out_enforce_modifications` (Boolean) Allow policy to modify all attributes
- `id` (String) The path of the retrieved object.
- `neighbor_groups` (Attributes List) Specify a Neighbor-group (see [below for nested schema](#nestedatt--neighbor_groups))
- `neighbors` (Attributes List) Neighbor address (see [below for nested schema](#nestedatt--neighbors))
- `nexthop_validation_color_extcomm_disable` (Boolean) Disable next-hop reachability validation for color-extcomm path
- `nexthop_validation_color_extcomm_sr_policy` (Boolean) Enable BGP next-hop reachability validation by SR Policy for color-extcomm paths
Expand All @@ -65,24 +64,14 @@ data "iosxr_router_bgp" "example" {
- `timers_bgp_keepalive_interval` (Number) BGP timers
- `timers_bgp_minimum_acceptable_holdtime` (String) Minimum acceptable holdtime from neighbor. Set 0 to disable keepalives/hold time.

<a id="nestedatt--neighbor_groups"></a>
### Nested Schema for `neighbor_groups`

Read-Only:

- `ao_include_tcp_options_enable` (Boolean) Include other TCP options in the header
- `ao_key_chain_name` (String) Name of the key chain - maximum 32 characters
- `bfd_minimum_interval` (Number) Hello interval
- `name` (String) Specify a Neighbor-group
- `remote_as` (String) bgp as-number
- `update_source` (String) Source of routing updates


<a id="nestedatt--neighbors"></a>
### Nested Schema for `neighbors`

Read-Only:

- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_inheritance_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- `bfd_multiplier` (Number) Detect multiplier
- `description` (String) Neighbor specific description
Expand Down
3 changes: 3 additions & 0 deletions docs/data-sources/router_bgp_neighbor_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ data "iosxr_router_bgp_neighbor_group" "example" {
- `ao_include_tcp_options_enable` (Boolean) Include other TCP options in the header
- `ao_key_chain_name` (String) Name of the key chain - maximum 32 characters
- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_inheritance_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- `bfd_multiplier` (Number) Detect multiplier
- `id` (String) The path of the retrieved object.
- `remote_as` (String) bgp as-number
- `update_source` (String) Source of routing updates
Expand Down
3 changes: 3 additions & 0 deletions docs/data-sources/router_bgp_vrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ data "iosxr_router_bgp_vrf" "example" {

Read-Only:

- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- `bfd_multiplier` (Number) Detect multiplier
- `description` (String) Neighbor specific description
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ description: |-
- Add `iosxr_flow_exporter_map` resource and data source
- Add `bgp_bestpath` attributes to `iosxr_router_bgp` resource and data source
- Add `flow_ipv4` and `flow_ipv6` attributes to `iosxr_interface` resource and data source
- BREAKING CHANGE: Remove `neighbor_groups` attributes from `iosxr_router_bgp` resource and data source
- Add `bfd_fast_detect` attributes to `iosxr_router_bgp` resource and data source
- Add `bfd_multiplier` and `bfd_fast_detect` attributes to `iosxr_router_bgp_neighbor_group` resource and data source
- Add `bfd_fast_detect` attributes to `iosxr_router_bgp_vrf` resource and data source

## 0.2.2

Expand Down
70 changes: 25 additions & 45 deletions docs/resources/router_bgp.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,28 @@ resource "iosxr_router_bgp" "example" {
bgp_bestpath_sr_policy_force = true
neighbors = [
{
neighbor_address = "10.1.1.2"
remote_as = "65002"
description = "My Neighbor Description"
use_neighbor_group = "GROUP1"
ignore_connected_check = true
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
local_as_dual_as = true
password = "12341C2713181F13253920"
shutdown = false
timers_keepalive_interval = 5
timers_holdtime = "20"
timers_minimum_acceptable_holdtime = "10"
update_source = "GigabitEthernet0/0/0/1"
ttl_security = false
}
]
neighbor_groups = [
{
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
neighbor_address = "10.1.1.2"
remote_as = "65002"
description = "My Neighbor Description"
use_neighbor_group = "GROUP1"
ignore_connected_check = true
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_inheritance_disable = true
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
local_as_dual_as = true
password = "12341C2713181F13253920"
shutdown = false
timers_keepalive_interval = 5
timers_holdtime = "20"
timers_minimum_acceptable_holdtime = "10"
update_source = "GigabitEthernet0/0/0/1"
ttl_security = false
}
]
}
Expand Down Expand Up @@ -117,7 +112,6 @@ resource "iosxr_router_bgp" "example" {
- Choices: `all`, `attributes`
- `device` (String) A device name from the provider configuration.
- `ibgp_policy_out_enforce_modifications` (Boolean) Allow policy to modify all attributes
- `neighbor_groups` (Attributes List) Specify a Neighbor-group (see [below for nested schema](#nestedatt--neighbor_groups))
- `neighbors` (Attributes List) Neighbor address (see [below for nested schema](#nestedatt--neighbors))
- `nexthop_validation_color_extcomm_disable` (Boolean) Disable next-hop reachability validation for color-extcomm path
- `nexthop_validation_color_extcomm_sr_policy` (Boolean) Enable BGP next-hop reachability validation by SR Policy for color-extcomm paths
Expand All @@ -132,23 +126,6 @@ resource "iosxr_router_bgp" "example" {

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

<a id="nestedatt--neighbor_groups"></a>
### Nested Schema for `neighbor_groups`

Required:

- `name` (String) Specify a Neighbor-group

Optional:

- `ao_include_tcp_options_enable` (Boolean) Include other TCP options in the header
- `ao_key_chain_name` (String) Name of the key chain - maximum 32 characters
- `bfd_minimum_interval` (Number) Hello interval
- Range: `3`-`30000`
- `remote_as` (String) bgp as-number
- `update_source` (String) Source of routing updates


<a id="nestedatt--neighbors"></a>
### Nested Schema for `neighbors`

Expand All @@ -163,6 +140,9 @@ Required:

Optional:

- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_inheritance_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- Range: `3`-`30000`
- `bfd_multiplier` (Number) Detect multiplier
Expand Down
19 changes: 13 additions & 6 deletions docs/resources/router_bgp_neighbor_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ This resource can manage the Router BGP Neighbor Group configuration.

```terraform
resource "iosxr_router_bgp_neighbor_group" "example" {
as_number = "65001"
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
bfd_fast_detect = true
as_number = "65001"
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_inheritance_disable = false
address_families = [
{
af_name = "ipv4-labeled-unicast"
Expand All @@ -45,8 +48,12 @@ resource "iosxr_router_bgp_neighbor_group" "example" {
- `ao_include_tcp_options_enable` (Boolean) Include other TCP options in the header
- `ao_key_chain_name` (String) Name of the key chain - maximum 32 characters
- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_inheritance_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- Range: `3`-`30000`
- `bfd_multiplier` (Number) Detect multiplier
- Range: `2`-`16`
- `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`.
- Choices: `all`, `attributes`
- `device` (String) A device name from the provider configuration.
Expand Down
6 changes: 6 additions & 0 deletions docs/resources/router_bgp_vrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ resource "iosxr_router_bgp_vrf" "example" {
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_disable = false
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
Expand Down Expand Up @@ -102,6 +105,9 @@ Required:

Optional:

- `bfd_fast_detect` (Boolean) Enable Fast detection
- `bfd_fast_detect_disable` (Boolean) Prevent bfd settings from being inherited from the parent
- `bfd_fast_detect_strict_mode` (Boolean) Hold down neighbor session until BFD session is up
- `bfd_minimum_interval` (Number) Hello interval
- Range: `3`-`30000`
- `bfd_multiplier` (Number) Detect multiplier
Expand Down
49 changes: 22 additions & 27 deletions examples/resources/iosxr_router_bgp/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,28 @@ resource "iosxr_router_bgp" "example" {
bgp_bestpath_sr_policy_force = true
neighbors = [
{
neighbor_address = "10.1.1.2"
remote_as = "65002"
description = "My Neighbor Description"
use_neighbor_group = "GROUP1"
ignore_connected_check = true
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
local_as_dual_as = true
password = "12341C2713181F13253920"
shutdown = false
timers_keepalive_interval = 5
timers_holdtime = "20"
timers_minimum_acceptable_holdtime = "10"
update_source = "GigabitEthernet0/0/0/1"
ttl_security = false
}
]
neighbor_groups = [
{
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
neighbor_address = "10.1.1.2"
remote_as = "65002"
description = "My Neighbor Description"
use_neighbor_group = "GROUP1"
ignore_connected_check = true
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_inheritance_disable = true
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
local_as_dual_as = true
password = "12341C2713181F13253920"
shutdown = false
timers_keepalive_interval = 5
timers_holdtime = "20"
timers_minimum_acceptable_holdtime = "10"
update_source = "GigabitEthernet0/0/0/1"
ttl_security = false
}
]
}
15 changes: 9 additions & 6 deletions examples/resources/iosxr_router_bgp_neighbor_group/resource.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
resource "iosxr_router_bgp_neighbor_group" "example" {
as_number = "65001"
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
bfd_fast_detect = true
as_number = "65001"
name = "GROUP1"
remote_as = "65001"
update_source = "Loopback0"
bfd_minimum_interval = 3
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_inheritance_disable = false
address_families = [
{
af_name = "ipv4-labeled-unicast"
Expand Down
3 changes: 3 additions & 0 deletions examples/resources/iosxr_router_bgp_vrf/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ resource "iosxr_router_bgp_vrf" "example" {
ebgp_multihop_maximum_hop_count = 10
bfd_minimum_interval = 10
bfd_multiplier = 4
bfd_fast_detect = true
bfd_fast_detect_strict_mode = false
bfd_fast_detect_disable = false
local_as = "65003"
local_as_no_prepend = true
local_as_replace_as = true
Expand Down
33 changes: 13 additions & 20 deletions gen/definitions/router_bgp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ attributes:
example: 10
- yang_name: bfd/multiplier
example: 4
- yang_name: bfd/fast-detect
example: true
- yang_name: bfd/fast-detect/strict-mode
example: false
- yang_name: bfd/fast-detect/inheritance-disable
example: true
- yang_name: local-as/as-number
tf_name: local_as
example: 65003
Expand All @@ -118,29 +124,16 @@ attributes:
example: GigabitEthernet0/0/0/1
- yang_name: ttl-security
example: false
- yang_name: neighbor-groups/neighbor-group
tf_name: neighbor_groups
type: List
attributes:
- yang_name: neighbor-group-name
tf_name: name
id: true
example: GROUP1
- yang_name: remote-as
example: 65001
- yang_name: update-source
example: Loopback0
- yang_name: ao/key-chain-name
example: BGP-GROUP1-CLIENTS
exclude_test: true
- yang_name: ao/include-tcp-options/enable
example: true
exclude_test: true
- yang_name: bfd/minimum-interval
example: 3

test_prerequisites:
- path: Cisco-IOS-XR-um-router-bgp-cfg:/router/bgp/as[as-number=65001]
attributes:
- name: as-number
value: 65001
lists:
- name: neighbor-groups/neighbor-group
key: neighbor-group-name
items:
- attributes:
- name: neighbor-group-name
value: GROUP1
6 changes: 6 additions & 0 deletions gen/definitions/router_bgp_neighbor_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ attributes:
exclude_test: true
- yang_name: bfd/minimum-interval
example: 3
- yang_name: bfd/multiplier
example: 4
- yang_name: bfd/fast-detect
example: true
- yang_name: bfd/fast-detect/strict-mode
example: false
- yang_name: bfd/fast-detect/inheritance-disable
example: false
- yang_name: address-families/address-family
tf_name: address_families
type: List
Expand Down
6 changes: 6 additions & 0 deletions gen/definitions/router_bgp_vrf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ attributes:
example: 10
- yang_name: bfd/multiplier
example: 4
- yang_name: bfd/fast-detect
example: true
- yang_name: bfd/fast-detect/strict-mode
example: false
- yang_name: bfd/fast-detect/disable
example: false
- yang_name: local-as/as-number
tf_name: local_as
example: 65003
Expand Down
Loading

0 comments on commit 044d466

Please sign in to comment.