use of org.opennms.netmgt.snmp.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