@Override public void onFlowRemoved(final FlowRemoved notification) { // notified upon remove flow rpc successfully invoked if (notification == null) { return; } final NodeRef node = notification.getNode(); if (node == null) { LOG.debug("Notification {} has not node, ignoring it", notification); return; } Node adNode; try { adNode = NodeMapping.toADNode(notification.getNode()); } catch (ConstructionException e) { LOG.warn("Failed to construct AD node for {}, ignoring notification", node, e); return; } flowProgrammerPublisher.flowRemoved(adNode, ToSalConversionsUtils.toFlow(notification, adNode)); }
/** * Check whether the given FLOW_REMOVED notification is valid or not. * * @param removed FLOW_REMOVED notification. * @return A {@link SalNode} instance that specifies the target switch * if the given FLOW_REMOVED notification is valid. * {@code null} otherwise. */ private SalNode checkFlowRemoved(FlowRemoved removed) { SalNode result = null; if (removed != null) { SalNode snode = SalNode.create(removed.getNode()); if (snode != null) { short table = FlowUtils.getTableId(removed); if (table == TABLE_ID) { result = snode; } else { ignoreFlowRemoved(VTNLogLevel.DEBUG, "Unused flow table", snode, removed); } } else { LOG.debug("Ignore FLOW_REMOVED: Invalid node: {}", removed); } } else { LOG.warn("Null switch-flow-removed notification."); } return result; }
return false; if (!Objects.equals(_node, other.getNode())) { return false;
this._instructions = base.getInstructions(); this._match = base.getMatch(); this._node = base.getNode(); this._outGroup = base.getOutGroup(); this._outPort = base.getOutPort();