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 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
#
23 changes: 23 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,23 @@
# 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
state: merged

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# startup-delay 300
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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 sonic_evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
startup-delay: 200
state: overridden

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# startup-delay 200
#
29 changes: 29 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,29 @@
# Using replaced
#
# Before state:
#----------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
# neigh-holdtime 1080
# startup-delay 300
#

- name: Replace specific option from sonic_evpn_esi_multihome configuration
sonic_evpn_esi_multihome:
config:
startup-delay: 200
state: replaced

# After State:
#--------------
#
# show running-configuration evpn-mh
#
# evpn esi-multihoming
# mac-holdtime 1080
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# mac-holdtime 1080

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

# neigh-holdtime 1080
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# neigh-holdtime 1080

Replaced state should replace the entire existing config dictionary with the new config dictionary specified in the playbook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

# startup-delay 200
#
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
GENERATOR_VERSION: '1.0'
ANSIBLE_METADATA: |
{
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
NETWORK_OS: sonic
RESOURCE: snmp
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RESOURCE: snmp
RESOURCE: evpn_esi_multihome

COPYRIGHT: Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
DOCUMENTATION: |
module: sonic_evpn_esi_multihome
version_added: 4.5
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
version_added: 4.5
version_added: 3.1.0

short_description: Manage SNMP configuration on SONiC
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
short_description: Manage SNMP configuration on SONiC
short_description: Manage EVPN ESI multihoming configuration on SONiC

description:
- This module provides configuration management of SNMP for devices running SONiC
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- This module provides configuration management of SNMP for devices running SONiC
- This module provides configuration management of EVPN ESI multihoming for devices running SONiC

author: Aida Shumburo (@aida-shumburo)
options:
config:
description:
- evpn esi multihome configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- evpn esi multihome configuration
- EVPN ESI multihoming configuration

type: dict
suboptions:
mac-holdtime:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mac-holdtime:
mac_holdtime:

attribute names should use underscores and not hyphens

description:
- mac holdtime
Copy link
Contributor

@stalabi1 stalabi1 Apr 22, 2025

Choose a reason for hiding this comment

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

Suggested change
- mac holdtime
- MAC hold time in seconds, range 0-86400

type: int
neigh-holdtime:
description:
- neigh holdtime
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- neigh holdtime
- Neighbor hold time in seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

type: int
startup-delay:
description:
- startup delay
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- startup delay
- Startup delay in seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

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
- merged_example_01.txt
- replaced_example_01.txt
- overridden_example_01.txt