Skip to content

Commit 75c5c1a

Browse files
authored
Add ospf attributes (#351)
1 parent feb928a commit 75c5c1a

27 files changed

+1651
-20
lines changed

docs/data-sources/interface_ospf.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ data "iosxe_interface_ospf" "example" {
3939
- `id` (String) The path of the retrieved object.
4040
- `message_digest_keys` (Attributes List) Message digest authentication password (key) (see [below for nested schema](#nestedatt--message_digest_keys))
4141
- `mtu_ignore` (Boolean) Ignores the MTU in DBD packets
42+
- `multi_area_ids` (Attributes List) Set the OSPF multi-area ID (see [below for nested schema](#nestedatt--multi_area_ids))
4243
- `network_type_broadcast` (Boolean) Specify OSPF broadcast multi-access network
4344
- `network_type_non_broadcast` (Boolean) Specify OSPF NBMA network
4445
- `network_type_point_to_multipoint` (Boolean) Specify OSPF point-to-multipoint network
@@ -57,6 +58,14 @@ Read-Only:
5758
- `md5_auth_type` (Number) Encryption type (0 for not yet encrypted, 7 for proprietary)
5859

5960

61+
<a id="nestedatt--multi_area_ids"></a>
62+
### Nested Schema for `multi_area_ids`
63+
64+
Read-Only:
65+
66+
- `area_id` (String) OSPF multi-area ID
67+
68+
6069
<a id="nestedatt--process_ids"></a>
6170
### Nested Schema for `process_ids`
6271

docs/data-sources/ospf.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,24 @@ data "iosxe_ospf" "example" {
3939
- `default_metric` (Number) Set metric of redistributed routes
4040
- `distance` (Number) Administrative distance
4141
- `domain_tag` (Number) OSPF domain-tag
42+
- `fast_reroute_per_prefix_enable_prefix_priority` (String) Priority of prefixes to be protected
4243
- `id` (String) The path of the retrieved object.
44+
- `log_adjacency_changes` (Boolean) Log changes in adjacency state
45+
- `log_adjacency_changes_detail` (Boolean) Log all state changes
46+
- `max_metric_router_lsa` (Boolean) Maximum metric in self-originated router-LSAs
47+
- `max_metric_router_lsa_external_lsa_metric` (Number)
48+
- `max_metric_router_lsa_include_stub` (Boolean) Set maximum metric for stub links in router-LSAs
49+
- `max_metric_router_lsa_on_startup_time` (Number)
50+
- `max_metric_router_lsa_on_startup_wait_for_bgp` (Boolean) Let BGP decide when to originate router-LSA with normal metric
51+
- `max_metric_router_lsa_summary_lsa_metric` (Number)
4352
- `mpls_ldp_autoconfig` (Boolean) Configure LDP automatic configuration
4453
- `mpls_ldp_sync` (Boolean) Configure LDP-IGP Synchronization
4554
- `neighbors` (Attributes List) Specify a neighbor router (see [below for nested schema](#nestedatt--neighbors))
4655
- `networks` (Attributes List) Enable routing on an IP network (see [below for nested schema](#nestedatt--networks))
56+
- `nsf_cisco` (Boolean) Cisco Non-stop forwarding
57+
- `nsf_cisco_enforce_global` (Boolean) For the whole OSPF process
58+
- `nsf_ietf` (Boolean) IETF graceful restart
59+
- `nsf_ietf_restart_interval` (Number) Graceful restart interval
4760
- `passive_interface` (List of String)
4861
- `passive_interface_default` (Boolean) Suppress routing updates on all interfaces
4962
- `passive_interface_disable_five_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_five_gigabit_ethernets))
@@ -61,6 +74,8 @@ data "iosxe_ospf" "example" {
6174
- `passive_interface_disable_two_hundred_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_two_hundred_gigabit_ethernets))
6275
- `passive_interface_disable_vlans` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_vlans))
6376
- `priority` (Number) OSPF topology priority
77+
- `redistribute_connected_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
78+
- `redistribute_static_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
6479
- `router_id` (String) Configure router identifier. New router-id will take effect immediately (peers will reset)
6580
- `shutdown` (Boolean) Shutdown the OSPF protocol under the current instance
6681
- `summary_addresses` (Attributes List) Configure IP address summaries (see [below for nested schema](#nestedatt--summary_addresses))

docs/data-sources/ospf_vrf.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,22 @@ data "iosxe_ospf_vrf" "example" {
4242
- `distance` (Number) Administrative distance
4343
- `domain_tag` (Number) OSPF domain-tag
4444
- `id` (String) The path of the retrieved object.
45+
- `log_adjacency_changes` (Boolean) Log changes in adjacency state
46+
- `log_adjacency_changes_detail` (Boolean) Log all state changes
47+
- `max_metric_router_lsa` (Boolean) Maximum metric in self-originated router-LSAs
48+
- `max_metric_router_lsa_external_lsa_metric` (Number)
49+
- `max_metric_router_lsa_include_stub` (Boolean) Set maximum metric for stub links in router-LSAs
50+
- `max_metric_router_lsa_on_startup_time` (Number)
51+
- `max_metric_router_lsa_on_startup_wait_for_bgp` (Boolean) Let BGP decide when to originate router-LSA with normal metric
52+
- `max_metric_router_lsa_summary_lsa_metric` (Number)
4553
- `mpls_ldp_autoconfig` (Boolean) Configure LDP automatic configuration
4654
- `mpls_ldp_sync` (Boolean) Configure LDP-IGP Synchronization
4755
- `neighbor` (Attributes List) Specify a neighbor router (see [below for nested schema](#nestedatt--neighbor))
4856
- `network` (Attributes List) Enable routing on an IP network (see [below for nested schema](#nestedatt--network))
57+
- `nsf_cisco` (Boolean) Cisco Non-stop forwarding
58+
- `nsf_cisco_enforce_global` (Boolean) For the whole OSPF process
59+
- `nsf_ietf` (Boolean) IETF graceful restart
60+
- `nsf_ietf_restart_interval` (Number) Graceful restart interval
4961
- `passive_interface` (List of String)
5062
- `passive_interface_default` (Boolean) Suppress routing updates on all interfaces
5163
- `passive_interface_disable_five_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_five_gigabit_ethernets))
@@ -63,6 +75,8 @@ data "iosxe_ospf_vrf" "example" {
6375
- `passive_interface_disable_two_hundred_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_two_hundred_gigabit_ethernets))
6476
- `passive_interface_disable_vlans` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_vlans))
6577
- `priority` (Number) OSPF topology priority
78+
- `redistribute_connected_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
79+
- `redistribute_static_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
6680
- `router_id` (String) Configure router identifier. New router-id will take effect immediately (peers will reset)
6781
- `shutdown` (Boolean) Shutdown the OSPF protocol under the current instance
6882
- `summary_address` (Attributes List) Configure IP address summaries (see [below for nested schema](#nestedatt--summary_address))

docs/resources/interface_ospf.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ resource "iosxe_interface_ospf" "example" {
3636
]
3737
}
3838
]
39+
multi_area_ids = [
40+
{
41+
area_id = "10"
42+
}
43+
]
3944
message_digest_keys = [
4045
{
4146
id = 1
@@ -68,6 +73,7 @@ resource "iosxe_interface_ospf" "example" {
6873
- Range: `1`-`65535`
6974
- `message_digest_keys` (Attributes List) Message digest authentication password (key) (see [below for nested schema](#nestedatt--message_digest_keys))
7075
- `mtu_ignore` (Boolean) Ignores the MTU in DBD packets
76+
- `multi_area_ids` (Attributes List) Set the OSPF multi-area ID (see [below for nested schema](#nestedatt--multi_area_ids))
7177
- `network_type_broadcast` (Boolean) Specify OSPF broadcast multi-access network
7278
- `network_type_non_broadcast` (Boolean) Specify OSPF NBMA network
7379
- `network_type_point_to_multipoint` (Boolean) Specify OSPF point-to-multipoint network
@@ -97,6 +103,14 @@ Optional:
97103
- Range: `0`-`7`
98104

99105

106+
<a id="nestedatt--multi_area_ids"></a>
107+
### Nested Schema for `multi_area_ids`
108+
109+
Required:
110+
111+
- `area_id` (String) OSPF multi-area ID
112+
113+
100114
<a id="nestedatt--process_ids"></a>
101115
### Nested Schema for `process_ids`
102116

docs/resources/ospf.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,23 @@ resource "iosxe_ospf" "example" {
5656
nssa_no_redistribution = true
5757
}
5858
]
59-
auto_cost_reference_bandwidth = 40000
60-
passive_interface_default = true
59+
auto_cost_reference_bandwidth = 40000
60+
passive_interface_default = true
61+
log_adjacency_changes = true
62+
log_adjacency_changes_detail = true
63+
nsf_cisco = true
64+
nsf_cisco_enforce_global = true
65+
nsf_ietf = true
66+
nsf_ietf_restart_interval = 120
67+
max_metric_router_lsa = true
68+
max_metric_router_lsa_summary_lsa_metric = 16711680
69+
max_metric_router_lsa_external_lsa_metric = 16711680
70+
max_metric_router_lsa_include_stub = true
71+
max_metric_router_lsa_on_startup_time = 60
72+
max_metric_router_lsa_on_startup_wait_for_bgp = true
73+
fast_reroute_per_prefix_enable_prefix_priority = "high"
74+
redistribute_static_subnets = true
75+
redistribute_connected_subnets = true
6176
}
6277
```
6378

@@ -86,10 +101,25 @@ resource "iosxe_ospf" "example" {
86101
- Range: `1`-`255`
87102
- `domain_tag` (Number) OSPF domain-tag
88103
- Range: `1`-`4294967295`
104+
- `fast_reroute_per_prefix_enable_prefix_priority` (String) Priority of prefixes to be protected
105+
- Choices: `high`, `low`
106+
- `log_adjacency_changes` (Boolean) Log changes in adjacency state
107+
- `log_adjacency_changes_detail` (Boolean) Log all state changes
108+
- `max_metric_router_lsa` (Boolean) Maximum metric in self-originated router-LSAs
109+
- `max_metric_router_lsa_external_lsa_metric` (Number) - Range: `1`-`16777214`
110+
- `max_metric_router_lsa_include_stub` (Boolean) Set maximum metric for stub links in router-LSAs
111+
- `max_metric_router_lsa_on_startup_time` (Number) - Range: `5`-`86400`
112+
- `max_metric_router_lsa_on_startup_wait_for_bgp` (Boolean) Let BGP decide when to originate router-LSA with normal metric
113+
- `max_metric_router_lsa_summary_lsa_metric` (Number) - Range: `1`-`16777214`
89114
- `mpls_ldp_autoconfig` (Boolean) Configure LDP automatic configuration
90115
- `mpls_ldp_sync` (Boolean) Configure LDP-IGP Synchronization
91116
- `neighbors` (Attributes List) Specify a neighbor router (see [below for nested schema](#nestedatt--neighbors))
92117
- `networks` (Attributes List) Enable routing on an IP network (see [below for nested schema](#nestedatt--networks))
118+
- `nsf_cisco` (Boolean) Cisco Non-stop forwarding
119+
- `nsf_cisco_enforce_global` (Boolean) For the whole OSPF process
120+
- `nsf_ietf` (Boolean) IETF graceful restart
121+
- `nsf_ietf_restart_interval` (Number) Graceful restart interval
122+
- Range: `1`-`1800`
93123
- `passive_interface` (List of String)
94124
- `passive_interface_default` (Boolean) Suppress routing updates on all interfaces
95125
- `passive_interface_disable_five_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_five_gigabit_ethernets))
@@ -108,6 +138,8 @@ resource "iosxe_ospf" "example" {
108138
- `passive_interface_disable_vlans` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_vlans))
109139
- `priority` (Number) OSPF topology priority
110140
- Range: `0`-`127`
141+
- `redistribute_connected_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
142+
- `redistribute_static_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
111143
- `router_id` (String) Configure router identifier. New router-id will take effect immediately (peers will reset)
112144
- `shutdown` (Boolean) Shutdown the OSPF protocol under the current instance
113145
- `summary_addresses` (Attributes List) Configure IP address summaries (see [below for nested schema](#nestedatt--summary_addresses))

docs/resources/ospf_vrf.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@ This resource can manage the OSPF VRF configuration.
1414

1515
```terraform
1616
resource "iosxe_ospf_vrf" "example" {
17-
process_id = 2
18-
vrf = "VRF1"
19-
bfd_all_interfaces = true
20-
default_information_originate = true
21-
default_information_originate_always = true
22-
default_metric = 21
23-
distance = 120
24-
domain_tag = 10
17+
process_id = 2
18+
vrf = "VRF1"
19+
bfd_all_interfaces = true
20+
default_information_originate = true
21+
default_information_originate_always = true
22+
default_metric = 21
23+
distance = 120
24+
domain_tag = 10
25+
log_adjacency_changes = true
26+
log_adjacency_changes_detail = true
27+
nsf_cisco = true
28+
nsf_cisco_enforce_global = true
29+
nsf_ietf = true
30+
nsf_ietf_restart_interval = 120
31+
max_metric_router_lsa = true
32+
max_metric_router_lsa_summary_lsa_metric = 16711680
33+
max_metric_router_lsa_external_lsa_metric = 16711680
34+
max_metric_router_lsa_include_stub = true
35+
max_metric_router_lsa_on_startup_time = 60
36+
max_metric_router_lsa_on_startup_wait_for_bgp = true
37+
redistribute_static_subnets = true
38+
redistribute_connected_subnets = true
2539
neighbor = [
2640
{
2741
ip = "2.2.2.2"
@@ -88,10 +102,23 @@ resource "iosxe_ospf_vrf" "example" {
88102
- Range: `1`-`255`
89103
- `domain_tag` (Number) OSPF domain-tag
90104
- Range: `1`-`4294967295`
105+
- `log_adjacency_changes` (Boolean) Log changes in adjacency state
106+
- `log_adjacency_changes_detail` (Boolean) Log all state changes
107+
- `max_metric_router_lsa` (Boolean) Maximum metric in self-originated router-LSAs
108+
- `max_metric_router_lsa_external_lsa_metric` (Number) - Range: `1`-`16777214`
109+
- `max_metric_router_lsa_include_stub` (Boolean) Set maximum metric for stub links in router-LSAs
110+
- `max_metric_router_lsa_on_startup_time` (Number) - Range: `5`-`86400`
111+
- `max_metric_router_lsa_on_startup_wait_for_bgp` (Boolean) Let BGP decide when to originate router-LSA with normal metric
112+
- `max_metric_router_lsa_summary_lsa_metric` (Number) - Range: `1`-`16777214`
91113
- `mpls_ldp_autoconfig` (Boolean) Configure LDP automatic configuration
92114
- `mpls_ldp_sync` (Boolean) Configure LDP-IGP Synchronization
93115
- `neighbor` (Attributes List) Specify a neighbor router (see [below for nested schema](#nestedatt--neighbor))
94116
- `network` (Attributes List) Enable routing on an IP network (see [below for nested schema](#nestedatt--network))
117+
- `nsf_cisco` (Boolean) Cisco Non-stop forwarding
118+
- `nsf_cisco_enforce_global` (Boolean) For the whole OSPF process
119+
- `nsf_ietf` (Boolean) IETF graceful restart
120+
- `nsf_ietf_restart_interval` (Number) Graceful restart interval
121+
- Range: `1`-`1800`
95122
- `passive_interface` (List of String)
96123
- `passive_interface_default` (Boolean) Suppress routing updates on all interfaces
97124
- `passive_interface_disable_five_gigabit_ethernets` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_five_gigabit_ethernets))
@@ -110,6 +137,8 @@ resource "iosxe_ospf_vrf" "example" {
110137
- `passive_interface_disable_vlans` (Attributes Set) (see [below for nested schema](#nestedatt--passive_interface_disable_vlans))
111138
- `priority` (Number) OSPF topology priority
112139
- Range: `0`-`127`
140+
- `redistribute_connected_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
141+
- `redistribute_static_subnets` (Boolean) Consider subnets for redistribution into OSPF (Will be removed in the future)
113142
- `router_id` (String) Configure router identifier. New router-id will take effect immediately (peers will reset)
114143
- `shutdown` (Boolean) Shutdown the OSPF protocol under the current instance
115144
- `summary_address` (Attributes List) Configure IP address summaries (see [below for nested schema](#nestedatt--summary_address))

examples/resources/iosxe_interface_ospf/resource.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ resource "iosxe_interface_ospf" "example" {
2121
]
2222
}
2323
]
24+
multi_area_ids = [
25+
{
26+
area_id = "10"
27+
}
28+
]
2429
message_digest_keys = [
2530
{
2631
id = 1

examples/resources/iosxe_ospf/resource.tf

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@ resource "iosxe_ospf" "example" {
4141
nssa_no_redistribution = true
4242
}
4343
]
44-
auto_cost_reference_bandwidth = 40000
45-
passive_interface_default = true
44+
auto_cost_reference_bandwidth = 40000
45+
passive_interface_default = true
46+
log_adjacency_changes = true
47+
log_adjacency_changes_detail = true
48+
nsf_cisco = true
49+
nsf_cisco_enforce_global = true
50+
nsf_ietf = true
51+
nsf_ietf_restart_interval = 120
52+
max_metric_router_lsa = true
53+
max_metric_router_lsa_summary_lsa_metric = 16711680
54+
max_metric_router_lsa_external_lsa_metric = 16711680
55+
max_metric_router_lsa_include_stub = true
56+
max_metric_router_lsa_on_startup_time = 60
57+
max_metric_router_lsa_on_startup_wait_for_bgp = true
58+
fast_reroute_per_prefix_enable_prefix_priority = "high"
59+
redistribute_static_subnets = true
60+
redistribute_connected_subnets = true
4661
}

examples/resources/iosxe_ospf_vrf/resource.tf

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
resource "iosxe_ospf_vrf" "example" {
2-
process_id = 2
3-
vrf = "VRF1"
4-
bfd_all_interfaces = true
5-
default_information_originate = true
6-
default_information_originate_always = true
7-
default_metric = 21
8-
distance = 120
9-
domain_tag = 10
2+
process_id = 2
3+
vrf = "VRF1"
4+
bfd_all_interfaces = true
5+
default_information_originate = true
6+
default_information_originate_always = true
7+
default_metric = 21
8+
distance = 120
9+
domain_tag = 10
10+
log_adjacency_changes = true
11+
log_adjacency_changes_detail = true
12+
nsf_cisco = true
13+
nsf_cisco_enforce_global = true
14+
nsf_ietf = true
15+
nsf_ietf_restart_interval = 120
16+
max_metric_router_lsa = true
17+
max_metric_router_lsa_summary_lsa_metric = 16711680
18+
max_metric_router_lsa_external_lsa_metric = 16711680
19+
max_metric_router_lsa_include_stub = true
20+
max_metric_router_lsa_on_startup_time = 60
21+
max_metric_router_lsa_on_startup_wait_for_bgp = true
22+
redistribute_static_subnets = true
23+
redistribute_connected_subnets = true
1024
neighbor = [
1125
{
1226
ip = "2.2.2.2"

gen/definitions/interface_ospf.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ attributes:
7171
- yang_name: area-id
7272
id: true
7373
example: 0
74+
- yang_name: multi-area/multi-area-id
75+
tf_name: multi_area_ids
76+
type: List
77+
attributes:
78+
- yang_name: area-id
79+
id: true
80+
type: String
81+
example: "10"
7482
- yang_name: message-digest-key
7583
tf_name: message_digest_keys
7684
type: List

0 commit comments

Comments
 (0)