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

Added SNMP_USER_PERMISSIONS parameter and removed SNMP_USER_STRING parameter #718

Merged
merged 3 commits into from
Dec 3, 2020

Conversation

tsvanduyn
Copy link
Contributor

@tsvanduyn tsvanduyn commented Dec 3, 2020

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.

@@ -66,23 +66,26 @@ In the end this is used to produce */etc/snmp/snmpd.conf*.
"SNMP_USER_AUTH_TYPE":"MD5|SHA|HMAC-SHA-2",
"SNMP_USER_ENCRYPTION_TYPE":"DES|AES",
"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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better to use singular "SNMP_USER_PERMISSION" as it can only one value, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Fixed.

@tsvanduyn tsvanduyn changed the title Added SNMP_USER_PERMISSIONS parameter Added SNMP_USER_PERMISSIONS parameter and removed SNMP_USER_STRING parameter Dec 3, 2020
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

LGTM

@qiluo-msft qiluo-msft merged commit d5b29be into sonic-net:master Dec 3, 2020
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>
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.

3 participants