Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add path-groups keepalive interval for rout…
Browse files Browse the repository at this point in the history
…er path-selection (#3501)
  • Loading branch information
amitsagar-arsita authored Jan 23, 2024
1 parent f5bac7d commit 2407b94
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ interface Management1
| Setting | Value |
| ------ | ----- |
| Path Group ID | 666 |
| Keepalive interval(failure threshold) | 200(3) |

###### Dynamic Peers Settings

Expand All @@ -71,6 +72,7 @@ interface Management1
| ------ | ----- |
| Path Group ID | 42 |
| IPSec profile | IPSEC-P-1 |
| Keepalive interval | auto |
| Flow assignment | LAN |

###### Local Interfaces
Expand Down Expand Up @@ -156,6 +158,7 @@ router path-selection
peer dynamic source stun
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
!
peer dynamic
ip local
Expand All @@ -173,6 +176,7 @@ router path-selection
!
path-group PG-2 id 42
ipsec profile IPSEC-P-1
keepalive interval auto
flow assignment lan
!
local interface Ethernet1/1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ router path-selection
peer dynamic source stun
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
!
peer dynamic
ip local
Expand All @@ -25,6 +26,7 @@ router path-selection
!
path-group PG-2 id 42
ipsec profile IPSEC-P-1
keepalive interval auto
flow assignment lan
!
local interface Ethernet1/1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ router_path_selection:
dynamic_peers:
enabled: true
ipsec: false
keepalive:
auto: true
- name: PG-1
id: 666
dynamic_peers:
enabled: true
ip_local: true
ipsec: true
keepalive:
interval: 200
failure_threshold: 3
static_peers:
# Out of order to test sorting
- router_ip: 172.16.42.42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name</samp>](## "router_path_selection.path_groups.[].static_peers.[].name") | String | | | | Name of the site. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipv4_addresses</samp>](## "router_path_selection.path_groups.[].static_peers.[].ipv4_addresses") | List, items: String | | | | Static IPv4 addresses. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "router_path_selection.path_groups.[].static_peers.[].ipv4_addresses.[]") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keepalive</samp>](## "router_path_selection.path_groups.[].keepalive") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto</samp>](## "router_path_selection.path_groups.[].keepalive.auto") | Boolean | | `False` | | Enable adaptive keepalive and feedback interval. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interval</samp>](## "router_path_selection.path_groups.[].keepalive.interval") | Integer | | | Min: 50<br>Max: 60000 | Interval in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;failure_threshold</samp>](## "router_path_selection.path_groups.[].keepalive.failure_threshold") | Integer | | | Min: 2<br>Max: 100 | Failure threshold in number of intervals. Required when `interval` is set. |
| [<samp>&nbsp;&nbsp;load_balance_policies</samp>](## "router_path_selection.load_balance_policies") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_path_selection.load_balance_policies.[].name") | String | Required, Unique | | | Load-balance policy name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowest_hop_count</samp>](## "router_path_selection.load_balance_policies.[].lowest_hop_count") | Boolean | | | | Prefer paths with lowest hop-count. |
Expand Down Expand Up @@ -122,6 +126,16 @@
# Static IPv4 addresses.
ipv4_addresses:
- <str>
keepalive:

# Enable adaptive keepalive and feedback interval.
auto: <bool; default=False>

# Interval in milliseconds.
interval: <int; 50-60000>

# Failure threshold in number of intervals. Required when `interval` is set.
failure_threshold: <int; 2-100>
load_balance_policies:

# Load-balance policy name.
Expand Down

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ keys:
description: Static IPv4 addresses.
items:
type: str
keepalive:
type: dict
keys:
auto:
type: bool
description: |-
Enable adaptive keepalive and feedback interval.
default: false
interval:
type: int
description: Interval in milliseconds.
min: 50
max: 60000
convert_types:
- str
failure_threshold:
type: int
min: 2
max: 100
description: Failure threshold in number of intervals. Required when `interval` is set.
convert_types:
- str
load_balance_policies:
type: list
primary_key: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
{% if path_group.ipsec_profile is arista.avd.defined %}
| IPSec profile | {{ path_group.ipsec_profile }} |
{% endif %}
{% if path_group.keepalive.auto is arista.avd.defined(true) %}
| Keepalive interval | auto |
{% elif path_group.keepalive.interval is arista.avd.defined and
path_group.keepalive.failure_threshold is arista.avd.defined %}
| Keepalive interval(failure threshold) | {{ path_group.keepalive.interval }}({{ path_group.keepalive.failure_threshold }}) |
{% endif %}
{% if path_group.flow_assignment is arista.avd.defined %}
| Flow assignment | {{ path_group.flow_assignment | upper }} |
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ router path-selection
{% if path_group.ipsec_profile is arista.avd.defined %}
ipsec profile {{ path_group.ipsec_profile }}
{% endif %}
{% if path_group.keepalive.auto is arista.avd.defined(true) %}
keepalive interval auto
{% elif path_group.keepalive.interval is arista.avd.defined and
path_group.keepalive.failure_threshold is arista.avd.defined %}
keepalive interval {{ path_group.keepalive.interval }} milliseconds failure-threshold {{ path_group.keepalive.failure_threshold }} intervals
{% endif %}
{% if path_group.flow_assignment is arista.avd.defined %}
flow assignment {{ path_group.flow_assignment }}
{% endif %}
Expand Down

0 comments on commit 2407b94

Please sign in to comment.