use of org.opennms.netmgt.config.trapd.Snmpv3User in project opennms by OpenNMS.
the class TrapListenerTest method createUser.
private static Snmpv3User createUser(String authProtocol, String autoPassPhrase, String engineId, String privatcyProtocol, String privacyPassPhrase, String securityName) {
Snmpv3User user = new Snmpv3User();
user.setAuthProtocol(authProtocol);
user.setAuthPassphrase(autoPassPhrase);
user.setEngineId(engineId);
user.setPrivacyPassphrase(privacyPassPhrase);
user.setPrivacyProtocol(privatcyProtocol);
user.setSecurityName(securityName);
return user;
}
use of org.opennms.netmgt.config.trapd.Snmpv3User in project opennms by OpenNMS.
the class TrapdConfigFactory method update.
@Override
public void update(TrapdConfig config) {
m_config.setSnmpTrapAddress(config.getSnmpTrapAddress());
m_config.setSnmpTrapPort(config.getSnmpTrapPort());
m_config.setNewSuspectOnTrap(config.getNewSuspectOnTrap());
m_config.setQueueSize(config.getQueueSize());
m_config.setBatchSize(config.getBatchSize());
m_config.setBatchInterval(config.getBatchIntervalMs());
m_config.setThreads(config.getNumThreads());
m_config.setIncludeRawMessage(config.isIncludeRawMessage());
final List<Snmpv3User> snmpv3Users = config.getSnmpV3Users().stream().map(u -> {
Snmpv3User newUser = new Snmpv3User();
newUser.setEngineId(u.getEngineId());
newUser.setSecurityName(u.getSecurityName());
newUser.setAuthProtocol(u.getAuthProtocol());
newUser.setAuthPassphrase(u.getAuthPassPhrase());
newUser.setPrivacyProtocol(u.getPrivProtocol());
newUser.setPrivacyPassphrase(u.getPrivPassPhrase());
return newUser;
}).collect(Collectors.toList());
m_config.setSnmpv3User(snmpv3Users);
}
Aggregations