@Override public void onSwitchFlowRemoved(final SwitchFlowRemoved notification) { // notified upon remove flow message from device arrives 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)); }
return false; if (!Objects.equals(_node, other.getNode())) { return false;
public SwitchFlowRemovedBuilder(SwitchFlowRemoved base) { this._byteCount = base.getByteCount(); this._cookie = base.getCookie(); this._durationNsec = base.getDurationNsec(); this._durationSec = base.getDurationSec(); this._flowTable = base.getFlowTable(); this._hardTimeout = base.getHardTimeout(); this._idleTimeout = base.getIdleTimeout(); this._match = base.getMatch(); this._node = base.getNode(); this._packetCount = base.getPacketCount(); this._priority = base.getPriority(); this._removedReason = base.getRemovedReason(); this._tableId = base.getTableId(); if (base instanceof SwitchFlowRemovedImpl) { SwitchFlowRemovedImpl impl = (SwitchFlowRemovedImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
InstanceIdentifier<Node> nodeRef = switchFlowRemoved.getNode().getValue().firstIdentifierOf(Node.class); String dpn = nodeRef.firstKeyOf(Node.class).getId().getValue(); BigInteger dpnId = getDpnId(dpn);