Skip to content

Commit

Permalink
Clean LinkableNode
Browse files Browse the repository at this point in the history
The LinkableNode class has been cleaned
to carry only information about the
single node
The BridgeTopology class will hold information
about bridge topology
  • Loading branch information
rssntn67 committed Apr 2, 2014
1 parent 8448927 commit 790ea3f
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 211 deletions.
Expand Up @@ -37,6 +37,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.opennms.core.utils.InetAddressUtils;
import org.opennms.netmgt.dao.api.AtInterfaceDao;
Expand Down Expand Up @@ -120,7 +121,7 @@ protected void sendNewSuspectEvent(final InetAddress ipaddress, final InetAddres

protected abstract void saveAtInterface(final OnmsAtInterface saveMe) ;

protected abstract List<String> getPhysAddrs(final int nodeId);
protected abstract Set<String> getPhysAddrs(final int nodeId);

protected abstract void markOldDataInactive(final Date now, final int nodeid);

Expand Down Expand Up @@ -941,8 +942,8 @@ protected void processQBridgeDot1dTpFdbTable(final LinkableNode node, final Onms
node.addMacAddress(fdbport, curMacAddress, vlan.getVlanId());
LOG.debug("processQBridgeDot1DTpFdbTable: Found learned status on bridge port.");
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_SELF) {
node.addBridgeIdentifier(curMacAddress);
LOG.debug("processQBridgeDot1DTpFdbTable: MAC address ({}) is used as bridge identifier.", curMacAddress);
node.getMacIdentifiers().add(curMacAddress);
LOG.debug("processQBridgeDot1DTpFdbTable: MAC address ({}) is used as port identifier.", curMacAddress);
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_INVALID) {
LOG.debug("processQBridgeDot1DTpFdbTable: Found 'INVALID' status. Skipping.");
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_MGMT) {
Expand Down Expand Up @@ -989,8 +990,8 @@ protected void processDot1DTpFdbTable(LinkableNode node, final OnmsVlan vlan, fi
node.addMacAddress(fdbport, curMacAddress, vlan.getVlanId());
LOG.debug("processDot1DTpFdbTable: Found learned status on bridge port.");
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_SELF) {
node.addBridgeIdentifier(curMacAddress);
LOG.debug("processDot1DTpFdbTable: MAC address ({}) is used as bridge identifier.", curMacAddress);
node.getMacIdentifiers().add(curMacAddress);
LOG.debug("processDot1DTpFdbTable: MAC address ({}) is used as port identifier.", curMacAddress);
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_INVALID) {
LOG.debug("processDot1DTpFdbTable: Found 'INVALID' status. Skipping.");
} else if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_MGMT) {
Expand Down

0 comments on commit 790ea3f

Please sign in to comment.