/** * <p>getIfIndex</p> * * @return a {@link java.lang.Integer} object. */ @XmlTransient @Transient @JsonIgnore public Integer getIfIndex() { return m_ipInterface.getIfIndex(); }
/** * <p>getIfIndex</p> * * @return a int. */ @Override public int getIfIndex() { return (getIpInterface().getIfIndex() == null ? -1 : getIpInterface().getIfIndex().intValue()); }
private void updateSnmpInterface(OnmsIpInterface imported, OnmsIpInterface iface) { if (nullSafeEquals(iface.getIfIndex(), imported.getIfIndex())) { // no need to change anything return; } if (imported.getSnmpInterface() == null) { // there is no longer an snmpInterface associated with the ipInterface iface.setSnmpInterface(null); } else { // locate the snmpInterface on this node that has the new ifIndex and set it // into the interface OnmsSnmpInterface snmpIface = m_node.getSnmpInterfaceWithIfIndex(imported.getIfIndex()); iface.setSnmpInterface(snmpIface); } }
/** * <p>updateSnmpInterface</p> * * @param scannedIface a {@link org.opennms.netmgt.model.OnmsIpInterface} object. */ public void updateSnmpInterface(OnmsIpInterface scannedIface) { if (!hasNewValue(scannedIface.getIfIndex(), getIfIndex())) { /* no ifIndex in currently scanned interface so don't bother * we must have failed to collect data */ return; } if (scannedIface.getSnmpInterface() == null) { // there is no longer an snmpInterface associated with the ipInterface setSnmpInterface(null); } else { // locate the snmpInterface on this node that has the new ifIndex and set it // into the interface OnmsSnmpInterface snmpIface = getNode().getSnmpInterfaceWithIfIndex(scannedIface.getIfIndex()); setSnmpInterface(snmpIface); } }
private void addNewInterfaces(List<Event> events) { for (OnmsIpInterface iface : getNewInterfaces()) { m_node.addIpInterface(iface); if (iface.getIfIndex() != null) { iface.setSnmpInterface(m_node.getSnmpInterfaceWithIfIndex(iface.getIfIndex())); } iface.visit(new AddEventVisitor(events)); } }
if (iface.getIfIndex() != null) { iface.setSnmpInterface(getSnmpInterfaceWithIfIndex(iface.getIfIndex()));
if (hasNewValue(scannedIface.getIfIndex(), getIfIndex())) { setIfIndex(scannedIface.getIfIndex());