public static String toNodeConnectorType(final NodeConnectorId ncId, final NodeId nodeId) { if (ncId.equals(toLocalNodeConnectorId(nodeId))) { return NodeConnectorIDType.SWSTACK; } else if (ncId.equals(toNormalNodeConnectorId(nodeId))) { return NodeConnectorIDType.HWPATH; } else if (ncId.equals(toControllerNodeConnectorId(nodeId))) { return NodeConnectorIDType.CONTROLLER; } return NodeConnectorIDType.OPENFLOW; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } NodeConnectorStatisticsAndPortNumberMapKey other = (NodeConnectorStatisticsAndPortNumberMapKey) obj; if (_nodeConnectorId == null) { if (other._nodeConnectorId != null) { return false; } } else if(!_nodeConnectorId.equals(other._nodeConnectorId)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } QueueIdAndStatisticsMapKey other = (QueueIdAndStatisticsMapKey) obj; if (_queueId == null) { if (other._queueId != null) { return false; } } else if(!_queueId.equals(other._queueId)) { return false; } if (_nodeConnectorId == null) { if (other._nodeConnectorId != null) { return false; } } else if(!_nodeConnectorId.equals(other._nodeConnectorId)) { return false; } return true; }
public static Object toADNodeConnectorId(final NodeConnectorId nodeConnectorId, final NodeId nodeId) { if (nodeConnectorId.equals(toLocalNodeConnectorId(nodeId)) || nodeConnectorId.equals(toNormalNodeConnectorId(nodeId)) || nodeConnectorId.equals(toControllerNodeConnectorId(nodeId))) { return org.opendaylight.controller.sal.core.NodeConnector.SPECIALNODECONNECTORID; } String nodeConnectorIdStripped = stripToColon(nodeConnectorId.getValue()); if (NUMBERS_ONLY.matcher(nodeConnectorIdStripped).matches()) { Short nodeConnectorIdVal = null; try { nodeConnectorIdVal = Short.valueOf(nodeConnectorIdStripped); return nodeConnectorIdVal; } catch (NumberFormatException e) { LOG.warn("nodeConnectorId not supported (long): {}", nodeConnectorIdStripped, e); } } return nodeConnectorIdStripped; }
return false; } else if(!_nodeConnectorId.equals(other.getNodeConnectorId())) { return false;
return false; } else if(!_nodeConnectorId.equals(other.getNodeConnectorId())) { return false;
/** * Check whether the flow match configured in the specified MD-SAL flow * entry meets the condition specified by this instance. * * @param flow The MD-SAL flow entry to be tested. * @return {@code true} if the specified flow entry meets the conditions. * {@code false} otherwise. */ private boolean checkMatch(Flow flow) { boolean result = (flowMatch == null); if (!result) { Match match = flow.getMatch(); if (match == null) { match = EMPTY_MATCH; } // Currently, only IN_PORT match is supported. NodeConnectorId inPort = flowMatch.getInPort(); result = (inPort == null || inPort.equals(match.getInPort())); if (result) { // Return false if unsupported filed is specified. result = validMatch; } } return result; }
/** * Comparation by InPhyPort */ @Override public boolean areObjectsEqual(Match statsMatch, Match storedMatch) { if (storedMatch == null) return false; if (storedMatch.getInPhyPort() == null) { if (statsMatch.getInPhyPort() != null) { return false; } } else if (!storedMatch.getInPhyPort().equals(statsMatch.getInPhyPort())) { return false; } return true; } };
/** * Comparation by InPort */ @Override public boolean areObjectsEqual(Match statsMatch, Match storedMatch) { if (storedMatch == null) return false; if (storedMatch.getInPort() == null) { if (statsMatch.getInPort() != null) { return false; } } else if (!storedMatch.getInPort().equals(statsMatch.getInPort())) { return false; } return true; } };
return false; } else if(!_nodeConnectorId.equals(other.getNodeConnectorId())) { return false;
/** * {@inheritDoc} */ @Override protected void onUpdated(TopologyEventContext ectx, ChangedData<VtnLink> data) { VtnLink old = data.getOldValue(); VtnLink vlink = data.getValue(); if (old.getSource().equals(vlink.getSource()) && old.getDestination().equals(vlink.getDestination())) { // Termination points were not changed. // In this case we do not need to update routing table. LOG.info("Inter-switch link attributes have been changed: " + "old={}, new={}", InventoryUtils.toString(old), InventoryUtils.toString(vlink)); } else { LOG.info("Inter-switch link has been changed: old={}, new={}", InventoryUtils.toString(old), InventoryUtils.toString(vlink)); ectx.addRemoved(data.getOldValue()); ectx.addCreated(data.getValue()); } }
return false; } else if(!_nodeConnectorId.equals(other.getNodeConnectorId())) { return false;
return false; } else if(!_nodeConnectorId.equals(other.getNodeConnectorId())) { return false;
if (ncId.equals(oldOfOverlayAug.getNodeConnectorId())) { return false;
if (ncId.equals(oldOfOverlayL3Aug.getNodeConnectorId())) { return false;