private void updateSnmpDataForNode() {
   if (m_collector != null && m_collector.hasSystemGroup()) {
     m_node.setSysContact(m_collector.getSystemGroup().getSysContact());
     m_node.setSysDescription(m_collector.getSystemGroup().getSysDescr());
     m_node.setSysLocation(m_collector.getSystemGroup().getSysLocation());
     m_node.setSysObjectId(m_collector.getSystemGroup().getSysObjectID());
   }
 }
Пример #2
0
  /**
   * mergeAgentAttributes
   *
   * @param scannedNode a {@link org.opennms.netmgt.model.OnmsNode} object.
   */
  public void mergeAgentAttributes(OnmsNode scannedNode) {
    if (hasNewValue(scannedNode.getSysContact(), getSysContact())) {
      setSysContact(scannedNode.getSysContact());
    }

    if (hasNewValue(scannedNode.getSysDescription(), getSysDescription())) {
      setSysDescription(scannedNode.getSysDescription());
    }

    if (hasNewValue(scannedNode.getSysLocation(), getSysLocation())) {
      setSysLocation(scannedNode.getSysLocation());
    }

    if (hasNewValue(scannedNode.getSysName(), getSysName())) {
      setSysName(scannedNode.getSysName());
    }

    if (hasNewValue(scannedNode.getSysObjectId(), getSysObjectId())) {
      setSysObjectId(scannedNode.getSysObjectId());
    }
  }