public RemoveFlowInputBuilder(RemoveFlowInput base) { this._bufferId = base.getBufferId(); this._containerName = base.getContainerName(); this._cookie = base.getCookie(); this._cookieMask = base.getCookieMask(); this._flags = base.getFlags(); this._flowName = base.getFlowName(); this._flowRef = base.getFlowRef(); this._flowTable = base.getFlowTable(); this._hardTimeout = base.getHardTimeout(); this._idleTimeout = base.getIdleTimeout(); this._instructions = base.getInstructions(); this._match = base.getMatch(); this._node = base.getNode(); this._outGroup = base.getOutGroup(); this._outPort = base.getOutPort(); this._priority = base.getPriority(); this._tableId = base.getTableId(); this._transactionUri = base.getTransactionUri(); this._barrier = base.isBarrier(); this._installHw = base.isInstallHw(); this._strict = base.isStrict(); if (base instanceof RemoveFlowInputImpl) { RemoveFlowInputImpl impl = (RemoveFlowInputImpl) base;
/** * Issue an remove-flow RPC request. * * @param w The node RPC watcher. * @param sfs MD-SAL flow service. * @param in The RPC input. */ public RemoveFlowRpc(NodeRpcWatcher w, SalFlowService sfs, RemoveFlowInput in) { super(w, in, in.getNode(), sfs.removeFlow(in), false); }
/** * Construct a new instance. * * @param node The target node. * @param input The input for the remove-flow RPC. */ protected Strict(OfNode node, RemoveFlowInput input) { super(node, input); targetFlow = new OfMockFlowEntry(node.getNodeIdentifier(), input); cookieMatcher = new CookieMatcher( node.getOfVersion(), input.getCookie(), input.getCookieMask()); // Determine the flow ID. FlowTable table = getFlowTable(); String id = table.getFlowId(targetFlow); if (id == null) { // Already removed. flowPath = null; complete(); } else { flowPath = table.getTablePath(). child(Flow.class, new FlowKey(new FlowId(id))); } }
/** * Create a task that removes the specified flow entries. * * @param node The target node. * @param input The input for the remove-flow RPC. * @return A {@link RemoveFlowTask} instance. */ public static final RemoveFlowTask create(OfNode node, RemoveFlowInput input) { return (Boolean.TRUE.equals(input.isStrict())) ? new Strict(node, input) : new Bulk(node, input); }
@Override public FlowRemoved compose(TransactionId tXid) { FlowRemovedBuilder removedFlow = new FlowRemovedBuilder((Flow) input); removedFlow.setTransactionId(tXid); removedFlow.setFlowRef(input.getFlowRef()); return removedFlow.build(); } };
/** * Invoke a remove-flow RPC. * * @param builder A {@link RemoveFlowInputBuilder} instance. */ public void invoke(@Nonnull RemoveFlowInputBuilder builder) { RemoveFlowInput input = builder.build(); rpcList.add(new RemoveFlowRpc(rpcWatcher, flowService, input)); targetNodes.add(input.getNode()); }
if (!Objects.equals(_bufferId, other.getBufferId())) { return false; if (!Objects.equals(_containerName, other.getContainerName())) { return false; if (!Objects.equals(_cookie, other.getCookie())) { return false; if (!Objects.equals(_cookieMask, other.getCookieMask())) { return false; if (!Objects.equals(_flags, other.getFlags())) { return false; if (!Objects.equals(_flowName, other.getFlowName())) { return false; if (!Objects.equals(_flowRef, other.getFlowRef())) { 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;
private ArpResolverMetadata resetFlowToRemove( final Ipv4Address gatewayIp, ArpResolverMetadata gatewayArpMetadata) { checkNotNull(gatewayIp); // If gatewayArpMetadata was not provided, look it up if (gatewayArpMetadata == null) { gatewayArpMetadata = gatewayToArpMetadataMap.get(gatewayIp); } if (gatewayArpMetadata != null && gatewayArpMetadata.getFlowToRemove() != null) { LOG.debug("Flow to route ARP Reply to Controller from {} being removed from node {}", gatewayIp, gatewayArpMetadata.getFlowToRemove().getNode()); flowService.removeFlow(gatewayArpMetadata.getFlowToRemove()); gatewayArpMetadata.setFlowToRemove(null); } return gatewayArpMetadata; }
@Override public ListenableFuture<RpcResult<RemoveFlowOutput>> removeFlow(RemoveFlowInput input) { Flow flow = ToSalConversionsUtils.toFlow(input, null); @SuppressWarnings("unchecked") org.opendaylight.controller.sal.core.Node node = InventoryMapping.toAdNode((InstanceIdentifier<Node>) input .getNode().getValue()); Status status = delegate.removeFlowAsync(node, flow); RemoveFlowOutputBuilder builder = new RemoveFlowOutputBuilder(); builder.setTransactionId(new TransactionId(BigInteger.valueOf(status.getRequestId()))); RemoveFlowOutput rpcResultType = builder.build(); return Futures.immediateFuture(RpcResultBuilder.<RemoveFlowOutput>status(status.isSuccess()) .withResult(rpcResultType).build()); }