Skip to content

Commit afef2bd

Browse files
Add support for cef load balancing (#342)
1 parent 43200bd commit afef2bd

File tree

13 files changed

+296
-28
lines changed

13 files changed

+296
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Add `ip_dhcp_relay_information_option_vpn_id` attribute to `iosxe_interface_ethernet` resource and `iosxe_interface_vlan` resource
1212
- Add `local_routing` attribute to `iosxe_interface_nve` resource and data source
1313
- Add `ipv4_unicast_maximum_paths_ebgp` and `ipv4_unicast_maximum_paths_ibgp` attributes to the `iosxe_bgp_address_family_ipv4` and `iosxe_bgp_address_family_ipv4_vrf` resources
14+
- Add `ip_cef_load_sharing_algorithm_include_ports_source`, `ip_cef_load_sharing_algorithm_include_ports_destination`, `ipv6_cef_load_sharing_algorithm_include_ports_source`, `ipv6_cef_load_sharing_algorithm_include_ports_destination`, and `port_channel_load_balance` attributes to `iosxe_system` resource and data source
1415

1516
## 0.9.3
1617

docs/data-sources/system.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ data "iosxe_system" "example" {
5151
- `hostname` (String) Set system's network name
5252
- `id` (String) The path of the retrieved object.
5353
- `ip_bgp_community_new_format` (Boolean) select aa:nn format for BGP community
54+
- `ip_cef_load_sharing_algorithm_include_ports_destination` (Boolean)
55+
- `ip_cef_load_sharing_algorithm_include_ports_source` (Boolean)
5456
- `ip_domain_list_names` (List of String)
5557
- `ip_domain_list_vrf` (String)
5658
- `ip_domain_list_vrf_domain` (String)
@@ -132,6 +134,8 @@ data "iosxe_system" "example" {
132134
- `ip_tacacs_source_interface_two_gigabit_ethernet` (String) Two GigabitEthernet
133135
- `ip_tacacs_source_interface_vlan` (Number) Iosxr Vlans
134136
- `ip_tacacs_source_interface_vrf` (String) VPN Routing/Forwarding parameters
137+
- `ipv6_cef_load_sharing_algorithm_include_ports_destination` (Boolean)
138+
- `ipv6_cef_load_sharing_algorithm_include_ports_source` (Boolean)
135139
- `ipv6_unicast_routing` (Boolean) Enable unicast routing
136140
- `login_delay` (Number) Set delay between successive fail login
137141
- `login_on_failure` (Boolean) Set options for failed login attempt
@@ -144,6 +148,7 @@ data "iosxe_system" "example" {
144148
- `multicast_routing_vrfs` (Attributes List) Select VPN Routing/Forwarding instance (see [below for nested schema](#nestedatt--multicast_routing_vrfs))
145149
- `multilink_ppp_bundle_name` (String) Select method for naming multilink bundles
146150
- `pnp_profiles` (Attributes List) PNP profile (see [below for nested schema](#nestedatt--pnp_profiles))
151+
- `port_channel_load_balance` (String)
147152
- `redundancy` (Boolean) Enter redundancy mode
148153
- `redundancy_mode` (String) redundancy mode for this chassis
149154
- `security_passwords_min_length` (Number) Minimum length of passwords

docs/guides/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ description: |-
2020
- Add `ip_dhcp_relay_information_option_vpn_id` attribute to `iosxe_interface_ethernet` resource and `iosxe_interface_vlan` resource
2121
- Add `local_routing` attribute to `iosxe_interface_nve` resource and data source
2222
- Add `ipv4_unicast_maximum_paths_ebgp` and `ipv4_unicast_maximum_paths_ibgp` attributes to the `iosxe_bgp_address_family_ipv4` and `iosxe_bgp_address_family_ipv4_vrf` resources
23+
- Add `ip_cef_load_sharing_algorithm_include_ports_source`, `ip_cef_load_sharing_algorithm_include_ports_destination`, `ipv6_cef_load_sharing_algorithm_include_ports_source`, `ipv6_cef_load_sharing_algorithm_include_ports_destination`, and `port_channel_load_balance` attributes to `iosxe_system` resource and data source
2324

2425
## 0.9.3
2526

docs/resources/system.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,25 @@ resource "iosxe_system" "example" {
4545
source_interface_gigabit_ethernet = "1/0/1"
4646
}
4747
]
48-
diagnostic_bootup_level = "minimal"
49-
memory_free_low_watermark_processor = 203038
50-
ip_ssh_time_out = 120
51-
ip_ssh_authentication_retries = 3
52-
ip_ssh_bulk_mode = true
53-
ip_ssh_bulk_mode_window_size = 262144
54-
call_home_contact_email = "email@test.com"
55-
call_home_cisco_tac_1_profile_active = true
56-
call_home_cisco_tac_1_destination_transport_method = "email"
57-
ip_nbar_classification_dns_classify_by_domain = true
58-
ip_multicast_route_limit = 200000
59-
ip_domain_list_vrf_domain = "example.com"
60-
ip_domain_list_vrf = "VRF1"
61-
ip_routing_protocol_purge_interface = true
48+
diagnostic_bootup_level = "minimal"
49+
memory_free_low_watermark_processor = 203038
50+
ip_ssh_time_out = 120
51+
ip_ssh_authentication_retries = 3
52+
ip_ssh_bulk_mode = true
53+
ip_ssh_bulk_mode_window_size = 262144
54+
call_home_contact_email = "email@test.com"
55+
call_home_cisco_tac_1_profile_active = true
56+
call_home_cisco_tac_1_destination_transport_method = "email"
57+
ip_nbar_classification_dns_classify_by_domain = true
58+
ip_multicast_route_limit = 200000
59+
ip_domain_list_vrf_domain = "example.com"
60+
ip_domain_list_vrf = "VRF1"
61+
ip_routing_protocol_purge_interface = true
62+
ip_cef_load_sharing_algorithm_include_ports_source = true
63+
ip_cef_load_sharing_algorithm_include_ports_destination = true
64+
ipv6_cef_load_sharing_algorithm_include_ports_source = true
65+
ipv6_cef_load_sharing_algorithm_include_ports_destination = true
66+
port_channel_load_balance = "src-dst-mixed-ip-port"
6267
}
6368
```
6469

@@ -101,6 +106,8 @@ resource "iosxe_system" "example" {
101106
- Range: `2500`-`10000`
102107
- `hostname` (String) Set system's network name
103108
- `ip_bgp_community_new_format` (Boolean) select aa:nn format for BGP community
109+
- `ip_cef_load_sharing_algorithm_include_ports_destination` (Boolean)
110+
- `ip_cef_load_sharing_algorithm_include_ports_source` (Boolean)
104111
- `ip_domain_list_names` (List of String)
105112
- `ip_domain_list_vrf` (String)
106113
- `ip_domain_list_vrf_domain` (String)
@@ -199,6 +206,8 @@ resource "iosxe_system" "example" {
199206
- `ip_tacacs_source_interface_vlan` (Number) Iosxr Vlans
200207
- Range: `0`-`65535`
201208
- `ip_tacacs_source_interface_vrf` (String) VPN Routing/Forwarding parameters
209+
- `ipv6_cef_load_sharing_algorithm_include_ports_destination` (Boolean)
210+
- `ipv6_cef_load_sharing_algorithm_include_ports_source` (Boolean)
202211
- `ipv6_unicast_routing` (Boolean) Enable unicast routing
203212
- `login_delay` (Number) Set delay between successive fail login
204213
- Range: `1`-`10`
@@ -214,6 +223,7 @@ resource "iosxe_system" "example" {
214223
- `multilink_ppp_bundle_name` (String) Select method for naming multilink bundles
215224
- Choices: `authenticated`, `both`, `endpoint`, `rfc`
216225
- `pnp_profiles` (Attributes List) PNP profile (see [below for nested schema](#nestedatt--pnp_profiles))
226+
- `port_channel_load_balance` (String) - Choices: `dst-ip`, `dst-mac`, `dst-mixed-ip-port`, `dst-port`, `mpls`, `src-dst-ip`, `src-dst-mac`, `src-dst-mixed-ip-port`, `src-dst-port`, `src-ip`, `src-mac`, `src-mixed-ip-port`, `src-port`, `vlan-dst-ip`, `vlan-dst-mixed-ip-port`, `vlan-src-dst-ip`, `vlan-src-dst-mixed-ip-port`, `vlan-src-ip`, `vlan-src-mixed-ip-port`
217227
- `redundancy` (Boolean) Enter redundancy mode
218228
- `redundancy_mode` (String) redundancy mode for this chassis
219229
- Choices: `none`, `rpr`, `rpr-plus`, `sso`

examples/resources/iosxe_system/resource.tf

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,23 @@ resource "iosxe_system" "example" {
3030
source_interface_gigabit_ethernet = "1/0/1"
3131
}
3232
]
33-
diagnostic_bootup_level = "minimal"
34-
memory_free_low_watermark_processor = 203038
35-
ip_ssh_time_out = 120
36-
ip_ssh_authentication_retries = 3
37-
ip_ssh_bulk_mode = true
38-
ip_ssh_bulk_mode_window_size = 262144
39-
call_home_contact_email = "email@test.com"
40-
call_home_cisco_tac_1_profile_active = true
41-
call_home_cisco_tac_1_destination_transport_method = "email"
42-
ip_nbar_classification_dns_classify_by_domain = true
43-
ip_multicast_route_limit = 200000
44-
ip_domain_list_vrf_domain = "example.com"
45-
ip_domain_list_vrf = "VRF1"
46-
ip_routing_protocol_purge_interface = true
33+
diagnostic_bootup_level = "minimal"
34+
memory_free_low_watermark_processor = 203038
35+
ip_ssh_time_out = 120
36+
ip_ssh_authentication_retries = 3
37+
ip_ssh_bulk_mode = true
38+
ip_ssh_bulk_mode_window_size = 262144
39+
call_home_contact_email = "email@test.com"
40+
call_home_cisco_tac_1_profile_active = true
41+
call_home_cisco_tac_1_destination_transport_method = "email"
42+
ip_nbar_classification_dns_classify_by_domain = true
43+
ip_multicast_route_limit = 200000
44+
ip_domain_list_vrf_domain = "example.com"
45+
ip_domain_list_vrf = "VRF1"
46+
ip_routing_protocol_purge_interface = true
47+
ip_cef_load_sharing_algorithm_include_ports_source = true
48+
ip_cef_load_sharing_algorithm_include_ports_destination = true
49+
ipv6_cef_load_sharing_algorithm_include_ports_source = true
50+
ipv6_cef_load_sharing_algorithm_include_ports_destination = true
51+
port_channel_load_balance = "src-dst-mixed-ip-port"
4752
}

gen/definitions/system.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,25 @@ attributes:
651651
- yang_name: ip/routing-new/routing/protocol/purge/interface
652652
tf_name: ip_routing_protocol_purge_interface
653653
example: true
654+
- yang_name: ip/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/Cisco-IOS-XE-cef:algorithm-v2/alg-type/include-ports/Cisco-IOS-XE-cef:include-ports-v2/source
655+
xpath: ip/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/algorithm-v2/include-ports-v2/source
656+
tf_name: ip_cef_load_sharing_algorithm_include_ports_source
657+
example: true
658+
- yang_name: ip/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/Cisco-IOS-XE-cef:algorithm-v2/alg-type/include-ports/Cisco-IOS-XE-cef:include-ports-v2/destination
659+
xpath: ip/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/algorithm-v2/include-ports-v2/destination
660+
tf_name: ip_cef_load_sharing_algorithm_include_ports_destination
661+
example: true
662+
- yang_name: ipv6/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/Cisco-IOS-XE-cef:algorithm-v2/alg-type/include-ports/Cisco-IOS-XE-cef:include-ports-v2/source
663+
xpath: ipv6/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/algorithm-v2/include-ports-v2/source
664+
tf_name: ipv6_cef_load_sharing_algorithm_include_ports_source
665+
example: true
666+
- yang_name: ipv6/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/Cisco-IOS-XE-cef:algorithm-v2/alg-type/include-ports/Cisco-IOS-XE-cef:include-ports-v2/destination
667+
xpath: ipv6/cef-v2/Cisco-IOS-XE-cef:load-sharing-v2/algorithm-v2/include-ports-v2/destination
668+
tf_name: ipv6_cef_load_sharing_algorithm_include_ports_destination
669+
example: true
670+
- yang_name: port-channel/Cisco-IOS-XE-ethernet:load-balance/load-balance
671+
tf_name: port_channel_load_balance
672+
example: src-dst-mixed-ip-port
654673

655674
test_prerequisites:
656675
- path: Cisco-IOS-XE-native:native/vrf/definition=VRF1

gen/load_models.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ var models = []string{
4444
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-logging.yang",
4545
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-ip.yang",
4646
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-ipv6.yang",
47+
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-cef.yang",
4748
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-interfaces.yang",
4849
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-isis.yang",
4950
"https://raw.githubusercontent.com/YangModels/yang/main/vendor/cisco/xe/17151/Cisco-IOS-XE-snmp.yang",

internal/provider/data_source_iosxe_system.go

Lines changed: 20 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_iosxe_system_test.go

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