Skip to content

Commit

Permalink
Add load balancing attributes to l2vpn resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Jul 31, 2023
1 parent 9725c73 commit d415037
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `metric` attributes to `iosxr_router_isis_interface_address_family` resource and data source
- Add `nexthop_trigger_delay_critical` and `nexthop_trigger_delay_non_critical` attributes to `iosxr_router_bgp_address_family` resource and data source
- Add `advertisement_interval` attributes to `iosxr_router_bgp`, `iosxr_router_bgp_vrf` and `iosxr_router_bgp_neighbor_group` resources and data sources
- Add `load_balancing_flow_src_dst_mac` and `load_balancing_flow_src_dst_ip` attributes to `iosxr_l2vpn` resource and data source

## 0.2.3

Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/l2vpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ data "iosxr_l2vpn" "example" {

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

Expand Down
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description: |-
- Add `metric` attributes to `iosxr_router_isis_interface_address_family` resource and data source
- Add `nexthop_trigger_delay_critical` and `nexthop_trigger_delay_non_critical` attributes to `iosxr_router_bgp_address_family` resource and data source
- Add `advertisement_interval` attributes to `iosxr_router_bgp`, `iosxr_router_bgp_vrf` and `iosxr_router_bgp_neighbor_group` resources and data sources
- Add `load_balancing_flow_src_dst_mac` and `load_balancing_flow_src_dst_ip` attributes to `iosxr_l2vpn` resource and data source

## 0.2.3

Expand Down
8 changes: 6 additions & 2 deletions docs/resources/l2vpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ This resource can manage the L2VPN configuration.

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

Expand Down
6 changes: 4 additions & 2 deletions examples/resources/iosxr_l2vpn/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
resource "iosxr_l2vpn" "example" {
description = "My L2VPN Description"
router_id = "1.2.3.4"
description = "My L2VPN Description"
router_id = "1.2.3.4"
load_balancing_flow_src_dst_mac = false
load_balancing_flow_src_dst_ip = true
xconnect_groups = [
{
group_name = "P2P"
Expand Down
4 changes: 4 additions & 0 deletions gen/definitions/l2vpn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ attributes:
example: My L2VPN Description
- yang_name: router-id
example: 1.2.3.4
- yang_name: load-balancing/flow/src-dst-mac
example: false
- yang_name: load-balancing/flow/src-dst-ip
example: true
- yang_name: xconnect/groups/group
tf_name: xconnect_groups
type: List
Expand Down
8 changes: 8 additions & 0 deletions internal/provider/data_source_iosxr_l2vpn.go

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

4 changes: 4 additions & 0 deletions internal/provider/data_source_iosxr_l2vpn_test.go

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

76 changes: 65 additions & 11 deletions internal/provider/model_iosxr_l2vpn.go

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

8 changes: 8 additions & 0 deletions internal/provider/resource_iosxr_l2vpn.go

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

4 changes: 4 additions & 0 deletions internal/provider/resource_iosxr_l2vpn_test.go

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

1 change: 1 addition & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description: |-
- Add `metric` attributes to `iosxr_router_isis_interface_address_family` resource and data source
- Add `nexthop_trigger_delay_critical` and `nexthop_trigger_delay_non_critical` attributes to `iosxr_router_bgp_address_family` resource and data source
- Add `advertisement_interval` attributes to `iosxr_router_bgp`, `iosxr_router_bgp_vrf` and `iosxr_router_bgp_neighbor_group` resources and data sources
- Add `load_balancing_flow_src_dst_mac` and `load_balancing_flow_src_dst_ip` attributes to `iosxr_l2vpn` resource and data source

## 0.2.3

Expand Down

0 comments on commit d415037

Please sign in to comment.