diff --git a/CHANGELOG.md b/CHANGELOG.md index 52e5dfec..fa54ab14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/data-sources/router_bgp.md b/docs/data-sources/router_bgp.md index 512f02cf..944e104b 100644 --- a/docs/data-sources/router_bgp.md +++ b/docs/data-sources/router_bgp.md @@ -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 @@ -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. - -### 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 - - ### 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 diff --git a/docs/data-sources/router_bgp_neighbor_group.md b/docs/data-sources/router_bgp_neighbor_group.md index 9a0c2546..02781921 100644 --- a/docs/data-sources/router_bgp_neighbor_group.md +++ b/docs/data-sources/router_bgp_neighbor_group.md @@ -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 diff --git a/docs/data-sources/router_bgp_vrf.md b/docs/data-sources/router_bgp_vrf.md index 695cd8a4..8ae82230 100644 --- a/docs/data-sources/router_bgp_vrf.md +++ b/docs/data-sources/router_bgp_vrf.md @@ -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 diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index dadee077..acd2d531 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -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 diff --git a/docs/resources/router_bgp.md b/docs/resources/router_bgp.md index 984ccca4..9bd938bf 100644 --- a/docs/resources/router_bgp.md +++ b/docs/resources/router_bgp.md @@ -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 } ] } @@ -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 @@ -132,23 +126,6 @@ resource "iosxr_router_bgp" "example" { - `id` (String) The path of the object. - -### 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 - - ### Nested Schema for `neighbors` @@ -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 diff --git a/docs/resources/router_bgp_neighbor_group.md b/docs/resources/router_bgp_neighbor_group.md index bfac100c..907950c4 100644 --- a/docs/resources/router_bgp_neighbor_group.md +++ b/docs/resources/router_bgp_neighbor_group.md @@ -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" @@ -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. diff --git a/docs/resources/router_bgp_vrf.md b/docs/resources/router_bgp_vrf.md index 5b84c48d..55b06508 100644 --- a/docs/resources/router_bgp_vrf.md +++ b/docs/resources/router_bgp_vrf.md @@ -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 @@ -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 diff --git a/examples/resources/iosxr_router_bgp/resource.tf b/examples/resources/iosxr_router_bgp/resource.tf index ec3f9f0b..c591200d 100644 --- a/examples/resources/iosxr_router_bgp/resource.tf +++ b/examples/resources/iosxr_router_bgp/resource.tf @@ -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 } ] } diff --git a/examples/resources/iosxr_router_bgp_neighbor_group/resource.tf b/examples/resources/iosxr_router_bgp_neighbor_group/resource.tf index 8e0ab96c..e50b2087 100644 --- a/examples/resources/iosxr_router_bgp_neighbor_group/resource.tf +++ b/examples/resources/iosxr_router_bgp_neighbor_group/resource.tf @@ -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" diff --git a/examples/resources/iosxr_router_bgp_vrf/resource.tf b/examples/resources/iosxr_router_bgp_vrf/resource.tf index 74953a73..b1a660d5 100644 --- a/examples/resources/iosxr_router_bgp_vrf/resource.tf +++ b/examples/resources/iosxr_router_bgp_vrf/resource.tf @@ -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 diff --git a/gen/definitions/router_bgp.yaml b/gen/definitions/router_bgp.yaml index 53b36f9f..8034ce6b 100644 --- a/gen/definitions/router_bgp.yaml +++ b/gen/definitions/router_bgp.yaml @@ -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 @@ -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 diff --git a/gen/definitions/router_bgp_neighbor_group.yaml b/gen/definitions/router_bgp_neighbor_group.yaml index 34c75c81..f8bb8588 100644 --- a/gen/definitions/router_bgp_neighbor_group.yaml +++ b/gen/definitions/router_bgp_neighbor_group.yaml @@ -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 diff --git a/gen/definitions/router_bgp_vrf.yaml b/gen/definitions/router_bgp_vrf.yaml index 92929331..f1f99b26 100644 --- a/gen/definitions/router_bgp_vrf.yaml +++ b/gen/definitions/router_bgp_vrf.yaml @@ -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 diff --git a/internal/provider/data_source_iosxr_router_bgp.go b/internal/provider/data_source_iosxr_router_bgp.go index 8f20d058..28ed02b8 100644 --- a/internal/provider/data_source_iosxr_router_bgp.go +++ b/internal/provider/data_source_iosxr_router_bgp.go @@ -223,6 +223,18 @@ func (d *RouterBGPDataSource) Schema(ctx context.Context, req datasource.SchemaR MarkdownDescription: "Detect multiplier", Computed: true, }, + "bfd_fast_detect": schema.BoolAttribute{ + MarkdownDescription: "Enable Fast detection", + Computed: true, + }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: "Hold down neighbor session until BFD session is up", + Computed: true, + }, + "bfd_fast_detect_inheritance_disable": schema.BoolAttribute{ + MarkdownDescription: "Prevent bfd settings from being inherited from the parent", + Computed: true, + }, "local_as": schema.StringAttribute{ MarkdownDescription: "bgp as-number", Computed: true, @@ -270,38 +282,6 @@ func (d *RouterBGPDataSource) Schema(ctx context.Context, req datasource.SchemaR }, }, }, - "neighbor_groups": schema.ListNestedAttribute{ - MarkdownDescription: "Specify a Neighbor-group", - Computed: true, - NestedObject: schema.NestedAttributeObject{ - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - MarkdownDescription: "Specify a Neighbor-group", - Computed: true, - }, - "remote_as": schema.StringAttribute{ - MarkdownDescription: "bgp as-number", - Computed: true, - }, - "update_source": schema.StringAttribute{ - MarkdownDescription: "Source of routing updates", - Computed: true, - }, - "ao_key_chain_name": schema.StringAttribute{ - MarkdownDescription: "Name of the key chain - maximum 32 characters", - Computed: true, - }, - "ao_include_tcp_options_enable": schema.BoolAttribute{ - MarkdownDescription: "Include other TCP options in the header", - Computed: true, - }, - "bfd_minimum_interval": schema.Int64Attribute{ - MarkdownDescription: "Hello interval", - Computed: true, - }, - }, - }, - }, }, } } diff --git a/internal/provider/data_source_iosxr_router_bgp_neighbor_group.go b/internal/provider/data_source_iosxr_router_bgp_neighbor_group.go index 7879d371..ec44c5eb 100644 --- a/internal/provider/data_source_iosxr_router_bgp_neighbor_group.go +++ b/internal/provider/data_source_iosxr_router_bgp_neighbor_group.go @@ -90,10 +90,22 @@ func (d *RouterBGPNeighborGroupDataSource) Schema(ctx context.Context, req datas MarkdownDescription: "Hello interval", Computed: true, }, + "bfd_multiplier": schema.Int64Attribute{ + MarkdownDescription: "Detect multiplier", + Computed: true, + }, "bfd_fast_detect": schema.BoolAttribute{ MarkdownDescription: "Enable Fast detection", Computed: true, }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: "Hold down neighbor session until BFD session is up", + Computed: true, + }, + "bfd_fast_detect_inheritance_disable": schema.BoolAttribute{ + MarkdownDescription: "Prevent bfd settings from being inherited from the parent", + Computed: true, + }, "address_families": schema.ListNestedAttribute{ MarkdownDescription: "Enter Address Family command mode", Computed: true, diff --git a/internal/provider/data_source_iosxr_router_bgp_neighbor_group_test.go b/internal/provider/data_source_iosxr_router_bgp_neighbor_group_test.go index fd67eb45..bcbfc604 100644 --- a/internal/provider/data_source_iosxr_router_bgp_neighbor_group_test.go +++ b/internal/provider/data_source_iosxr_router_bgp_neighbor_group_test.go @@ -30,7 +30,10 @@ func TestAccDataSourceIosxrRouterBGPNeighborGroup(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "remote_as", "65001")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "update_source", "Loopback0")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "bfd_minimum_interval", "3")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "bfd_multiplier", "4")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect_inheritance_disable", "false")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "address_families.0.af_name", "ipv4-labeled-unicast")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "address_families.0.soft_reconfiguration_inbound_always", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_neighbor_group.test", "address_families.0.next_hop_self_inheritance_disable", "true")) @@ -65,7 +68,10 @@ func testAccDataSourceIosxrRouterBGPNeighborGroupConfig() string { config += ` remote_as = "65001"` + "\n" config += ` update_source = "Loopback0"` + "\n" config += ` bfd_minimum_interval = 3` + "\n" + config += ` bfd_multiplier = 4` + "\n" config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_inheritance_disable = false` + "\n" config += ` address_families = [{` + "\n" config += ` af_name = "ipv4-labeled-unicast"` + "\n" config += ` soft_reconfiguration_inbound_always = true` + "\n" diff --git a/internal/provider/data_source_iosxr_router_bgp_test.go b/internal/provider/data_source_iosxr_router_bgp_test.go index 5f61d6f1..b53ae2d7 100644 --- a/internal/provider/data_source_iosxr_router_bgp_test.go +++ b/internal/provider/data_source_iosxr_router_bgp_test.go @@ -65,6 +65,9 @@ func TestAccDataSourceIosxrRouterBGP(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.ebgp_multihop_maximum_hop_count", "10")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.bfd_minimum_interval", "10")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.bfd_multiplier", "4")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect_inheritance_disable", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.local_as", "65003")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.local_as_no_prepend", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.local_as_replace_as", "true")) @@ -76,10 +79,6 @@ func TestAccDataSourceIosxrRouterBGP(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.timers_minimum_acceptable_holdtime", "10")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.update_source", "GigabitEthernet0/0/0/1")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbors.0.ttl_security", "false")) - checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbor_groups.0.name", "GROUP1")) - checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbor_groups.0.remote_as", "65001")) - checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbor_groups.0.update_source", "Loopback0")) - checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp.test", "neighbor_groups.0.bfd_minimum_interval", "3")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, @@ -98,6 +97,17 @@ resource "iosxr_gnmi" "PreReq0" { attributes = { "as-number" = "65001" } + lists = [ + { + name = "neighbor-groups/neighbor-group" + key = "neighbor-group-name" + items = [ + { + "neighbor-group-name" = "GROUP1" + }, + ] + }, + ] } ` @@ -145,6 +155,9 @@ func testAccDataSourceIosxrRouterBGPConfig() string { config += ` ebgp_multihop_maximum_hop_count = 10` + "\n" config += ` bfd_minimum_interval = 10` + "\n" config += ` bfd_multiplier = 4` + "\n" + config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_inheritance_disable = true` + "\n" config += ` local_as = "65003"` + "\n" config += ` local_as_no_prepend = true` + "\n" config += ` local_as_replace_as = true` + "\n" @@ -157,12 +170,6 @@ func testAccDataSourceIosxrRouterBGPConfig() string { config += ` update_source = "GigabitEthernet0/0/0/1"` + "\n" config += ` ttl_security = false` + "\n" config += ` }]` + "\n" - config += ` neighbor_groups = [{` + "\n" - config += ` name = "GROUP1"` + "\n" - config += ` remote_as = "65001"` + "\n" - config += ` update_source = "Loopback0"` + "\n" - config += ` bfd_minimum_interval = 3` + "\n" - config += ` }]` + "\n" config += ` depends_on = [iosxr_gnmi.PreReq0, ]` + "\n" config += `}` + "\n" diff --git a/internal/provider/data_source_iosxr_router_bgp_vrf.go b/internal/provider/data_source_iosxr_router_bgp_vrf.go index b5b7776c..d08c0ffe 100644 --- a/internal/provider/data_source_iosxr_router_bgp_vrf.go +++ b/internal/provider/data_source_iosxr_router_bgp_vrf.go @@ -155,6 +155,18 @@ func (d *RouterBGPVRFDataSource) Schema(ctx context.Context, req datasource.Sche MarkdownDescription: "Detect multiplier", Computed: true, }, + "bfd_fast_detect": schema.BoolAttribute{ + MarkdownDescription: "Enable Fast detection", + Computed: true, + }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: "Hold down neighbor session until BFD session is up", + Computed: true, + }, + "bfd_fast_detect_disable": schema.BoolAttribute{ + MarkdownDescription: "Prevent bfd settings from being inherited from the parent", + Computed: true, + }, "local_as": schema.StringAttribute{ MarkdownDescription: "bgp as-number", Computed: true, diff --git a/internal/provider/data_source_iosxr_router_bgp_vrf_test.go b/internal/provider/data_source_iosxr_router_bgp_vrf_test.go index cd275462..b13ffa58 100644 --- a/internal/provider/data_source_iosxr_router_bgp_vrf_test.go +++ b/internal/provider/data_source_iosxr_router_bgp_vrf_test.go @@ -43,6 +43,9 @@ func TestAccDataSourceIosxrRouterBGPVRF(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.ebgp_multihop_maximum_hop_count", "10")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.bfd_minimum_interval", "10")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.bfd_multiplier", "4")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect_disable", "false")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.local_as", "65003")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.local_as_no_prepend", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.iosxr_router_bgp_vrf.test", "neighbors.0.local_as_replace_as", "true")) @@ -97,6 +100,9 @@ func testAccDataSourceIosxrRouterBGPVRFConfig() string { config += ` ebgp_multihop_maximum_hop_count = 10` + "\n" config += ` bfd_minimum_interval = 10` + "\n" config += ` bfd_multiplier = 4` + "\n" + config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_disable = false` + "\n" config += ` local_as = "65003"` + "\n" config += ` local_as_no_prepend = true` + "\n" config += ` local_as_replace_as = true` + "\n" diff --git a/internal/provider/model_iosxr_router_bgp.go b/internal/provider/model_iosxr_router_bgp.go index 8440f453..cd18efbb 100644 --- a/internal/provider/model_iosxr_router_bgp.go +++ b/internal/provider/model_iosxr_router_bgp.go @@ -31,80 +31,78 @@ import ( ) type RouterBGP struct { - Device types.String `tfsdk:"device"` - Id types.String `tfsdk:"id"` - DeleteMode types.String `tfsdk:"delete_mode"` - AsNumber types.String `tfsdk:"as_number"` - DefaultInformationOriginate types.Bool `tfsdk:"default_information_originate"` - DefaultMetric types.Int64 `tfsdk:"default_metric"` - NsrDisable types.Bool `tfsdk:"nsr_disable"` - BgpRedistributeInternal types.Bool `tfsdk:"bgp_redistribute_internal"` - SegmentRoutingSrv6Locator types.String `tfsdk:"segment_routing_srv6_locator"` - TimersBgpKeepaliveInterval types.Int64 `tfsdk:"timers_bgp_keepalive_interval"` - TimersBgpHoldtime types.String `tfsdk:"timers_bgp_holdtime"` - TimersBgpMinimumAcceptableHoldtime types.String `tfsdk:"timers_bgp_minimum_acceptable_holdtime"` - BgpRouterId types.String `tfsdk:"bgp_router_id"` - BgpGracefulRestartGracefulReset types.Bool `tfsdk:"bgp_graceful_restart_graceful_reset"` - IbgpPolicyOutEnforceModifications types.Bool `tfsdk:"ibgp_policy_out_enforce_modifications"` - BgpLogNeighborChangesDetail types.Bool `tfsdk:"bgp_log_neighbor_changes_detail"` - BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` - BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` - NexthopValidationColorExtcommSrPolicy types.Bool `tfsdk:"nexthop_validation_color_extcomm_sr_policy"` - NexthopValidationColorExtcommDisable types.Bool `tfsdk:"nexthop_validation_color_extcomm_disable"` - BgpBestpathAsPathIgnore types.Bool `tfsdk:"bgp_bestpath_as_path_ignore"` - BgpBestpathAsPathMultipathRelax types.Bool `tfsdk:"bgp_bestpath_as_path_multipath_relax"` - BgpBestpathCostCommunityIgnore types.Bool `tfsdk:"bgp_bestpath_cost_community_ignore"` - BgpBestpathCompareRouterid types.Bool `tfsdk:"bgp_bestpath_compare_routerid"` - BgpBestpathAigpIgnore types.Bool `tfsdk:"bgp_bestpath_aigp_ignore"` - BgpBestpathIgpMetricIgnore types.Bool `tfsdk:"bgp_bestpath_igp_metric_ignore"` - BgpBestpathIgpMetricSrPolicy types.Bool `tfsdk:"bgp_bestpath_igp_metric_sr_policy"` - BgpBestpathMedAlways types.Bool `tfsdk:"bgp_bestpath_med_always"` - BgpBestpathMedConfed types.Bool `tfsdk:"bgp_bestpath_med_confed"` - BgpBestpathMedMissingAsWorst types.Bool `tfsdk:"bgp_bestpath_med_missing_as_worst"` - BgpBestpathOriginAsUseValidity types.Bool `tfsdk:"bgp_bestpath_origin_as_use_validity"` - BgpBestpathOriginAsAllowInvalid types.Bool `tfsdk:"bgp_bestpath_origin_as_allow_invalid"` - BgpBestpathSrPolicyPrefer types.Bool `tfsdk:"bgp_bestpath_sr_policy_prefer"` - BgpBestpathSrPolicyForce types.Bool `tfsdk:"bgp_bestpath_sr_policy_force"` - Neighbors []RouterBGPNeighbors `tfsdk:"neighbors"` - NeighborGroups []RouterBGPNeighborGroups `tfsdk:"neighbor_groups"` + Device types.String `tfsdk:"device"` + Id types.String `tfsdk:"id"` + DeleteMode types.String `tfsdk:"delete_mode"` + AsNumber types.String `tfsdk:"as_number"` + DefaultInformationOriginate types.Bool `tfsdk:"default_information_originate"` + DefaultMetric types.Int64 `tfsdk:"default_metric"` + NsrDisable types.Bool `tfsdk:"nsr_disable"` + BgpRedistributeInternal types.Bool `tfsdk:"bgp_redistribute_internal"` + SegmentRoutingSrv6Locator types.String `tfsdk:"segment_routing_srv6_locator"` + TimersBgpKeepaliveInterval types.Int64 `tfsdk:"timers_bgp_keepalive_interval"` + TimersBgpHoldtime types.String `tfsdk:"timers_bgp_holdtime"` + TimersBgpMinimumAcceptableHoldtime types.String `tfsdk:"timers_bgp_minimum_acceptable_holdtime"` + BgpRouterId types.String `tfsdk:"bgp_router_id"` + BgpGracefulRestartGracefulReset types.Bool `tfsdk:"bgp_graceful_restart_graceful_reset"` + IbgpPolicyOutEnforceModifications types.Bool `tfsdk:"ibgp_policy_out_enforce_modifications"` + BgpLogNeighborChangesDetail types.Bool `tfsdk:"bgp_log_neighbor_changes_detail"` + BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` + BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + NexthopValidationColorExtcommSrPolicy types.Bool `tfsdk:"nexthop_validation_color_extcomm_sr_policy"` + NexthopValidationColorExtcommDisable types.Bool `tfsdk:"nexthop_validation_color_extcomm_disable"` + BgpBestpathAsPathIgnore types.Bool `tfsdk:"bgp_bestpath_as_path_ignore"` + BgpBestpathAsPathMultipathRelax types.Bool `tfsdk:"bgp_bestpath_as_path_multipath_relax"` + BgpBestpathCostCommunityIgnore types.Bool `tfsdk:"bgp_bestpath_cost_community_ignore"` + BgpBestpathCompareRouterid types.Bool `tfsdk:"bgp_bestpath_compare_routerid"` + BgpBestpathAigpIgnore types.Bool `tfsdk:"bgp_bestpath_aigp_ignore"` + BgpBestpathIgpMetricIgnore types.Bool `tfsdk:"bgp_bestpath_igp_metric_ignore"` + BgpBestpathIgpMetricSrPolicy types.Bool `tfsdk:"bgp_bestpath_igp_metric_sr_policy"` + BgpBestpathMedAlways types.Bool `tfsdk:"bgp_bestpath_med_always"` + BgpBestpathMedConfed types.Bool `tfsdk:"bgp_bestpath_med_confed"` + BgpBestpathMedMissingAsWorst types.Bool `tfsdk:"bgp_bestpath_med_missing_as_worst"` + BgpBestpathOriginAsUseValidity types.Bool `tfsdk:"bgp_bestpath_origin_as_use_validity"` + BgpBestpathOriginAsAllowInvalid types.Bool `tfsdk:"bgp_bestpath_origin_as_allow_invalid"` + BgpBestpathSrPolicyPrefer types.Bool `tfsdk:"bgp_bestpath_sr_policy_prefer"` + BgpBestpathSrPolicyForce types.Bool `tfsdk:"bgp_bestpath_sr_policy_force"` + Neighbors []RouterBGPNeighbors `tfsdk:"neighbors"` } type RouterBGPData struct { - Device types.String `tfsdk:"device"` - Id types.String `tfsdk:"id"` - AsNumber types.String `tfsdk:"as_number"` - DefaultInformationOriginate types.Bool `tfsdk:"default_information_originate"` - DefaultMetric types.Int64 `tfsdk:"default_metric"` - NsrDisable types.Bool `tfsdk:"nsr_disable"` - BgpRedistributeInternal types.Bool `tfsdk:"bgp_redistribute_internal"` - SegmentRoutingSrv6Locator types.String `tfsdk:"segment_routing_srv6_locator"` - TimersBgpKeepaliveInterval types.Int64 `tfsdk:"timers_bgp_keepalive_interval"` - TimersBgpHoldtime types.String `tfsdk:"timers_bgp_holdtime"` - TimersBgpMinimumAcceptableHoldtime types.String `tfsdk:"timers_bgp_minimum_acceptable_holdtime"` - BgpRouterId types.String `tfsdk:"bgp_router_id"` - BgpGracefulRestartGracefulReset types.Bool `tfsdk:"bgp_graceful_restart_graceful_reset"` - IbgpPolicyOutEnforceModifications types.Bool `tfsdk:"ibgp_policy_out_enforce_modifications"` - BgpLogNeighborChangesDetail types.Bool `tfsdk:"bgp_log_neighbor_changes_detail"` - BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` - BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` - NexthopValidationColorExtcommSrPolicy types.Bool `tfsdk:"nexthop_validation_color_extcomm_sr_policy"` - NexthopValidationColorExtcommDisable types.Bool `tfsdk:"nexthop_validation_color_extcomm_disable"` - BgpBestpathAsPathIgnore types.Bool `tfsdk:"bgp_bestpath_as_path_ignore"` - BgpBestpathAsPathMultipathRelax types.Bool `tfsdk:"bgp_bestpath_as_path_multipath_relax"` - BgpBestpathCostCommunityIgnore types.Bool `tfsdk:"bgp_bestpath_cost_community_ignore"` - BgpBestpathCompareRouterid types.Bool `tfsdk:"bgp_bestpath_compare_routerid"` - BgpBestpathAigpIgnore types.Bool `tfsdk:"bgp_bestpath_aigp_ignore"` - BgpBestpathIgpMetricIgnore types.Bool `tfsdk:"bgp_bestpath_igp_metric_ignore"` - BgpBestpathIgpMetricSrPolicy types.Bool `tfsdk:"bgp_bestpath_igp_metric_sr_policy"` - BgpBestpathMedAlways types.Bool `tfsdk:"bgp_bestpath_med_always"` - BgpBestpathMedConfed types.Bool `tfsdk:"bgp_bestpath_med_confed"` - BgpBestpathMedMissingAsWorst types.Bool `tfsdk:"bgp_bestpath_med_missing_as_worst"` - BgpBestpathOriginAsUseValidity types.Bool `tfsdk:"bgp_bestpath_origin_as_use_validity"` - BgpBestpathOriginAsAllowInvalid types.Bool `tfsdk:"bgp_bestpath_origin_as_allow_invalid"` - BgpBestpathSrPolicyPrefer types.Bool `tfsdk:"bgp_bestpath_sr_policy_prefer"` - BgpBestpathSrPolicyForce types.Bool `tfsdk:"bgp_bestpath_sr_policy_force"` - Neighbors []RouterBGPNeighbors `tfsdk:"neighbors"` - NeighborGroups []RouterBGPNeighborGroups `tfsdk:"neighbor_groups"` + Device types.String `tfsdk:"device"` + Id types.String `tfsdk:"id"` + AsNumber types.String `tfsdk:"as_number"` + DefaultInformationOriginate types.Bool `tfsdk:"default_information_originate"` + DefaultMetric types.Int64 `tfsdk:"default_metric"` + NsrDisable types.Bool `tfsdk:"nsr_disable"` + BgpRedistributeInternal types.Bool `tfsdk:"bgp_redistribute_internal"` + SegmentRoutingSrv6Locator types.String `tfsdk:"segment_routing_srv6_locator"` + TimersBgpKeepaliveInterval types.Int64 `tfsdk:"timers_bgp_keepalive_interval"` + TimersBgpHoldtime types.String `tfsdk:"timers_bgp_holdtime"` + TimersBgpMinimumAcceptableHoldtime types.String `tfsdk:"timers_bgp_minimum_acceptable_holdtime"` + BgpRouterId types.String `tfsdk:"bgp_router_id"` + BgpGracefulRestartGracefulReset types.Bool `tfsdk:"bgp_graceful_restart_graceful_reset"` + IbgpPolicyOutEnforceModifications types.Bool `tfsdk:"ibgp_policy_out_enforce_modifications"` + BgpLogNeighborChangesDetail types.Bool `tfsdk:"bgp_log_neighbor_changes_detail"` + BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` + BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + NexthopValidationColorExtcommSrPolicy types.Bool `tfsdk:"nexthop_validation_color_extcomm_sr_policy"` + NexthopValidationColorExtcommDisable types.Bool `tfsdk:"nexthop_validation_color_extcomm_disable"` + BgpBestpathAsPathIgnore types.Bool `tfsdk:"bgp_bestpath_as_path_ignore"` + BgpBestpathAsPathMultipathRelax types.Bool `tfsdk:"bgp_bestpath_as_path_multipath_relax"` + BgpBestpathCostCommunityIgnore types.Bool `tfsdk:"bgp_bestpath_cost_community_ignore"` + BgpBestpathCompareRouterid types.Bool `tfsdk:"bgp_bestpath_compare_routerid"` + BgpBestpathAigpIgnore types.Bool `tfsdk:"bgp_bestpath_aigp_ignore"` + BgpBestpathIgpMetricIgnore types.Bool `tfsdk:"bgp_bestpath_igp_metric_ignore"` + BgpBestpathIgpMetricSrPolicy types.Bool `tfsdk:"bgp_bestpath_igp_metric_sr_policy"` + BgpBestpathMedAlways types.Bool `tfsdk:"bgp_bestpath_med_always"` + BgpBestpathMedConfed types.Bool `tfsdk:"bgp_bestpath_med_confed"` + BgpBestpathMedMissingAsWorst types.Bool `tfsdk:"bgp_bestpath_med_missing_as_worst"` + BgpBestpathOriginAsUseValidity types.Bool `tfsdk:"bgp_bestpath_origin_as_use_validity"` + BgpBestpathOriginAsAllowInvalid types.Bool `tfsdk:"bgp_bestpath_origin_as_allow_invalid"` + BgpBestpathSrPolicyPrefer types.Bool `tfsdk:"bgp_bestpath_sr_policy_prefer"` + BgpBestpathSrPolicyForce types.Bool `tfsdk:"bgp_bestpath_sr_policy_force"` + Neighbors []RouterBGPNeighbors `tfsdk:"neighbors"` } type RouterBGPNeighbors struct { NeighborAddress types.String `tfsdk:"neighbor_address"` @@ -115,6 +113,9 @@ type RouterBGPNeighbors struct { EbgpMultihopMaximumHopCount types.Int64 `tfsdk:"ebgp_multihop_maximum_hop_count"` BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` + BfdFastDetectStrictMode types.Bool `tfsdk:"bfd_fast_detect_strict_mode"` + BfdFastDetectInheritanceDisable types.Bool `tfsdk:"bfd_fast_detect_inheritance_disable"` LocalAs types.String `tfsdk:"local_as"` LocalAsNoPrepend types.Bool `tfsdk:"local_as_no_prepend"` LocalAsReplaceAs types.Bool `tfsdk:"local_as_replace_as"` @@ -127,14 +128,6 @@ type RouterBGPNeighbors struct { UpdateSource types.String `tfsdk:"update_source"` TtlSecurity types.Bool `tfsdk:"ttl_security"` } -type RouterBGPNeighborGroups struct { - Name types.String `tfsdk:"name"` - RemoteAs types.String `tfsdk:"remote_as"` - UpdateSource types.String `tfsdk:"update_source"` - AoKeyChainName types.String `tfsdk:"ao_key_chain_name"` - AoIncludeTcpOptionsEnable types.Bool `tfsdk:"ao_include_tcp_options_enable"` - BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` -} func (data RouterBGP) getPath() string { return fmt.Sprintf("Cisco-IOS-XR-um-router-bgp-cfg:/router/bgp/as[as-number=%s]", data.AsNumber.ValueString()) @@ -312,6 +305,21 @@ func (data RouterBGP) toBody(ctx context.Context) string { if !item.BfdMultiplier.IsNull() && !item.BfdMultiplier.IsUnknown() { body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.multiplier", strconv.FormatInt(item.BfdMultiplier.ValueInt64(), 10)) } + if !item.BfdFastDetect.IsNull() && !item.BfdFastDetect.IsUnknown() { + if item.BfdFastDetect.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect", map[string]string{}) + } + } + if !item.BfdFastDetectStrictMode.IsNull() && !item.BfdFastDetectStrictMode.IsUnknown() { + if item.BfdFastDetectStrictMode.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect.strict-mode", map[string]string{}) + } + } + if !item.BfdFastDetectInheritanceDisable.IsNull() && !item.BfdFastDetectInheritanceDisable.IsUnknown() { + if item.BfdFastDetectInheritanceDisable.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect.inheritance-disable", map[string]string{}) + } + } if !item.LocalAs.IsNull() && !item.LocalAs.IsUnknown() { body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"local-as.as-number", item.LocalAs.ValueString()) } @@ -357,31 +365,6 @@ func (data RouterBGP) toBody(ctx context.Context) string { } } } - if len(data.NeighborGroups) > 0 { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group", []interface{}{}) - for index, item := range data.NeighborGroups { - if !item.Name.IsNull() && !item.Name.IsUnknown() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"neighbor-group-name", item.Name.ValueString()) - } - if !item.RemoteAs.IsNull() && !item.RemoteAs.IsUnknown() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"remote-as", item.RemoteAs.ValueString()) - } - if !item.UpdateSource.IsNull() && !item.UpdateSource.IsUnknown() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"update-source", item.UpdateSource.ValueString()) - } - if !item.AoKeyChainName.IsNull() && !item.AoKeyChainName.IsUnknown() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"ao.key-chain-name", item.AoKeyChainName.ValueString()) - } - if !item.AoIncludeTcpOptionsEnable.IsNull() && !item.AoIncludeTcpOptionsEnable.IsUnknown() { - if item.AoIncludeTcpOptionsEnable.ValueBool() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"ao.include-tcp-options.enable", map[string]string{}) - } - } - if !item.BfdMinimumInterval.IsNull() && !item.BfdMinimumInterval.IsUnknown() { - body, _ = sjson.Set(body, "neighbor-groups.neighbor-group"+"."+strconv.Itoa(index)+"."+"bfd.minimum-interval", strconv.FormatInt(item.BfdMinimumInterval.ValueInt64(), 10)) - } - } - } return body } @@ -691,6 +674,33 @@ func (data *RouterBGP) updateFromBody(ctx context.Context, res []byte) { } else { data.Neighbors[i].BfdMultiplier = types.Int64Null() } + if value := r.Get("bfd.fast-detect"); !data.Neighbors[i].BfdFastDetect.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetect = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetect = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetect = types.BoolNull() + } + if value := r.Get("bfd.fast-detect.strict-mode"); !data.Neighbors[i].BfdFastDetectStrictMode.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolNull() + } + if value := r.Get("bfd.fast-detect.inheritance-disable"); !data.Neighbors[i].BfdFastDetectInheritanceDisable.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetectInheritanceDisable = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetectInheritanceDisable = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetectInheritanceDisable = types.BoolNull() + } if value := r.Get("local-as.as-number"); value.Exists() && !data.Neighbors[i].LocalAs.IsNull() { data.Neighbors[i].LocalAs = types.StringValue(value.String()) } else { @@ -767,64 +777,6 @@ func (data *RouterBGP) updateFromBody(ctx context.Context, res []byte) { data.Neighbors[i].TtlSecurity = types.BoolNull() } } - for i := range data.NeighborGroups { - keys := [...]string{"neighbor-group-name"} - keyValues := [...]string{data.NeighborGroups[i].Name.ValueString()} - - var r gjson.Result - gjson.GetBytes(res, "neighbor-groups.neighbor-group").ForEach( - func(_, v gjson.Result) bool { - found := false - for ik := range keys { - if v.Get(keys[ik]).String() == keyValues[ik] { - found = true - continue - } - found = false - break - } - if found { - r = v - return false - } - return true - }, - ) - if value := r.Get("neighbor-group-name"); value.Exists() && !data.NeighborGroups[i].Name.IsNull() { - data.NeighborGroups[i].Name = types.StringValue(value.String()) - } else { - data.NeighborGroups[i].Name = types.StringNull() - } - if value := r.Get("remote-as"); value.Exists() && !data.NeighborGroups[i].RemoteAs.IsNull() { - data.NeighborGroups[i].RemoteAs = types.StringValue(value.String()) - } else { - data.NeighborGroups[i].RemoteAs = types.StringNull() - } - if value := r.Get("update-source"); value.Exists() && !data.NeighborGroups[i].UpdateSource.IsNull() { - data.NeighborGroups[i].UpdateSource = types.StringValue(value.String()) - } else { - data.NeighborGroups[i].UpdateSource = types.StringNull() - } - if value := r.Get("ao.key-chain-name"); value.Exists() && !data.NeighborGroups[i].AoKeyChainName.IsNull() { - data.NeighborGroups[i].AoKeyChainName = types.StringValue(value.String()) - } else { - data.NeighborGroups[i].AoKeyChainName = types.StringNull() - } - if value := r.Get("ao.include-tcp-options.enable"); !data.NeighborGroups[i].AoIncludeTcpOptionsEnable.IsNull() { - if value.Exists() { - data.NeighborGroups[i].AoIncludeTcpOptionsEnable = types.BoolValue(true) - } else { - data.NeighborGroups[i].AoIncludeTcpOptionsEnable = types.BoolValue(false) - } - } else { - data.NeighborGroups[i].AoIncludeTcpOptionsEnable = types.BoolNull() - } - if value := r.Get("bfd.minimum-interval"); value.Exists() && !data.NeighborGroups[i].BfdMinimumInterval.IsNull() { - data.NeighborGroups[i].BfdMinimumInterval = types.Int64Value(value.Int()) - } else { - data.NeighborGroups[i].BfdMinimumInterval = types.Int64Null() - } - } } func (data *RouterBGPData) fromBody(ctx context.Context, res []byte) { @@ -992,6 +944,21 @@ func (data *RouterBGPData) fromBody(ctx context.Context, res []byte) { if cValue := v.Get("bfd.multiplier"); cValue.Exists() { item.BfdMultiplier = types.Int64Value(cValue.Int()) } + if cValue := v.Get("bfd.fast-detect"); cValue.Exists() { + item.BfdFastDetect = types.BoolValue(true) + } else { + item.BfdFastDetect = types.BoolValue(false) + } + if cValue := v.Get("bfd.fast-detect.strict-mode"); cValue.Exists() { + item.BfdFastDetectStrictMode = types.BoolValue(true) + } else { + item.BfdFastDetectStrictMode = types.BoolValue(false) + } + if cValue := v.Get("bfd.fast-detect.inheritance-disable"); cValue.Exists() { + item.BfdFastDetectInheritanceDisable = types.BoolValue(true) + } else { + item.BfdFastDetectInheritanceDisable = types.BoolValue(false) + } if cValue := v.Get("local-as.as-number"); cValue.Exists() { item.LocalAs = types.StringValue(cValue.String()) } @@ -1039,34 +1006,6 @@ func (data *RouterBGPData) fromBody(ctx context.Context, res []byte) { return true }) } - if value := gjson.GetBytes(res, "neighbor-groups.neighbor-group"); value.Exists() { - data.NeighborGroups = make([]RouterBGPNeighborGroups, 0) - value.ForEach(func(k, v gjson.Result) bool { - item := RouterBGPNeighborGroups{} - if cValue := v.Get("neighbor-group-name"); cValue.Exists() { - item.Name = types.StringValue(cValue.String()) - } - if cValue := v.Get("remote-as"); cValue.Exists() { - item.RemoteAs = types.StringValue(cValue.String()) - } - if cValue := v.Get("update-source"); cValue.Exists() { - item.UpdateSource = types.StringValue(cValue.String()) - } - if cValue := v.Get("ao.key-chain-name"); cValue.Exists() { - item.AoKeyChainName = types.StringValue(cValue.String()) - } - if cValue := v.Get("ao.include-tcp-options.enable"); cValue.Exists() { - item.AoIncludeTcpOptionsEnable = types.BoolValue(true) - } else { - item.AoIncludeTcpOptionsEnable = types.BoolValue(false) - } - if cValue := v.Get("bfd.minimum-interval"); cValue.Exists() { - item.BfdMinimumInterval = types.Int64Value(cValue.Int()) - } - data.NeighborGroups = append(data.NeighborGroups, item) - return true - }) - } } func (data *RouterBGP) getDeletedListItems(ctx context.Context, state RouterBGP) []string { @@ -1101,36 +1040,6 @@ func (data *RouterBGP) getDeletedListItems(ctx context.Context, state RouterBGP) deletedListItems = append(deletedListItems, fmt.Sprintf("%v/neighbors/neighbor%v", state.getPath(), keyString)) } } - for i := range state.NeighborGroups { - keys := [...]string{"neighbor-group-name"} - stateKeyValues := [...]string{state.NeighborGroups[i].Name.ValueString()} - - emptyKeys := true - if !reflect.ValueOf(state.NeighborGroups[i].Name.ValueString()).IsZero() { - emptyKeys = false - } - if emptyKeys { - continue - } - - found := false - for j := range data.NeighborGroups { - found = true - if state.NeighborGroups[i].Name.ValueString() != data.NeighborGroups[j].Name.ValueString() { - found = false - } - if found { - break - } - } - if !found { - keyString := "" - for ki := range keys { - keyString += "[" + keys[ki] + "=" + stateKeyValues[ki] + "]" - } - deletedListItems = append(deletedListItems, fmt.Sprintf("%v/neighbor-groups/neighbor-group%v", state.getPath(), keyString)) - } - } return deletedListItems } @@ -1212,6 +1121,15 @@ func (data *RouterBGP) getEmptyLeafsDelete(ctx context.Context) []string { if !data.Neighbors[i].IgnoreConnectedCheck.IsNull() && !data.Neighbors[i].IgnoreConnectedCheck.ValueBool() { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/ignore-connected-check", data.getPath(), keyString)) } + if !data.Neighbors[i].BfdFastDetect.IsNull() && !data.Neighbors[i].BfdFastDetect.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect", data.getPath(), keyString)) + } + if !data.Neighbors[i].BfdFastDetectStrictMode.IsNull() && !data.Neighbors[i].BfdFastDetectStrictMode.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect/strict-mode", data.getPath(), keyString)) + } + if !data.Neighbors[i].BfdFastDetectInheritanceDisable.IsNull() && !data.Neighbors[i].BfdFastDetectInheritanceDisable.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect/inheritance-disable", data.getPath(), keyString)) + } if !data.Neighbors[i].LocalAsNoPrepend.IsNull() && !data.Neighbors[i].LocalAsNoPrepend.ValueBool() { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/local-as/no-prepend", data.getPath(), keyString)) } @@ -1228,17 +1146,6 @@ func (data *RouterBGP) getEmptyLeafsDelete(ctx context.Context) []string { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/ttl-security", data.getPath(), keyString)) } } - for i := range data.NeighborGroups { - keys := [...]string{"neighbor-group-name"} - keyValues := [...]string{data.NeighborGroups[i].Name.ValueString()} - keyString := "" - for ki := range keys { - keyString += "[" + keys[ki] + "=" + keyValues[ki] + "]" - } - if !data.NeighborGroups[i].AoIncludeTcpOptionsEnable.IsNull() && !data.NeighborGroups[i].AoIncludeTcpOptionsEnable.ValueBool() { - emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbor-groups/neighbor-group%v/ao/include-tcp-options/enable", data.getPath(), keyString)) - } - } return emptyLeafsDelete } @@ -1344,15 +1251,5 @@ func (data *RouterBGP) getDeletePaths(ctx context.Context) []string { } deletePaths = append(deletePaths, fmt.Sprintf("%v/neighbors/neighbor%v", data.getPath(), keyString)) } - for i := range data.NeighborGroups { - keys := [...]string{"neighbor-group-name"} - keyValues := [...]string{data.NeighborGroups[i].Name.ValueString()} - - keyString := "" - for ki := range keys { - keyString += "[" + keys[ki] + "=" + keyValues[ki] + "]" - } - deletePaths = append(deletePaths, fmt.Sprintf("%v/neighbor-groups/neighbor-group%v", data.getPath(), keyString)) - } return deletePaths } diff --git a/internal/provider/model_iosxr_router_bgp_neighbor_group.go b/internal/provider/model_iosxr_router_bgp_neighbor_group.go index 9206865e..8c0489cc 100644 --- a/internal/provider/model_iosxr_router_bgp_neighbor_group.go +++ b/internal/provider/model_iosxr_router_bgp_neighbor_group.go @@ -31,32 +31,38 @@ import ( ) type RouterBGPNeighborGroup struct { - Device types.String `tfsdk:"device"` - Id types.String `tfsdk:"id"` - DeleteMode types.String `tfsdk:"delete_mode"` - AsNumber types.String `tfsdk:"as_number"` - Name types.String `tfsdk:"name"` - RemoteAs types.String `tfsdk:"remote_as"` - UpdateSource types.String `tfsdk:"update_source"` - AoKeyChainName types.String `tfsdk:"ao_key_chain_name"` - AoIncludeTcpOptionsEnable types.Bool `tfsdk:"ao_include_tcp_options_enable"` - BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` - BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` - AddressFamilies []RouterBGPNeighborGroupAddressFamilies `tfsdk:"address_families"` + Device types.String `tfsdk:"device"` + Id types.String `tfsdk:"id"` + DeleteMode types.String `tfsdk:"delete_mode"` + AsNumber types.String `tfsdk:"as_number"` + Name types.String `tfsdk:"name"` + RemoteAs types.String `tfsdk:"remote_as"` + UpdateSource types.String `tfsdk:"update_source"` + AoKeyChainName types.String `tfsdk:"ao_key_chain_name"` + AoIncludeTcpOptionsEnable types.Bool `tfsdk:"ao_include_tcp_options_enable"` + BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` + BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` + BfdFastDetectStrictMode types.Bool `tfsdk:"bfd_fast_detect_strict_mode"` + BfdFastDetectInheritanceDisable types.Bool `tfsdk:"bfd_fast_detect_inheritance_disable"` + AddressFamilies []RouterBGPNeighborGroupAddressFamilies `tfsdk:"address_families"` } type RouterBGPNeighborGroupData struct { - Device types.String `tfsdk:"device"` - Id types.String `tfsdk:"id"` - AsNumber types.String `tfsdk:"as_number"` - Name types.String `tfsdk:"name"` - RemoteAs types.String `tfsdk:"remote_as"` - UpdateSource types.String `tfsdk:"update_source"` - AoKeyChainName types.String `tfsdk:"ao_key_chain_name"` - AoIncludeTcpOptionsEnable types.Bool `tfsdk:"ao_include_tcp_options_enable"` - BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` - BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` - AddressFamilies []RouterBGPNeighborGroupAddressFamilies `tfsdk:"address_families"` + Device types.String `tfsdk:"device"` + Id types.String `tfsdk:"id"` + AsNumber types.String `tfsdk:"as_number"` + Name types.String `tfsdk:"name"` + RemoteAs types.String `tfsdk:"remote_as"` + UpdateSource types.String `tfsdk:"update_source"` + AoKeyChainName types.String `tfsdk:"ao_key_chain_name"` + AoIncludeTcpOptionsEnable types.Bool `tfsdk:"ao_include_tcp_options_enable"` + BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` + BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` + BfdFastDetectStrictMode types.Bool `tfsdk:"bfd_fast_detect_strict_mode"` + BfdFastDetectInheritanceDisable types.Bool `tfsdk:"bfd_fast_detect_inheritance_disable"` + AddressFamilies []RouterBGPNeighborGroupAddressFamilies `tfsdk:"address_families"` } type RouterBGPNeighborGroupAddressFamilies struct { AfName types.String `tfsdk:"af_name"` @@ -95,11 +101,24 @@ func (data RouterBGPNeighborGroup) toBody(ctx context.Context) string { if !data.BfdMinimumInterval.IsNull() && !data.BfdMinimumInterval.IsUnknown() { body, _ = sjson.Set(body, "bfd.minimum-interval", strconv.FormatInt(data.BfdMinimumInterval.ValueInt64(), 10)) } + if !data.BfdMultiplier.IsNull() && !data.BfdMultiplier.IsUnknown() { + body, _ = sjson.Set(body, "bfd.multiplier", strconv.FormatInt(data.BfdMultiplier.ValueInt64(), 10)) + } if !data.BfdFastDetect.IsNull() && !data.BfdFastDetect.IsUnknown() { if data.BfdFastDetect.ValueBool() { body, _ = sjson.Set(body, "bfd.fast-detect", map[string]string{}) } } + if !data.BfdFastDetectStrictMode.IsNull() && !data.BfdFastDetectStrictMode.IsUnknown() { + if data.BfdFastDetectStrictMode.ValueBool() { + body, _ = sjson.Set(body, "bfd.fast-detect.strict-mode", map[string]string{}) + } + } + if !data.BfdFastDetectInheritanceDisable.IsNull() && !data.BfdFastDetectInheritanceDisable.IsUnknown() { + if data.BfdFastDetectInheritanceDisable.ValueBool() { + body, _ = sjson.Set(body, "bfd.fast-detect.inheritance-disable", map[string]string{}) + } + } if len(data.AddressFamilies) > 0 { body, _ = sjson.Set(body, "address-families.address-family", []interface{}{}) for index, item := range data.AddressFamilies { @@ -156,6 +175,11 @@ func (data *RouterBGPNeighborGroup) updateFromBody(ctx context.Context, res []by } else { data.BfdMinimumInterval = types.Int64Null() } + if value := gjson.GetBytes(res, "bfd.multiplier"); value.Exists() && !data.BfdMultiplier.IsNull() { + data.BfdMultiplier = types.Int64Value(value.Int()) + } else { + data.BfdMultiplier = types.Int64Null() + } if value := gjson.GetBytes(res, "bfd.fast-detect"); !data.BfdFastDetect.IsNull() { if value.Exists() { data.BfdFastDetect = types.BoolValue(true) @@ -165,6 +189,24 @@ func (data *RouterBGPNeighborGroup) updateFromBody(ctx context.Context, res []by } else { data.BfdFastDetect = types.BoolNull() } + if value := gjson.GetBytes(res, "bfd.fast-detect.strict-mode"); !data.BfdFastDetectStrictMode.IsNull() { + if value.Exists() { + data.BfdFastDetectStrictMode = types.BoolValue(true) + } else { + data.BfdFastDetectStrictMode = types.BoolValue(false) + } + } else { + data.BfdFastDetectStrictMode = types.BoolNull() + } + if value := gjson.GetBytes(res, "bfd.fast-detect.inheritance-disable"); !data.BfdFastDetectInheritanceDisable.IsNull() { + if value.Exists() { + data.BfdFastDetectInheritanceDisable = types.BoolValue(true) + } else { + data.BfdFastDetectInheritanceDisable = types.BoolValue(false) + } + } else { + data.BfdFastDetectInheritanceDisable = types.BoolNull() + } for i := range data.AddressFamilies { keys := [...]string{"af-name"} keyValues := [...]string{data.AddressFamilies[i].AfName.ValueString()} @@ -241,11 +283,24 @@ func (data *RouterBGPNeighborGroupData) fromBody(ctx context.Context, res []byte if value := gjson.GetBytes(res, "bfd.minimum-interval"); value.Exists() { data.BfdMinimumInterval = types.Int64Value(value.Int()) } + if value := gjson.GetBytes(res, "bfd.multiplier"); value.Exists() { + data.BfdMultiplier = types.Int64Value(value.Int()) + } if value := gjson.GetBytes(res, "bfd.fast-detect"); value.Exists() { data.BfdFastDetect = types.BoolValue(true) } else { data.BfdFastDetect = types.BoolValue(false) } + if value := gjson.GetBytes(res, "bfd.fast-detect.strict-mode"); value.Exists() { + data.BfdFastDetectStrictMode = types.BoolValue(true) + } else { + data.BfdFastDetectStrictMode = types.BoolValue(false) + } + if value := gjson.GetBytes(res, "bfd.fast-detect.inheritance-disable"); value.Exists() { + data.BfdFastDetectInheritanceDisable = types.BoolValue(true) + } else { + data.BfdFastDetectInheritanceDisable = types.BoolValue(false) + } if value := gjson.GetBytes(res, "address-families.address-family"); value.Exists() { data.AddressFamilies = make([]RouterBGPNeighborGroupAddressFamilies, 0) value.ForEach(func(k, v gjson.Result) bool { @@ -317,6 +372,12 @@ func (data *RouterBGPNeighborGroup) getEmptyLeafsDelete(ctx context.Context) []s if !data.BfdFastDetect.IsNull() && !data.BfdFastDetect.ValueBool() { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/bfd/fast-detect", data.getPath())) } + if !data.BfdFastDetectStrictMode.IsNull() && !data.BfdFastDetectStrictMode.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/bfd/fast-detect/strict-mode", data.getPath())) + } + if !data.BfdFastDetectInheritanceDisable.IsNull() && !data.BfdFastDetectInheritanceDisable.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/bfd/fast-detect/inheritance-disable", data.getPath())) + } for i := range data.AddressFamilies { keys := [...]string{"af-name"} keyValues := [...]string{data.AddressFamilies[i].AfName.ValueString()} @@ -354,9 +415,18 @@ func (data *RouterBGPNeighborGroup) getDeletePaths(ctx context.Context) []string if !data.BfdMinimumInterval.IsNull() { deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/minimum-interval", data.getPath())) } + if !data.BfdMultiplier.IsNull() { + deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/multiplier", data.getPath())) + } if !data.BfdFastDetect.IsNull() { deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/fast-detect", data.getPath())) } + if !data.BfdFastDetectStrictMode.IsNull() { + deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/fast-detect/strict-mode", data.getPath())) + } + if !data.BfdFastDetectInheritanceDisable.IsNull() { + deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/fast-detect/inheritance-disable", data.getPath())) + } for i := range data.AddressFamilies { keys := [...]string{"af-name"} keyValues := [...]string{data.AddressFamilies[i].AfName.ValueString()} diff --git a/internal/provider/model_iosxr_router_bgp_vrf.go b/internal/provider/model_iosxr_router_bgp_vrf.go index da4b2df2..af9afafc 100644 --- a/internal/provider/model_iosxr_router_bgp_vrf.go +++ b/internal/provider/model_iosxr_router_bgp_vrf.go @@ -80,6 +80,9 @@ type RouterBGPVRFNeighbors struct { EbgpMultihopMaximumHopCount types.Int64 `tfsdk:"ebgp_multihop_maximum_hop_count"` BfdMinimumInterval types.Int64 `tfsdk:"bfd_minimum_interval"` BfdMultiplier types.Int64 `tfsdk:"bfd_multiplier"` + BfdFastDetect types.Bool `tfsdk:"bfd_fast_detect"` + BfdFastDetectStrictMode types.Bool `tfsdk:"bfd_fast_detect_strict_mode"` + BfdFastDetectDisable types.Bool `tfsdk:"bfd_fast_detect_disable"` LocalAs types.String `tfsdk:"local_as"` LocalAsNoPrepend types.Bool `tfsdk:"local_as_no_prepend"` LocalAsReplaceAs types.Bool `tfsdk:"local_as_replace_as"` @@ -174,6 +177,21 @@ func (data RouterBGPVRF) toBody(ctx context.Context) string { if !item.BfdMultiplier.IsNull() && !item.BfdMultiplier.IsUnknown() { body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.multiplier", strconv.FormatInt(item.BfdMultiplier.ValueInt64(), 10)) } + if !item.BfdFastDetect.IsNull() && !item.BfdFastDetect.IsUnknown() { + if item.BfdFastDetect.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect", map[string]string{}) + } + } + if !item.BfdFastDetectStrictMode.IsNull() && !item.BfdFastDetectStrictMode.IsUnknown() { + if item.BfdFastDetectStrictMode.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect.strict-mode", map[string]string{}) + } + } + if !item.BfdFastDetectDisable.IsNull() && !item.BfdFastDetectDisable.IsUnknown() { + if item.BfdFastDetectDisable.ValueBool() { + body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"bfd.fast-detect.disable", map[string]string{}) + } + } if !item.LocalAs.IsNull() && !item.LocalAs.IsUnknown() { body, _ = sjson.Set(body, "neighbors.neighbor"+"."+strconv.Itoa(index)+"."+"local-as.as-number", item.LocalAs.ValueString()) } @@ -355,6 +373,33 @@ func (data *RouterBGPVRF) updateFromBody(ctx context.Context, res []byte) { } else { data.Neighbors[i].BfdMultiplier = types.Int64Null() } + if value := r.Get("bfd.fast-detect"); !data.Neighbors[i].BfdFastDetect.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetect = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetect = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetect = types.BoolNull() + } + if value := r.Get("bfd.fast-detect.strict-mode"); !data.Neighbors[i].BfdFastDetectStrictMode.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetectStrictMode = types.BoolNull() + } + if value := r.Get("bfd.fast-detect.disable"); !data.Neighbors[i].BfdFastDetectDisable.IsNull() { + if value.Exists() { + data.Neighbors[i].BfdFastDetectDisable = types.BoolValue(true) + } else { + data.Neighbors[i].BfdFastDetectDisable = types.BoolValue(false) + } + } else { + data.Neighbors[i].BfdFastDetectDisable = types.BoolNull() + } if value := r.Get("local-as.as-number"); value.Exists() && !data.Neighbors[i].LocalAs.IsNull() { data.Neighbors[i].LocalAs = types.StringValue(value.String()) } else { @@ -499,6 +544,21 @@ func (data *RouterBGPVRFData) fromBody(ctx context.Context, res []byte) { if cValue := v.Get("bfd.multiplier"); cValue.Exists() { item.BfdMultiplier = types.Int64Value(cValue.Int()) } + if cValue := v.Get("bfd.fast-detect"); cValue.Exists() { + item.BfdFastDetect = types.BoolValue(true) + } else { + item.BfdFastDetect = types.BoolValue(false) + } + if cValue := v.Get("bfd.fast-detect.strict-mode"); cValue.Exists() { + item.BfdFastDetectStrictMode = types.BoolValue(true) + } else { + item.BfdFastDetectStrictMode = types.BoolValue(false) + } + if cValue := v.Get("bfd.fast-detect.disable"); cValue.Exists() { + item.BfdFastDetectDisable = types.BoolValue(true) + } else { + item.BfdFastDetectDisable = types.BoolValue(false) + } if cValue := v.Get("local-as.as-number"); cValue.Exists() { item.LocalAs = types.StringValue(cValue.String()) } @@ -598,6 +658,15 @@ func (data *RouterBGPVRF) getEmptyLeafsDelete(ctx context.Context) []string { if !data.Neighbors[i].IgnoreConnectedCheck.IsNull() && !data.Neighbors[i].IgnoreConnectedCheck.ValueBool() { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/ignore-connected-check", data.getPath(), keyString)) } + if !data.Neighbors[i].BfdFastDetect.IsNull() && !data.Neighbors[i].BfdFastDetect.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect", data.getPath(), keyString)) + } + if !data.Neighbors[i].BfdFastDetectStrictMode.IsNull() && !data.Neighbors[i].BfdFastDetectStrictMode.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect/strict-mode", data.getPath(), keyString)) + } + if !data.Neighbors[i].BfdFastDetectDisable.IsNull() && !data.Neighbors[i].BfdFastDetectDisable.ValueBool() { + emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/bfd/fast-detect/disable", data.getPath(), keyString)) + } if !data.Neighbors[i].LocalAsNoPrepend.IsNull() && !data.Neighbors[i].LocalAsNoPrepend.ValueBool() { emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/neighbors/neighbor%v/local-as/no-prepend", data.getPath(), keyString)) } diff --git a/internal/provider/resource_iosxr_router_bgp.go b/internal/provider/resource_iosxr_router_bgp.go index 4bb88ed8..2188840c 100644 --- a/internal/provider/resource_iosxr_router_bgp.go +++ b/internal/provider/resource_iosxr_router_bgp.go @@ -273,6 +273,18 @@ func (r *RouterBGPResource) Schema(ctx context.Context, req resource.SchemaReque int64validator.Between(2, 16), }, }, + "bfd_fast_detect": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Enable Fast detection").String, + Optional: true, + }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Hold down neighbor session until BFD session is up").String, + Optional: true, + }, + "bfd_fast_detect_inheritance_disable": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Prevent bfd settings from being inherited from the parent").String, + Optional: true, + }, "local_as": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("bgp as-number").String, Optional: true, @@ -329,51 +341,6 @@ func (r *RouterBGPResource) Schema(ctx context.Context, req resource.SchemaReque }, }, }, - "neighbor_groups": schema.ListNestedAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Specify a Neighbor-group").String, - Optional: true, - NestedObject: schema.NestedAttributeObject{ - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Specify a Neighbor-group").String, - Required: true, - Validators: []validator.String{ - stringvalidator.LengthBetween(1, 900), - stringvalidator.RegexMatches(regexp.MustCompile(`[\w\-\.:,_@#%$\+=\|;]+`), ""), - }, - }, - "remote_as": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("bgp as-number").String, - Optional: true, - }, - "update_source": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Source of routing updates").String, - Optional: true, - Validators: []validator.String{ - stringvalidator.RegexMatches(regexp.MustCompile(`[a-zA-Z0-9.:_/-]+`), ""), - }, - }, - "ao_key_chain_name": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Name of the key chain - maximum 32 characters").String, - Optional: true, - Validators: []validator.String{ - stringvalidator.LengthBetween(1, 32), - }, - }, - "ao_include_tcp_options_enable": schema.BoolAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Include other TCP options in the header").String, - Optional: true, - }, - "bfd_minimum_interval": schema.Int64Attribute{ - MarkdownDescription: helpers.NewAttributeDescription("Hello interval").AddIntegerRangeDescription(3, 30000).String, - Optional: true, - Validators: []validator.Int64{ - int64validator.Between(3, 30000), - }, - }, - }, - }, - }, }, } } diff --git a/internal/provider/resource_iosxr_router_bgp_neighbor_group.go b/internal/provider/resource_iosxr_router_bgp_neighbor_group.go index 93838dad..05f48d76 100644 --- a/internal/provider/resource_iosxr_router_bgp_neighbor_group.go +++ b/internal/provider/resource_iosxr_router_bgp_neighbor_group.go @@ -121,10 +121,25 @@ func (r *RouterBGPNeighborGroupResource) Schema(ctx context.Context, req resourc int64validator.Between(3, 30000), }, }, + "bfd_multiplier": schema.Int64Attribute{ + MarkdownDescription: helpers.NewAttributeDescription("Detect multiplier").AddIntegerRangeDescription(2, 16).String, + Optional: true, + Validators: []validator.Int64{ + int64validator.Between(2, 16), + }, + }, "bfd_fast_detect": schema.BoolAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Enable Fast detection").String, Optional: true, }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Hold down neighbor session until BFD session is up").String, + Optional: true, + }, + "bfd_fast_detect_inheritance_disable": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Prevent bfd settings from being inherited from the parent").String, + Optional: true, + }, "address_families": schema.ListNestedAttribute{ MarkdownDescription: helpers.NewAttributeDescription("Enter Address Family command mode").String, Optional: true, diff --git a/internal/provider/resource_iosxr_router_bgp_neighbor_group_test.go b/internal/provider/resource_iosxr_router_bgp_neighbor_group_test.go index 3c42e6e4..586c6b61 100644 --- a/internal/provider/resource_iosxr_router_bgp_neighbor_group_test.go +++ b/internal/provider/resource_iosxr_router_bgp_neighbor_group_test.go @@ -32,7 +32,10 @@ func TestAccIosxrRouterBGPNeighborGroup(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "remote_as", "65001")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "update_source", "Loopback0")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "bfd_minimum_interval", "3")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "bfd_multiplier", "4")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "bfd_fast_detect_inheritance_disable", "false")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "address_families.0.af_name", "ipv4-labeled-unicast")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "address_families.0.soft_reconfiguration_inbound_always", "true")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_neighbor_group.test", "address_families.0.next_hop_self_inheritance_disable", "true")) @@ -85,7 +88,10 @@ func testAccIosxrRouterBGPNeighborGroupConfig_all() string { config += ` remote_as = "65001"` + "\n" config += ` update_source = "Loopback0"` + "\n" config += ` bfd_minimum_interval = 3` + "\n" + config += ` bfd_multiplier = 4` + "\n" config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_inheritance_disable = false` + "\n" config += ` address_families = [{` + "\n" config += ` af_name = "ipv4-labeled-unicast"` + "\n" config += ` soft_reconfiguration_inbound_always = true` + "\n" diff --git a/internal/provider/resource_iosxr_router_bgp_test.go b/internal/provider/resource_iosxr_router_bgp_test.go index b62b6dbe..3dd9411d 100644 --- a/internal/provider/resource_iosxr_router_bgp_test.go +++ b/internal/provider/resource_iosxr_router_bgp_test.go @@ -67,6 +67,9 @@ func TestAccIosxrRouterBGP(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.ebgp_multihop_maximum_hop_count", "10")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.bfd_minimum_interval", "10")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.bfd_multiplier", "4")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.bfd_fast_detect_inheritance_disable", "true")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.local_as", "65003")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.local_as_no_prepend", "true")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.local_as_replace_as", "true")) @@ -78,10 +81,6 @@ func TestAccIosxrRouterBGP(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.timers_minimum_acceptable_holdtime", "10")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.update_source", "GigabitEthernet0/0/0/1")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbors.0.ttl_security", "false")) - checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbor_groups.0.name", "GROUP1")) - checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbor_groups.0.remote_as", "65001")) - checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbor_groups.0.update_source", "Loopback0")) - checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp.test", "neighbor_groups.0.bfd_minimum_interval", "3")) var steps []resource.TestStep if os.Getenv("SKIP_MINIMUM_TEST") == "" { steps = append(steps, resource.TestStep{ @@ -110,6 +109,17 @@ resource "iosxr_gnmi" "PreReq0" { attributes = { "as-number" = "65001" } + lists = [ + { + name = "neighbor-groups/neighbor-group" + key = "neighbor-group-name" + items = [ + { + "neighbor-group-name" = "GROUP1" + }, + ] + }, + ] } ` @@ -164,6 +174,9 @@ func testAccIosxrRouterBGPConfig_all() string { config += ` ebgp_multihop_maximum_hop_count = 10` + "\n" config += ` bfd_minimum_interval = 10` + "\n" config += ` bfd_multiplier = 4` + "\n" + config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_inheritance_disable = true` + "\n" config += ` local_as = "65003"` + "\n" config += ` local_as_no_prepend = true` + "\n" config += ` local_as_replace_as = true` + "\n" @@ -176,12 +189,6 @@ func testAccIosxrRouterBGPConfig_all() string { config += ` update_source = "GigabitEthernet0/0/0/1"` + "\n" config += ` ttl_security = false` + "\n" config += ` }]` + "\n" - config += ` neighbor_groups = [{` + "\n" - config += ` name = "GROUP1"` + "\n" - config += ` remote_as = "65001"` + "\n" - config += ` update_source = "Loopback0"` + "\n" - config += ` bfd_minimum_interval = 3` + "\n" - config += ` }]` + "\n" config += ` depends_on = [iosxr_gnmi.PreReq0, ]` + "\n" config += `}` + "\n" return config diff --git a/internal/provider/resource_iosxr_router_bgp_vrf.go b/internal/provider/resource_iosxr_router_bgp_vrf.go index 4fca22bc..a562bb9c 100644 --- a/internal/provider/resource_iosxr_router_bgp_vrf.go +++ b/internal/provider/resource_iosxr_router_bgp_vrf.go @@ -214,6 +214,18 @@ func (r *RouterBGPVRFResource) Schema(ctx context.Context, req resource.SchemaRe int64validator.Between(2, 16), }, }, + "bfd_fast_detect": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Enable Fast detection").String, + Optional: true, + }, + "bfd_fast_detect_strict_mode": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Hold down neighbor session until BFD session is up").String, + Optional: true, + }, + "bfd_fast_detect_disable": schema.BoolAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Prevent bfd settings from being inherited from the parent").String, + Optional: true, + }, "local_as": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("bgp as-number").String, Optional: true, diff --git a/internal/provider/resource_iosxr_router_bgp_vrf_test.go b/internal/provider/resource_iosxr_router_bgp_vrf_test.go index 823923e5..3848494e 100644 --- a/internal/provider/resource_iosxr_router_bgp_vrf_test.go +++ b/internal/provider/resource_iosxr_router_bgp_vrf_test.go @@ -45,6 +45,9 @@ func TestAccIosxrRouterBGPVRF(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.ebgp_multihop_maximum_hop_count", "10")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.bfd_minimum_interval", "10")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.bfd_multiplier", "4")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect", "true")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect_strict_mode", "false")) + checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.bfd_fast_detect_disable", "false")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.local_as", "65003")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.local_as_no_prepend", "true")) checks = append(checks, resource.TestCheckResourceAttr("iosxr_router_bgp_vrf.test", "neighbors.0.local_as_replace_as", "true")) @@ -117,6 +120,9 @@ func testAccIosxrRouterBGPVRFConfig_all() string { config += ` ebgp_multihop_maximum_hop_count = 10` + "\n" config += ` bfd_minimum_interval = 10` + "\n" config += ` bfd_multiplier = 4` + "\n" + config += ` bfd_fast_detect = true` + "\n" + config += ` bfd_fast_detect_strict_mode = false` + "\n" + config += ` bfd_fast_detect_disable = false` + "\n" config += ` local_as = "65003"` + "\n" config += ` local_as_no_prepend = true` + "\n" config += ` local_as_replace_as = true` + "\n" diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index dadee077..acd2d531 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -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