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

Disable snmpv2 #128

Closed
wants to merge 9 commits into from
Closed

Disable snmpv2 #128

wants to merge 9 commits into from

Conversation

hdep
Copy link
Contributor

@hdep hdep commented Aug 9, 2018

Hello,

Here is a small PR which create a new variable snmpv2_enable, by default this variable is at true, so there is no change from current behaviour.

If set to false, this remove com2sec, group, and access config in snmpd.conf and there is no error in the log when restarting the daemon.

@hdep
Copy link
Contributor Author

hdep commented Aug 10, 2018

Hi,
travis is failing on snmp::client test, but I didn't touch client.pp file.
Any idea on what can explain this ?

Regards

@hdep
Copy link
Contributor Author

hdep commented Aug 24, 2018

Hello @razorsedge can you help me to fix the travis error ?

@@ -353,6 +358,7 @@
$agentx_socket = $snmp::params::agentx_socket,
$agentx_timeout = $snmp::params::agentx_timeout,
$agentx_retries = $snmp::params::agentx_retries,
$snmpv2_enable = $snmp::params::snmpv2_enable,
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add a datatype to this?

@@ -362,6 +368,7 @@
validate_bool($service_hasstatus)
validate_bool($service_hasrestart)
validate_bool($openmanage_enable)
validate_bool($snmpv2_enable)
Copy link
Member

Choose a reason for hiding this comment

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

please do not add the legacy validate_* methods. Datatypes are the new way to go \o/

@@ -404,6 +404,13 @@
$safe_trap_service_hasrestart = $trap_service_hasrestart
}

$snmp_snmpv2_enable = getvar('::snmpv2_enable')
Copy link
Member

Choose a reason for hiding this comment

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

why do you use getvar() here? And should it default to false? Since SNMPv2 isn't considered to be secure and the next release will be a major one, so we can introduce breaking changes.

@bastelfreak
Copy link
Member

Hi @hdep, this module was recently migrated to Vox Pupuli. Please rebase against our latest master branch. Can you please take a look at the inline comments I made and add a test for your change?

@hdep
Copy link
Contributor Author

hdep commented Sep 15, 2018

Do you want a new PR with the changes ?
Since you closed this one...

@bastelfreak
Copy link
Member

sorry, I closed it by accident! But let's continue in the new PR.

@hdep
Copy link
Contributor Author

hdep commented Sep 15, 2018

no problem !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants