Added SNMP_USER_PERMISSIONS parameter and removed SNMP_USER_STRING parameter#718
Merged
qiluo-msft merged 3 commits intosonic-net:masterfrom Dec 3, 2020
Merged
Conversation
doc/snmp/snmp-schema-addition.md
Outdated
| "SNMP_USER_AUTH_PASSWORD":"<AUTH_PASSWORD_STRING>", | ||
| "SNMP_USER_ENCRYPTION_PASSWORD":"<ENCRYPTION_PASSWORD_STRING>" | ||
| "SNMP_USER_ENCRYPTION_PASSWORD":"<ENCRYPTION_PASSWORD_STRING>", | ||
| "SNMP_USER_PERMISSIONS": "RO|RW" |
Contributor
There was a problem hiding this comment.
Might be better to use singular "SNMP_USER_PERMISSION" as it can only one value, right?
qiluo-msft
approved these changes
Dec 3, 2020
3 tasks
lguohan
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Jan 5, 2021
**- Why I did it** I'm updating the jinja2 template to support getting SNMP information from the redis configdb. I'm using the format approved here: sonic-net/SONiC#718 This will pave the way for us to decrement using the snmp.yml in the future. Right now we will still be using both the snmp.yml and configdb to get variable information in order to create the snmpd.conf via the sonic-cfggen tool. **- How I did it** I first updated the SNMP Schema in PR #718 to get that approved as a standardized format. Then I verified I could add snmp configs to the configdb using this standard schema. Once the configs were added to the configdb then I updated the snmpd.conf.j2 file to support the updates via the configdb while still using the variables in the snmp.yml file in parallel. This way we will have backward compatibility until we can fully migrate to the configdb only. By updating the snmpd.conf.j2 template and running the sonic-cfggen tool the snmpd.conf gets generated with using the values in both the configdb and snmp.yml file. Co-authored-by: trvanduy <trvanduy@microsoft.com>
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Dec 13, 2021
**- Why I did it** I'm updating the jinja2 template to support getting SNMP information from the redis configdb. I'm using the format approved here: sonic-net/SONiC#718 This will pave the way for us to decrement using the snmp.yml in the future. Right now we will still be using both the snmp.yml and configdb to get variable information in order to create the snmpd.conf via the sonic-cfggen tool. **- How I did it** I first updated the SNMP Schema in PR #718 to get that approved as a standardized format. Then I verified I could add snmp configs to the configdb using this standard schema. Once the configs were added to the configdb then I updated the snmpd.conf.j2 file to support the updates via the configdb while still using the variables in the snmp.yml file in parallel. This way we will have backward compatibility until we can fully migrate to the configdb only. By updating the snmpd.conf.j2 template and running the sonic-cfggen tool the snmpd.conf gets generated with using the values in both the configdb and snmp.yml file. Co-authored-by: trvanduy <trvanduy@microsoft.com>
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.
Added one new parameters:
"SNMP_USER_PERMISSIONS": "RO|RW" to SNMP_USERS.
This will be needed to support RW SNMPv3 in the future.
Removed "SNMP_USER_STRING". This is not necessary because we have this
SNMP_USER|user1 which shows the user string as "user1" as a key.