Skip to content

Commit

Permalink
Add ospf sr and frr support and additional snmp user attributes (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
swarudka authored Nov 24, 2023
1 parent c0cbeed commit 4808d5f
Show file tree
Hide file tree
Showing 30 changed files with 914 additions and 53 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
- Make `set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise` and `on_startup_advertise_as_overloaded_time_to_advertise` attributes of `iosxr_router_isis` resource optional
- Make `make_before_break_delay` attribute of `iosxr_mpls_ldp` resource optional
- Make various `iosxr_key_chain` resource attributes optional
- Add `fast_reroute_per_prefix_ti_lfa` and `fast_reroute_node_protecting_srlg_disjoint` attributes to `iosxr_router_ospf_area_interface` resource and data source
- Add `prefix_sid_strict_spf` and `prefix_sid_algorithm` attributes to `iosxr_router_ospf_area_interface` resource and data source
- Add `segment_routing_mpls` and `segment_routing_sr_prefer` attributes to `iosxr_router_ospf` resource and data source
- Add `v3_sha_encryption` and `v3_aes_encryption` attributes to `iosxr_snmp_server` resource and data source


## 0.3.0

Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/router_ospf.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ data "iosxr_router_ospf" "example" {
- `redistribute_static_metric_type` (String) OSPF exterior metric type for redistributed routes
- `redistribute_static_tag` (Number) Set tag for routes redistributed into OSPF
- `router_id` (String) configure this node
- `segment_routing_mpls` (Boolean) SR using MPLS dataplane
- `segment_routing_sr_prefer` (Boolean) Prefer segment routing labels over LDP labels

<a id="nestedatt--areas"></a>
### Nested Schema for `areas`
Expand Down
18 changes: 18 additions & 0 deletions docs/data-sources/router_ospf_area_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,29 @@ data "iosxr_router_ospf_area_interface" "example" {
### Read-Only

- `cost` (Number) Interface cost
- `fast_reroute_per_prefix_ti_lfa_enable` (Boolean) Enable TI LFA computation
- `fast_reroute_per_prefix_tiebreaker_node_protecting_index` (Number) Set preference order among tiebreakers
- `fast_reroute_per_prefix_tiebreaker_srlg_disjoint_index` (Number) Set preference order among tiebreakers
- `id` (String) The path of the retrieved object.
- `network_broadcast` (Boolean) Specify OSPF broadcast multi-access network
- `network_non_broadcast` (Boolean) Specify OSPF NBMA network
- `network_point_to_multipoint` (Boolean) Specify OSPF point-to-multipoint network
- `network_point_to_point` (Boolean) Specify OSPF point-to-point network
- `passive_disable` (Boolean) Disable passive
- `passive_enable` (Boolean) Enable passive
- `prefix_sid_algorithms` (Attributes List) Algorithm Specific Prefix SID Configuration (see [below for nested schema](#nestedatt--prefix_sid_algorithms))
- `prefix_sid_strict_spf_index_sid_index` (Number) SID Index
- `priority` (Number) Router priority

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

Read-Only:

- `absolute_explicit_null` (Boolean) Force penultimate hop to send explicit-null label
- `absolute_n_flag_clear` (Boolean) Not a node SID (e.g. for anycast SID use)
- `absolute_sid_label` (Number) SID value
- `algorithm_number` (Number) Algorithm Specific Prefix SID Configuration
- `index_explicit_null` (Boolean) Force penultimate hop to send explicit-null label
- `index_n_flag_clear` (Boolean) Not a node SID (e.g. for anycast SID use)
- `index_sid_index` (Number) SID Index
6 changes: 6 additions & 0 deletions docs/data-sources/snmp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ Read-Only:
- `user_name` (String) Name of the user
- `v3_auth_md5_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_auth_md5_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_auth_sha_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_auth_sha_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_ipv4` (String) Type of Access-list
- `v3_priv_aes_aes_128_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_priv_aes_aes_128_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_systemowner` (Boolean) System Owner permissions for MIB objects
5 changes: 5 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ description: |-
- Make `set_overload_bit_on_startup_advertise_as_overloaded_time_to_advertise` and `on_startup_advertise_as_overloaded_time_to_advertise` attributes of `iosxr_router_isis` resource optional
- Make `make_before_break_delay` attribute of `iosxr_mpls_ldp` resource optional
- Make various `iosxr_key_chain` resource attributes optional
- Add `fast_reroute_per_prefix_ti_lfa` and `fast_reroute_node_protecting_srlg_disjoint` attributes to `iosxr_router_ospf_area_interface` resource and data source
- Add `prefix_sid_strict_spf` and `prefix_sid_algorithm` attributes to `iosxr_router_ospf_area_interface` resource and data source
- Add `segment_routing_mpls` and `segment_routing_sr_prefer` attributes to `iosxr_router_ospf` resource and data source
- Add `v3_sha_encryption` and `v3_aes_encryption` attributes to `iosxr_snmp_server` resource and data source


## 0.3.0

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/router_ospf.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ resource "iosxr_router_ospf" "example" {
default_information_originate_metric_type = 1
auto_cost_reference_bandwidth = 100000
auto_cost_disable = false
segment_routing_mpls = true
segment_routing_sr_prefer = true
areas = [
{
area_id = "0"
Expand Down Expand Up @@ -123,6 +125,8 @@ resource "iosxr_router_ospf" "example" {
- `redistribute_static_tag` (Number) Set tag for routes redistributed into OSPF
- Range: `0`-`4294967295`
- `router_id` (String) configure this node
- `segment_routing_mpls` (Boolean) SR using MPLS dataplane
- `segment_routing_sr_prefer` (Boolean) Prefer segment routing labels over LDP labels

### Read-Only

Expand Down
52 changes: 41 additions & 11 deletions docs/resources/router_ospf_area_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ This resource can manage the Router OSPF Area Interface configuration.

```terraform
resource "iosxr_router_ospf_area_interface" "example" {
process_name = "OSPF1"
area_id = "0"
interface_name = "GigabitEthernet0/0/0/1"
network_broadcast = false
network_non_broadcast = false
network_point_to_point = true
network_point_to_multipoint = false
cost = 20
priority = 100
passive_enable = false
passive_disable = true
process_name = "OSPF1"
area_id = "0"
interface_name = "GigabitEthernet0/0/0/1"
network_broadcast = false
network_non_broadcast = false
network_point_to_point = true
network_point_to_multipoint = false
cost = 20
priority = 100
passive_enable = false
passive_disable = true
fast_reroute_per_prefix_ti_lfa_enable = true
fast_reroute_per_prefix_tiebreaker_srlg_disjoint_index = 22
fast_reroute_per_prefix_tiebreaker_node_protecting_index = 33
}
```

Expand All @@ -44,19 +47,46 @@ resource "iosxr_router_ospf_area_interface" "example" {
- `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.
- `fast_reroute_per_prefix_ti_lfa_enable` (Boolean) Enable TI LFA computation
- `fast_reroute_per_prefix_tiebreaker_node_protecting_index` (Number) Set preference order among tiebreakers
- Range: `1`-`255`
- `fast_reroute_per_prefix_tiebreaker_srlg_disjoint_index` (Number) Set preference order among tiebreakers
- Range: `1`-`255`
- `network_broadcast` (Boolean) Specify OSPF broadcast multi-access network
- `network_non_broadcast` (Boolean) Specify OSPF NBMA network
- `network_point_to_multipoint` (Boolean) Specify OSPF point-to-multipoint network
- `network_point_to_point` (Boolean) Specify OSPF point-to-point network
- `passive_disable` (Boolean) Disable passive
- `passive_enable` (Boolean) Enable passive
- `prefix_sid_algorithms` (Attributes List) Algorithm Specific Prefix SID Configuration (see [below for nested schema](#nestedatt--prefix_sid_algorithms))
- `prefix_sid_strict_spf_index_sid_index` (Number) SID Index
- Range: `0`-`1048575`
- `priority` (Number) Router priority
- Range: `0`-`255`

### Read-Only

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

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

Required:

- `absolute_sid_label` (Number) SID value
- Range: `16000`-`1048575`
- `algorithm_number` (Number) Algorithm Specific Prefix SID Configuration
- Range: `128`-`255`
- `index_sid_index` (Number) SID Index
- Range: `0`-`1048575`

Optional:

- `absolute_explicit_null` (Boolean) Force penultimate hop to send explicit-null label
- `absolute_n_flag_clear` (Boolean) Not a node SID (e.g. for anycast SID use)
- `index_explicit_null` (Boolean) Force penultimate hop to send explicit-null label
- `index_n_flag_clear` (Boolean) Not a node SID (e.g. for anycast SID use)

## Import

Import is supported using the following syntax:
Expand Down
8 changes: 8 additions & 0 deletions docs/resources/snmp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ resource "iosxr_snmp_server" "example" {
user_name = "USER1"
group_name = "GROUP1"
v3_auth_md5_encryption_aes = "073C05626E2A4841141D"
v3_ipv4 = "ACL1"
v3_systemowner = true
}
]
groups = [
Expand Down Expand Up @@ -218,6 +220,12 @@ Optional:

- `v3_auth_md5_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_auth_md5_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_auth_sha_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_auth_sha_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_ipv4` (String) Type of Access-list
- `v3_priv_aes_aes_128_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_priv_aes_aes_128_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_systemowner` (Boolean) System Owner permissions for MIB objects

## Import

Expand Down
2 changes: 2 additions & 0 deletions examples/resources/iosxr_router_ospf/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ resource "iosxr_router_ospf" "example" {
default_information_originate_metric_type = 1
auto_cost_reference_bandwidth = 100000
auto_cost_disable = false
segment_routing_mpls = true
segment_routing_sr_prefer = true
areas = [
{
area_id = "0"
Expand Down
25 changes: 14 additions & 11 deletions examples/resources/iosxr_router_ospf_area_interface/resource.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
resource "iosxr_router_ospf_area_interface" "example" {
process_name = "OSPF1"
area_id = "0"
interface_name = "GigabitEthernet0/0/0/1"
network_broadcast = false
network_non_broadcast = false
network_point_to_point = true
network_point_to_multipoint = false
cost = 20
priority = 100
passive_enable = false
passive_disable = true
process_name = "OSPF1"
area_id = "0"
interface_name = "GigabitEthernet0/0/0/1"
network_broadcast = false
network_non_broadcast = false
network_point_to_point = true
network_point_to_multipoint = false
cost = 20
priority = 100
passive_enable = false
passive_disable = true
fast_reroute_per_prefix_ti_lfa_enable = true
fast_reroute_per_prefix_tiebreaker_srlg_disjoint_index = 22
fast_reroute_per_prefix_tiebreaker_node_protecting_index = 33
}
2 changes: 2 additions & 0 deletions examples/resources/iosxr_snmp_server/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ resource "iosxr_snmp_server" "example" {
user_name = "USER1"
group_name = "GROUP1"
v3_auth_md5_encryption_aes = "073C05626E2A4841141D"
v3_ipv4 = "ACL1"
v3_systemowner = true
}
]
groups = [
Expand Down
4 changes: 4 additions & 0 deletions gen/definitions/router_ospf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ attributes:
example: 100000
- yang_name: auto-cost/disable
example: false
- yang_name: segment-routing/mpls
example: true
- yang_name: segment-routing/sr-prefer
example: true
- yang_name: areas/area
tf_name: areas
type: List
Expand Down
35 changes: 35 additions & 0 deletions gen/definitions/router_ospf_area_interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,38 @@ attributes:
example: false
- yang_name: passive/disable
example: true
- yang_name: fast-reroute/per-prefix/ti-lfa/enable
example: true
- yang_name: fast-reroute/per-prefix/tiebreaker/srlg-disjoint/index
example: 22
- yang_name: fast-reroute/per-prefix/tiebreaker/node-protecting/index
example: 33
- yang_name: prefix-sid/strict-spf/index/sid-index
example: 3000
optional: true
delete_parent: true
exclude_test: true
## prefix-sid only support for Loopback interface

- yang_name: prefix-sid/algorithms/algorithm
tf_name: prefix_sid_algorithms
type: List
exclude_test: true
attributes:
- yang_name: algorithm-number
id: true
example: 233
- yang_name: index/sid-index
example: 1048
- yang_name: index/explicit-null
example: false
- yang_name: index/n-flag-clear
example: false
- yang_name: absolute/sid-label
example: 17000
- yang_name: absolute/explicit-null
example: true
exclude_test: true
- yang_name: absolute/n-flag-clear
example: true
exclude_test: true
16 changes: 16 additions & 0 deletions gen/definitions/snmp_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,22 @@ attributes:
- yang_name: v3/auth/md5/encryption-default
exclude_test: true
example: 073C05626E2A4841141D
- yang_name: v3/auth/sha/encryption-aes
example: 073C05626E2A4841231D
exclude_test: true
- yang_name: v3/auth/sha/encryption-default
exclude_test: true
example: 073C05626E2A4843341D
- yang_name: v3/priv/aes/aes-128/encryption-default
example: 073C05626E2A4841141D
exclude_test: true
- yang_name: v3/priv/aes/aes-128/encryption-aes
example: 073C05626E2A4841231D
exclude_test: true
- yang_name: v3/ipv4
example: ACL1
- yang_name: v3/systemowner
example: true
- yang_name: groups/group
tf_name: groups
type: List
Expand Down
8 changes: 8 additions & 0 deletions internal/provider/data_source_iosxr_router_ospf.go

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

52 changes: 52 additions & 0 deletions internal/provider/data_source_iosxr_router_ospf_area_interface.go

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

Loading

0 comments on commit 4808d5f

Please sign in to comment.