Skip to content

evpn esi multihome model #301

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
28 changes: 28 additions & 0 deletions models/enterprise_sonic/evpn_esi_multihome/deleted_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Using deleted
#
# Before state:
#---------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
# neigh-holdtime 1080
# startup-delay 300
#

- name: Delete soecific option from evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
mac-holdtime: 1080
state: deleted

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# neigh-holdtime 1080
# startup-delay 300
#
25 changes: 25 additions & 0 deletions models/enterprise_sonic/evpn_esi_multihome/deleted_example_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Using deleted
#
# Before state:
#---------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
# neigh-holdtime 1080
# startup-delay 300
# df-election-time 3

- name: Delete soecific option from evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config: {}
state: deleted

# After State:
#--------------
#
# show running-configuration evpn-mh
#
#
#
24 changes: 24 additions & 0 deletions models/enterprise_sonic/evpn_esi_multihome/merged_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Using Merged
#
# Before state:
#---------------
#
# show running-configuration evpn-mh
#
#

- name: Merge specific option from evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
startup-delay: 300
es-activation-delay: 3000
state: merged

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# startup-delay 300
# es-activation-delay 3000
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Using overridden
#
# Before state:
#----------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
# neigh-holdtime 1080
# startup-delay 300
#

- name: Override specific option from evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
startup-delay: 200
mac_holdtime: 500
state: overridden

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# startup-delay 200
# mac_holdtime: 500
28 changes: 28 additions & 0 deletions models/enterprise_sonic/evpn_esi_multihome/replaced_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Using replaced
#
# Before state:
#----------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
# neigh-holdtime 1080
# startup-delay 300
# df-election-time: 3

- name: Replace specific option from evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
neigh-holdtime: 200
df-election_time: 600
state: replaced

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# neigh-holdtime 200
# df-election-time: 600
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add df_election_time and es_activation_delay as they are supported in CLI. Also, please add ranges for all attributes of type int.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
GENERATOR_VERSION: '1.0'
ANSIBLE_METADATA: |
{
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
NETWORK_OS: sonic
RESOURCE: evpn_esi_multihome
COPYRIGHT: Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
DOCUMENTATION: |
module: sonic_evpn_esi_multihome
version_added: 3.1.0
short_description: Manage EVPN ESI multihoming configuration on SONiC
description:
- This module provides configuration management of EVPN ESI multihoming for devices running SONiC
author: Aida Shumburo (@aida-shumburo)
options:
config:
description:
- EVPN ESI multihoming configuration
type: dict
suboptions:
df_election_time:
description:
- Election timer value in seconds
- Has a range between 0 and 86400
- Default is 3
type: int
es_activation_delay:
description:
- Activation delay in seconds
- Has a range between 0 and 1200000
- Default is 0
type: int
mac_holdtime:
description:
- MAC hold time in seconds
- Has a range between 0 and 86400
- Default is 1080
- Specify 0 to disable MAC hold time
type: int
neigh_holdtime:
description:
- Neighbor hold time in seconds
- Has a range between 0 and 86400
- Default is 1080
- Specify 0 to disable neighbor hold time
type: int
startup_delay:
description:
- Startup delay in seconds
- Has a range between 0 and 3600
- Default is 300
- Specify 0 to disable startup delay
type: int
state:
description:
- The state of the configuration after module completion
type: str
choices: ['merged', 'deleted', 'replaced', 'overridden']
default: merged
EXAMPLES:
- deleted_example_01.txt
- deleted_example_02.txt
- merged_example_01.txt
- replaced_example_01.txt
- overridden_example_01.txt