Skip to content

Commit d415037

Browse files
committed
Add load balancing attributes to l2vpn resource
1 parent 9725c73 commit d415037

File tree

12 files changed

+108
-15
lines changed

12 files changed

+108
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Add `metric` attributes to `iosxr_router_isis_interface_address_family` resource and data source
66
- Add `nexthop_trigger_delay_critical` and `nexthop_trigger_delay_non_critical` attributes to `iosxr_router_bgp_address_family` resource and data source
77
- Add `advertisement_interval` attributes to `iosxr_router_bgp`, `iosxr_router_bgp_vrf` and `iosxr_router_bgp_neighbor_group` resources and data sources
8+
- Add `load_balancing_flow_src_dst_mac` and `load_balancing_flow_src_dst_ip` attributes to `iosxr_l2vpn` resource and data source
89

910
## 0.2.3
1011

docs/data-sources/l2vpn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ data "iosxr_l2vpn" "example" {
2828

2929
- `description` (String) Multi segment psedowire global description
3030
- `id` (String) The path of the retrieved object.
31+
- `load_balancing_flow_src_dst_ip` (Boolean) Use source and destination IP addresses for hashing
32+
- `load_balancing_flow_src_dst_mac` (Boolean) Use source and destination MAC addresses for hashing
3133
- `router_id` (String) Global L2VPN Router ID
3234
- `xconnect_groups` (Attributes List) Specify the group the cross connects belong to (see [below for nested schema](#nestedatt--xconnect_groups))
3335

docs/guides/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ description: |-
1414
- Add `metric` attributes to `iosxr_router_isis_interface_address_family` resource and data source
1515
- Add `nexthop_trigger_delay_critical` and `nexthop_trigger_delay_non_critical` attributes to `iosxr_router_bgp_address_family` resource and data source
1616
- Add `advertisement_interval` attributes to `iosxr_router_bgp`, `iosxr_router_bgp_vrf` and `iosxr_router_bgp_neighbor_group` resources and data sources
17+
- Add `load_balancing_flow_src_dst_mac` and `load_balancing_flow_src_dst_ip` attributes to `iosxr_l2vpn` resource and data source
1718

1819
## 0.2.3
1920

docs/resources/l2vpn.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ This resource can manage the L2VPN configuration.
1414

1515
```terraform
1616
resource "iosxr_l2vpn" "example" {
17-
description = "My L2VPN Description"
18-
router_id = "1.2.3.4"
17+
description = "My L2VPN Description"
18+
router_id = "1.2.3.4"
19+
load_balancing_flow_src_dst_mac = false
20+
load_balancing_flow_src_dst_ip = true
1921
xconnect_groups = [
2022
{
2123
group_name = "P2P"
@@ -33,6 +35,8 @@ resource "iosxr_l2vpn" "example" {
3335
- Choices: `all`, `attributes`
3436
- `description` (String) Multi segment psedowire global description
3537
- `device` (String) A device name from the provider configuration.
38+
- `load_balancing_flow_src_dst_ip` (Boolean) Use source and destination IP addresses for hashing
39+
- `load_balancing_flow_src_dst_mac` (Boolean) Use source and destination MAC addresses for hashing
3640
- `router_id` (String) Global L2VPN Router ID
3741
- `xconnect_groups` (Attributes List) Specify the group the cross connects belong to (see [below for nested schema](#nestedatt--xconnect_groups))
3842

examples/resources/iosxr_l2vpn/resource.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
resource "iosxr_l2vpn" "example" {
2-
description = "My L2VPN Description"
3-
router_id = "1.2.3.4"
2+
description = "My L2VPN Description"
3+
router_id = "1.2.3.4"
4+
load_balancing_flow_src_dst_mac = false
5+
load_balancing_flow_src_dst_ip = true
46
xconnect_groups = [
57
{
68
group_name = "P2P"

gen/definitions/l2vpn.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ attributes:
77
example: My L2VPN Description
88
- yang_name: router-id
99
example: 1.2.3.4
10+
- yang_name: load-balancing/flow/src-dst-mac
11+
example: false
12+
- yang_name: load-balancing/flow/src-dst-ip
13+
example: true
1014
- yang_name: xconnect/groups/group
1115
tf_name: xconnect_groups
1216
type: List

internal/provider/data_source_iosxr_l2vpn.go

Lines changed: 8 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_l2vpn_test.go

Lines changed: 4 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_l2vpn.go

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

internal/provider/resource_iosxr_l2vpn.go

Lines changed: 8 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)