public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public String getWriteCommunity() { return m_config.getWriteCommunity(); }
public Map<String, String> toMap() { Map<String, String> map = new LinkedHashMap<>(); map.put("address", m_address == null ? null : InetAddrUtils.str(m_address)); map.put("proxyFor", m_proxyFor == null ? null : InetAddrUtils.str(m_proxyFor)); map.put("port", Integer.toString(getPort())); map.put("timeout", Integer.toString(getTimeout())); map.put("retries", Integer.toString(getRetries())); map.put("max-vars-per-pdu", Integer.toString(getMaxVarsPerPdu())); map.put("max-repetitions", Integer.toString(getMaxRepetitions())); map.put("max-request-size", Integer.toString(getMaxRequestSize())); map.put("version", Integer.toString(getVersion())); map.put("security-level", Integer.toString(getSecurityLevel())); map.put("security-name", getSecurityName()); map.put("auth-passphrase", getAuthPassPhrase()); map.put("auth-protocol", getAuthProtocol()); map.put("priv-passphrase", getPrivPassPhrase()); map.put("priv-protocol", getPrivProtocol()); map.put("context-name", getContextName()); map.put("engine-id", getEngineId()); map.put("context-engine-id", getContextEngineId()); map.put("enterprise-id", getEnterpriseId()); map.put("read-community", getReadCommunity()); map.put("write-community", getWriteCommunity()); return map; }
} else { System.out.println("ReadCommunity: " + agent.getReadCommunity()); System.out.println("WriteCommunity: " + agent.getWriteCommunity());
&& Objects.equals(getEnterpriseId(), other.getEnterpriseId()) && Objects.equals(getReadCommunity(), other.getReadCommunity()) && Objects.equals(getWriteCommunity(), other.getWriteCommunity());
@Override public int hashCode() { int hash = Objects.hash(getAddress(), getProxyFor(), getPort(), getTimeout(), getRetries(), getMaxVarsPerPdu(), getMaxRepetitions(), getMaxRequestSize(), getVersion(), getSecurityLevel(), getSecurityName(), getAuthPassPhrase(), getAuthProtocol(), getPrivPassPhrase(), getPrivProtocol(), getContextName(), getEngineId(), getContextEngineId(), getEnterpriseId(), getReadCommunity(), getWriteCommunity()); return hash; }
} else { // can only be set if snmp version is not v3 m_readCommunity = config.getReadCommunity(); m_writeCommunity = config.getWriteCommunity();
} else { // can only be set if snmp version is not v3 m_readCommunity = config.getReadCommunity(); m_writeCommunity = config.getWriteCommunity();
/** * <p>getAgentConfig</p> * * @return a {@link org.opennms.netmgt.snmp.SnmpAgentConfig} object. */ public SnmpAgentConfig getAgentConfig() { SnmpAgentConfig agentConfig = getCollectionAgent().getAgentConfig(); agentConfig.setPort(m_snmpCollection.getSnmpPort(agentConfig.getPort())); agentConfig.setRetries(m_snmpCollection.getSnmpRetries(agentConfig.getRetries())); agentConfig.setTimeout(m_snmpCollection.getSnmpTimeout(agentConfig.getTimeout())); agentConfig.setReadCommunity(m_snmpCollection.getSnmpReadCommunity(agentConfig.getReadCommunity())); agentConfig.setWriteCommunity(m_snmpCollection.getSnmpWriteCommunity(agentConfig.getWriteCommunity())); agentConfig.setProxyFor(m_snmpCollection.getSnmpProxyFor(agentConfig.getProxyFor())); agentConfig.setVersion(m_snmpCollection.getSnmpVersion(agentConfig.getVersion())); agentConfig.setMaxVarsPerPdu(m_snmpCollection.getSnmpMaxVarsPerPdu(agentConfig.getMaxVarsPerPdu())); agentConfig.setMaxRepetitions(m_snmpCollection.getSnmpMaxRepetitions(agentConfig.getMaxRepetitions())); agentConfig.setMaxRequestSize(m_snmpCollection.getSnmpMaxRequestSize(agentConfig.getMaxRequestSize())); agentConfig.setSecurityName(m_snmpCollection.getSnmpSecurityName(agentConfig.getSecurityName())); agentConfig.setAuthPassPhrase(m_snmpCollection.getSnmpAuthPassPhrase(agentConfig.getAuthPassPhrase())); agentConfig.setAuthProtocol(m_snmpCollection.getSnmpAuthProtocol(agentConfig.getAuthProtocol())); agentConfig.setPrivPassPhrase(m_snmpCollection.getSnmpPrivPassPhrase(agentConfig.getPrivPassPhrase())); agentConfig.setPrivProtocol(m_snmpCollection.getSnmpPrivProtocol(agentConfig.getPrivProtocol())); return agentConfig; }