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

[SNMP:Contact] Fix for config replace failure with SNMP Contact issue #1774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Verma-Anukul
Copy link

@Verma-Anukul Verma-Anukul commented Aug 6, 2024

==> Issue:
• Config replace/yang-validation fails for SNMP contact configuration.
• In SNMP contact CLI, email field is mandatory
Related to sonic-net/sonic-buildimage#12620

==> Root Cause:
• sonic-snmp.yang defines leaf Contact, but sonic-utilities (CLI backend) writes to ConfigDB with key {contact_name}. So YANG validation fails when the key is {contact_name} and not the string "Contact"
• CLI current implementation is expecting two mandatory arguments

==> Fix:
• sonic-utilities (CLI backend) code is updated to use Yang leaf name "Contact" string as key and user passed input as "value"
• CLI implementation (sonic-utilities) is changed to expect only a single string, where user can pass any string of choice (name, email, phone, address or combination of these). Accordingly, "show" CLIs will display only "contact" instead of "name" & "email"

  • Migration script is updated to take care of config_db migration

Tests:

  • Test CLIs manually
  • Test config replace
  • Test config migration

PRs :
sonic-buildimage - sonic-net/sonic-buildimage#19834
sonic-utilities - sonic-net/sonic-utilities#3476
SONiC (docs) - #1774

Signed-off-by: Anukul Verma anukverm@cisco.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant