-
Notifications
You must be signed in to change notification settings - Fork 1.7k
snmp_facts: improvements #11148
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_facts: improvements #11148
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
b0e5610 to
1e79961
Compare
1e79961 to
269f021
Compare
269f021 to
073ab41
Compare
073ab41 to
537392f
Compare
| required_if=[ | ||
| ("version", "v2", ["community"]), | ||
| ("version", "v2c", ["community"]), | ||
| ("version", "v3", ["username", "authkey", "level"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding level because if it is not passed:
- in line 305 the validation of param
privacywhenlevel=authPrivis not enforced, but ... - ... in line 327, because it is a plain
else, it creates a silent, undocumented defaultlevel=authPrivwhenlevelis not passed
This could lead to a blatantly wrong situation. I suppose this still configures a breaking change, but in this case it's one that should be performed, IMO.
|
I think this is OK for 12.x.y, but I wouldn't backport it to older versions. |
Backport to stable-12: 💚 backport PR created✅ Backport PR branch: Backported as #11196 🤖 @patchback |
|
@russoz thanks for your contribution! |
* snmp_facts: improvements * require level if vesion=v3 (cherry picked from commit 7321ba4)
…1196) snmp_facts: improvements (#11148) * snmp_facts: improvements * require level if vesion=v3 (cherry picked from commit 7321ba4) Co-authored-by: Alexei Znamensky <[email protected]>
SUMMARY
Parameter validation using Ansible constructs, plus a couple of Python idioms adjustments.
ISSUE TYPE
COMPONENT NAME
snmp_facts