Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): VRRP timer delay and IPv4 version options #1706

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ interface Management1

#### VRRP Details

| Interface | VRRP-ID | Priority | Advertisement Interval | Preempt | Tracked Object Name(s) | Tracked Object Action(s) | IPv4 Virtual IP | IPv6 Virtual IP |
| --------- | ------- | -------- | ---------------------- | --------| ---------------------- | ------------------------ | --------------- | ----------------|
| Vlan333 | 1 | 105 | 2 | Enabled | ID1-TrackedObjectDecrement, ID1-TrackedObjectShutdown | Decrement 5, Shutdown | 192.0.2.1 | - |
| Vlan333 | 2 | - | - | Enabled | ID2-TrackedObjectDecrement, ID2-TrackedObjectShutdown | Decrement 10, Shutdown | - | 2001:db8::1 |
| Vlan667 | 1 | 105 | 2 | Enabled | - | - | 192.0.2.1 | - |
| Vlan667 | 2 | - | - | Enabled | - | - | - | 2001:db8::1 |
| Interface | VRRP-ID | Priority | Advertisement Interval | Preempt | Tracked Object Name(s) | Tracked Object Action(s) | IPv4 Virtual IP | IPv4 VRRP Version | IPv6 Virtual IP |
| --------- | ------- | -------- | ---------------------- | --------| ---------------------- | ------------------------ | --------------- | ----------------- | --------------- |
| Vlan333 | 1 | 105 | 2 | Enabled | ID1-TrackedObjectDecrement, ID1-TrackedObjectShutdown | Decrement 5, Shutdown | 192.0.2.1 | 2 | - |
| Vlan333 | 2 | - | - | Enabled | ID2-TrackedObjectDecrement, ID2-TrackedObjectShutdown | Decrement 10, Shutdown | - | 2 | 2001:db8::1 |
| Vlan333 | 3 | - | - | Enabled | - | - | 100.64.0.1 | 3 | - |
| Vlan667 | 1 | 105 | 2 | Enabled | - | - | 192.0.2.1 | 2 | - |
| Vlan667 | 2 | - | - | Enabled | - | - | - | 2 | 2001:db8::1 |

### VLAN Interfaces Device Configuration

Expand Down Expand Up @@ -278,6 +279,9 @@ interface Vlan333
vrrp 2 ipv6 2001:db8::1
vrrp 2 tracked-object ID2-TrackedObjectDecrement decrement 10
vrrp 2 tracked-object ID2-TrackedObjectShutdown shutdown
vrrp 3 timers delay reload 900
vrrp 3 ipv4 100.64.0.1
vrrp 3 ipv4 version 3
!
interface Vlan501
description SVI Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ interface Vlan333
vrrp 2 ipv6 2001:db8::1
vrrp 2 tracked-object ID2-TrackedObjectDecrement decrement 10
vrrp 2 tracked-object ID2-TrackedObjectShutdown shutdown
vrrp 3 timers delay reload 900
vrrp 3 ipv4 100.64.0.1
vrrp 3 ipv4 version 3
!
interface Vlan501
description SVI Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,10 @@ vlan_interfaces:
decrement: 10
- name: ID2-TrackedObjectShutdown
shutdown: true
- id: 3
timers:
delay:
reload: 900
ipv4:
address: 100.64.0.1
version: 3
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,9 @@ vlan_interfaces:
delay:
minimum: < integer >
reload: < integer >
timers:
delay:
reload: < integer >
tracked_object:
- name: < tracked_object_name_1 >
decrement: < decrement vrrp priority by 1-254 >
Expand All @@ -1481,6 +1484,7 @@ vlan_interfaces:
shutdown: < true | false >
ipv4:
address: < virtual_ip_address >
version: < 2 | 3 >
ipv6:
address: < virtual_ip_address >
# The below "vrrp" keys will be deprecated in AVD v4.0 - These should not be mixed with the new "vrrp_ids" key above to avoid conflicts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@

#### VRRP Details

| Interface | VRRP-ID | Priority | Advertisement Interval | Preempt | Tracked Object Name(s) | Tracked Object Action(s) | IPv4 Virtual IP | IPv6 Virtual IP |
| --------- | ------- | -------- | ---------------------- | --------| ---------------------- | ------------------------ | --------------- | ----------------|
| Interface | VRRP-ID | Priority | Advertisement Interval | Preempt | Tracked Object Name(s) | Tracked Object Action(s) | IPv4 Virtual IP | IPv4 VRRP Version | IPv6 Virtual IP |
| --------- | ------- | -------- | ---------------------- | --------| ---------------------- | ------------------------ | --------------- | ----------------- | --------------- |
{% for vlan_interface in vlan_interfaces_vrrp_details | arista.avd.natural_sort %}
{% for vrid in vlan_interfaces[vlan_interface].vrrp_ids if vrid.id is arista.avd.defined %}
{% set row_id = vrid.id %}
Expand All @@ -108,8 +108,9 @@
{% set row_tracked_object_action = row_tracked_object_action | join(", ") %}
{% endif %}
{% set row_ipv4_virt = vrid.ipv4.address | arista.avd.default('-') %}
{% set row_ipv4_vers = vrid.ipv4.version | arista.avd.default('2') %}
{% set row_ipv6_virt = vrid.ipv6.address | arista.avd.default('-') %}
| {{ vlan_interface }} | {{ row_id }} | {{ row_prio_level }} | {{ row_ad_interval }} | {{ row_preempt }} | {{ row_tracked_object_name | arista.avd.default('-') }} | {{ row_tracked_object_action | arista.avd.default('-') }} | {{ row_ipv4_virt }} | {{ row_ipv6_virt }} |
| {{ vlan_interface }} | {{ row_id }} | {{ row_prio_level }} | {{ row_ad_interval }} | {{ row_preempt }} | {{ row_tracked_object_name | arista.avd.default('-') }} | {{ row_tracked_object_action | arista.avd.default('-') }} | {{ row_ipv4_virt }} | {{ row_ipv4_vers }} | {{ row_ipv6_virt }} |
{% endfor %}
{% endfor %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,15 @@ interface {{ vlan_interface }}
{% endif %}
{{ delay_cli }}
{% endif %}
{% if vrid.timers.delay.reload is arista.avd.defined %}
vrrp {{ vrid.id }} timers delay reload {{ vrid.timers.delay.reload }}
{% endif %}
{% if vrid.ipv4.address is arista.avd.defined %}
vrrp {{ vrid.id }} ipv4 {{ vrid.ipv4.address }}
{% endif %}
{% if vrid.ipv4.version is arista.avd.defined %}
vrrp {{ vrid.id }} ipv4 version {{ vrid.ipv4.version }}
{% endif %}
{% if vrid.ipv6.address is arista.avd.defined %}
vrrp {{ vrid.id }} ipv6 {{ vrid.ipv6.address }}
{% endif %}
Expand Down