[YANG][SNMP]: Add YANG model for SNMP_AGENT_ADDRESS_CONFIG table#15587
Merged
qiluo-msft merged 4 commits intosonic-net:masterfrom Jul 27, 2023
Merged
[YANG][SNMP]: Add YANG model for SNMP_AGENT_ADDRESS_CONFIG table#15587qiluo-msft merged 4 commits intosonic-net:masterfrom
qiluo-msft merged 4 commits intosonic-net:masterfrom
Conversation
|
|
Signed-off-by: Suvarna Meenakshi <[email protected]>
Signed-off-by: Suvarna Meenakshi <[email protected]> (cherry picked from commit 14dd2cb17751fcd2ee6f57e4c10d69a721206ca7)
e31e612 to
3a429b8
Compare
qiluo-msft
reviewed
Jun 23, 2023
| leaf vrf_name { | ||
| type union { | ||
| type string { | ||
| pattern ''; |
Collaborator
Contributor
Author
There was a problem hiding this comment.
The reason for empty string is because config CLI adds key in CONFIG_TABLE with empty string for vrf if it is not specified in the CLI argument.
https://github.com/sonic-net/sonic-utilities/blob/49fc3896a0ef907ff337467a3e04d2501ef850fd/config/main.py#L3084
Contributor
There was a problem hiding this comment.
GNMI path can support it, need GCU to confirm.
Signed-off-by: Suvarna Meenakshi <[email protected]>
Signed-off-by: Suvarna Meenakshi <[email protected]>
10 tasks
Contributor
Author
|
/azp run |
|
Commenter does not have sufficient privileges for PR 15587 in repo sonic-net/sonic-buildimage |
qiluo-msft
approved these changes
Jul 27, 2023
isabelmsft
approved these changes
Jul 27, 2023
sonic-otn
pushed a commit
to sonic-otn/sonic-buildimage
that referenced
this pull request
Sep 20, 2023
…ic-net#15587) #### Why I did it sonic-net/sonic-utilities#472 Added SNMP_AGENT_ADDRESS_CONFIG table in config db. This PR is to add corresponding YANG model for that table. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it Added YANG modesl for SNMP_AGENT_ADDRESS_CONFIG. keys: agent_ip, port number, vrf. CLI implementaion checks if agent_ip, port number already exists in CONFIG_DB table, if it does, then new entry is not added. So added another condition to ensure combination of agent_ip and port is unique. Below is an example of how data looks like in DB: ``` 127.0.0.1:6379[4]> HGETALL "SNMP_AGENT_ADDRESS_CONFIG|10.1.1.1|161|foo" 1) "NULL" 2) "NULL" 127.0.0.1:6379[4]> HGETALL "SNMP_AGENT_ADDRESS_CONFIG|10.1.0.32|161|" 1) "NULL" 2) "NULL" ``` #### How to verify it Added unit-test for various combinations and ensures that it passes.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
sonic-net/sonic-utilities#472 Added SNMP_AGENT_ADDRESS_CONFIG table in config db.
This PR is to add corresponding YANG model for that table.
Work item tracking
How I did it
Added YANG modesl for SNMP_AGENT_ADDRESS_CONFIG.
keys: agent_ip, port number, vrf.
CLI implementaion checks if agent_ip, port number already exists in CONFIG_DB table, if it does, then new entry is not added.
So added another condition to ensure combination of agent_ip and port is unique.
Below is an example of how data looks like in DB:
How to verify it
Added unit-test for various combinations and ensures that it passes.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)