Skip to content

Commit d6639c1

Browse files
committed
Add bundle attributes to interface resource
1 parent f4a4a16 commit d6639c1

File tree

12 files changed

+307
-0
lines changed

12 files changed

+307
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.1 (unreleased)
2+
3+
- Add `bundle` attributes to `iosxr_interface` resource and data source
4+
15
## 0.2.0
26

37
- Introduce more granular controls around resource delete operations (`delete_mode`)

docs/data-sources/interface.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ data "iosxr_interface" "example" {
3333

3434
- `bandwidth` (Number) Set the bandwidth of an interface
3535
- `bfd_mode_ietf` (Boolean) Use IETF standard for BoB
36+
- `bundle_id` (Number) Add the port to an aggregated interface.
37+
- `bundle_id_mode` (String) Specify the mode of operation.
38+
- `bundle_load_balancing_hash_dst_ip` (Boolean) Use the destination IP as the hash function
39+
- `bundle_load_balancing_hash_src_ip` (Boolean) Use the source IP as the hash function
40+
- `bundle_maximum_active_links` (Number) Set the maximum number of active links in this bundle
41+
- `bundle_minimum_active_links` (Number) Set the number of active links needed to bring up this bundle
42+
- `bundle_port_priority` (Number) Priority for this port. Lower value is higher priority.
43+
- `bundle_shutdown` (Boolean) Bring all links in the bundle down to Standby state
3644
- `dampening_decay_half_life_value` (Number) Decay half life (in minutes)
3745
- `description` (String) Set description for this interface
3846
- `encapsulation_dot1q_vlan_id` (Number) Configure first (outer) VLAN ID on the subinterface

docs/guides/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ description: |-
77

88
# Changelog
99

10+
## 0.2.1 (unreleased)
11+
12+
- Add `bundle` attributes to `iosxr_interface` resource and data source
13+
1014
## 0.2.0
1115

1216
- Introduce more granular controls around resource delete operations (`delete_mode`)

docs/resources/interface.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ resource "iosxr_interface" "example" {
4949
zone = "0"
5050
}
5151
]
52+
bundle_port_priority = 100
5253
}
5354
```
5455

@@ -66,6 +67,19 @@ resource "iosxr_interface" "example" {
6667
- `bandwidth` (Number) Set the bandwidth of an interface
6768
- Range: `0`-`9223372036854775807`
6869
- `bfd_mode_ietf` (Boolean) Use IETF standard for BoB
70+
- `bundle_id` (Number) Add the port to an aggregated interface.
71+
- Range: `1`-`65535`
72+
- `bundle_id_mode` (String) Specify the mode of operation.
73+
- Choices: `active`, `inherit`, `on`, `passive`
74+
- `bundle_load_balancing_hash_dst_ip` (Boolean) Use the destination IP as the hash function
75+
- `bundle_load_balancing_hash_src_ip` (Boolean) Use the source IP as the hash function
76+
- `bundle_maximum_active_links` (Number) Set the maximum number of active links in this bundle
77+
- Range: `1`-`64`
78+
- `bundle_minimum_active_links` (Number) Set the number of active links needed to bring up this bundle
79+
- Range: `1`-`64`
80+
- `bundle_port_priority` (Number) Priority for this port. Lower value is higher priority.
81+
- Range: `1`-`65535`
82+
- `bundle_shutdown` (Boolean) Bring all links in the bundle down to Standby state
6983
- `description` (String) Set description for this interface
7084
- `device` (String) A device name from the provider configuration.
7185
- `encapsulation_dot1q_vlan_id` (Number) Configure first (outer) VLAN ID on the subinterface

examples/resources/iosxr_interface/resource.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ resource "iosxr_interface" "example" {
3434
zone = "0"
3535
}
3636
]
37+
bundle_port_priority = 100
3738
}

gen/definitions/interface.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,34 @@ attributes:
119119
- yang_name: zone
120120
default_value: "0"
121121
example: "0"
122+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/minimum-active/links
123+
exclude_test: true
124+
example: 1
125+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/maximum-active/links/maximum-number
126+
tf_name: bundle_maximum_active_links
127+
optional: true
128+
exclude_test: true
129+
example: 8
130+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/shutdown
131+
exclude_test: true
132+
example: true
133+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/load-balancing/hash/src-ip
134+
exclude_test: true
135+
example: true
136+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/load-balancing/hash/dst-ip
137+
exclude_test: true
138+
example: true
139+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/id/bundle-id
140+
tf_name: bundle_id
141+
optional: true
142+
exclude_test: true
143+
example: 1
144+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/id/mode
145+
optional: true
146+
exclude_test: true
147+
example: active
148+
- yang_name: Cisco-IOS-XR-um-if-bundle-cfg:bundle/port-priority
149+
example: 100
122150
test_prerequisites:
123151
- path: Cisco-IOS-XR-um-policymap-classmap-cfg:/policy-map/type/qos[policy-map-name=PMAP-IN]
124152
attributes:

internal/provider/data_source_iosxr_interface.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/data_source_iosxr_interface_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/model_iosxr_interface.go

Lines changed: 161 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)