Skip to content

Commit

Permalink
Add set overload bit attributes to router isis resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Jul 31, 2023
1 parent eab00b8 commit 2fd1276
Show file tree
Hide file tree
Showing 12 changed files with 278 additions and 55 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.2.4 (unreleased)

- Add `record_ipv4`, `record_ipv6`, `record_mpls` and `sflow_options` attributes to `iosxr_flow_monitor_map` resource and data source
- Add `set_overload_bit` attributes to `iosxr_router_isis` resource and data source

## 0.2.3

Expand Down
5 changes: 5 additions & 0 deletions docs/data-sources/router_isis.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ data "iosxr_router_isis" "example" {
- `nsf_interface_timer` (Number) Timer used to wait for a restart ACK (seconds)
- `nsf_lifetime` (Number) Maximum route lifetime following restart (seconds)
- `nsr` (Boolean) Enable NSR
- `set_overload_bit_advertise_external` (Boolean) If overload-bit set advertise IP prefixes learned from other protocols
- `set_overload_bit_advertise_interlevel` (Boolean) If overload-bit set advertise IP prefixes learned from another ISIS level
- `set_overload_bit_levels` (Attributes List) Set overload-bit for one level only (see [below for nested schema](#nestedatt--set_overload_bit_levels))
- `set_overload_bit_on_startup_advertise_as_overloaded` (Boolean) Time in seconds to advertise ourself as overloaded after reboot
- `set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise` (Number) Time in seconds to advertise ourself as overloaded after reboot
- `set_overload_bit_on_startup_wait_for_bgp` (Boolean) Set overload bit on startup until BGP signals convergence, or timeout

<a id="nestedatt--affinity_maps"></a>
### Nested Schema for `affinity_maps`
Expand Down
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: |-
## 0.2.4 (unreleased)

- Add `record_ipv4`, `record_ipv6`, `record_mpls` and `sflow_options` attributes to `iosxr_flow_monitor_map` resource and data source
- Add `set_overload_bit` attributes to `iosxr_router_isis` resource and data source

## 0.2.3

Expand Down
15 changes: 13 additions & 2 deletions docs/resources/router_isis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ This resource can manage the Router ISIS configuration.

```terraform
resource "iosxr_router_isis" "example" {
process_id = "P1"
is_type = "level-1"
process_id = "P1"
is_type = "level-1"
set_overload_bit_on_startup_advertise_as_overloaded = true
set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise = 10
set_overload_bit_on_startup_wait_for_bgp = false
set_overload_bit_advertise_external = true
set_overload_bit_advertise_interlevel = true
set_overload_bit_levels = [
{
level_id = 1
Expand Down Expand Up @@ -80,6 +85,8 @@ resource "iosxr_router_isis" "example" {
### Required

- `process_id` (String) Process ID
- `set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise` (Number) Time in seconds to advertise ourself as overloaded after reboot
- Range: `5`-`86400`

### Optional

Expand Down Expand Up @@ -119,7 +126,11 @@ resource "iosxr_router_isis" "example" {
- `nsf_lifetime` (Number) Maximum route lifetime following restart (seconds)
- Range: `5`-`300`
- `nsr` (Boolean) Enable NSR
- `set_overload_bit_advertise_external` (Boolean) If overload-bit set advertise IP prefixes learned from other protocols
- `set_overload_bit_advertise_interlevel` (Boolean) If overload-bit set advertise IP prefixes learned from another ISIS level
- `set_overload_bit_levels` (Attributes List) Set overload-bit for one level only (see [below for nested schema](#nestedatt--set_overload_bit_levels))
- `set_overload_bit_on_startup_advertise_as_overloaded` (Boolean) Time in seconds to advertise ourself as overloaded after reboot
- `set_overload_bit_on_startup_wait_for_bgp` (Boolean) Set overload bit on startup until BGP signals convergence, or timeout

### Read-Only

Expand Down
9 changes: 7 additions & 2 deletions examples/resources/iosxr_router_isis/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
resource "iosxr_router_isis" "example" {
process_id = "P1"
is_type = "level-1"
process_id = "P1"
is_type = "level-1"
set_overload_bit_on_startup_advertise_as_overloaded = true
set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise = 10
set_overload_bit_on_startup_wait_for_bgp = false
set_overload_bit_advertise_external = true
set_overload_bit_advertise_interlevel = true
set_overload_bit_levels = [
{
level_id = 1
Expand Down
11 changes: 11 additions & 0 deletions gen/definitions/router_isis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ attributes:
example: P1
- yang_name: is-type
example: level-1
- yang_name: set-overload-bit/on-startup/advertise-as-overloaded
example: true
- yang_name: set-overload-bit/on-startup/advertise-as-overloaded/time-to-advertise
delete_parent: true
example: 10
- yang_name: set-overload-bit/on-startup/wait-for-bgp
example: false
- yang_name: set-overload-bit/advertise/external
example: true
- yang_name: set-overload-bit/advertise/interlevel
example: true
- yang_name: set-overload-bit-levels/level
tf_name: set_overload_bit_levels
type: List
Expand Down
20 changes: 20 additions & 0 deletions internal/provider/data_source_iosxr_router_isis.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions internal/provider/data_source_iosxr_router_isis_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2fd1276

Please sign in to comment.