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()); } } }
short tableId = switchFlowRemoved.getTableId(); RemovedReasonFlags removedReasonFlag = switchFlowRemoved.getRemovedReason(); Layer3Match layer3Match = switchFlowRemoved.getMatch().getLayer3Match(); if (layer3Match instanceof Ipv4Match) { Ipv4Match internalIpv4Match = (Ipv4Match) layer3Match; Layer4Match layer4Match = switchFlowRemoved.getMatch().getLayer4Match(); if (layer4Match instanceof TcpMatch) { TcpMatchFields tcpMatchFields = (TcpMatchFields)layer4Match; BigInteger metadata = switchFlowRemoved.getMatch().getMetadata().getMetadata(); if (MetaDataUtil.getNatRouterIdFromMetadata(metadata) != 0) { routerId = MetaDataUtil.getNatRouterIdFromMetadata(metadata); InstanceIdentifier<Node> nodeRef = switchFlowRemoved.getNode().getValue().firstIdentifierOf(Node.class); String dpn = nodeRef.firstKeyOf(Node.class).getId().getValue(); BigInteger dpnId = getDpnId(dpn);
@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)); }
/** * @param source notification, missing instructions * @param node corresponding node where the flow change occured * @return ad-sal node, build from given data */ public static Flow toFlow(SwitchFlowRemoved source, Node node) { final Flow target = new Flow(); genericFlowToAdFlow(source, target); target.setMatch(toMatch(source.getMatch())); return target; }
@Override public void onSwitchFlowRemoved(SwitchFlowRemoved notification) { LOG.debug("Switch flow removed : Cookies..................." + notification.getCookie().toString()); LOG.debug("-----------------------------------------------------------------------------------"); } }
if (!Objects.equals(_byteCount, other.getByteCount())) { return false; if (!Objects.equals(_cookie, other.getCookie())) { return false; if (!Objects.equals(_durationNsec, other.getDurationNsec())) { return false; if (!Objects.equals(_durationSec, other.getDurationSec())) { return false; if (!Objects.equals(_flowTable, other.getFlowTable())) { return false; if (!Objects.equals(_hardTimeout, other.getHardTimeout())) { return false; if (!Objects.equals(_idleTimeout, other.getIdleTimeout())) { return false; if (!Objects.equals(_match, other.getMatch())) { return false; if (!Objects.equals(_node, other.getNode())) { return false; if (!Objects.equals(_packetCount, other.getPacketCount())) { return false;