Skip to content

Added SNMP_USER_PERMISSIONS parameter and removed SNMP_USER_STRING parameter#718

Merged
qiluo-msft merged 3 commits intosonic-net:masterfrom
tsvanduyn:tsvanduy/schema_update
Dec 3, 2020
Merged

Added SNMP_USER_PERMISSIONS parameter and removed SNMP_USER_STRING parameter#718
qiluo-msft merged 3 commits intosonic-net:masterfrom
tsvanduyn:tsvanduy/schema_update

Conversation

@tsvanduyn
Copy link
Copy Markdown
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.

"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
Copy Markdown
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
Copy Markdown
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
@tsvanduyn tsvanduyn requested a review from qiluo-msft December 3, 2020 21:53
Copy link
Copy Markdown
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