2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.sal.flowprogrammer;
11 import org.opendaylight.controller.sal.core.Node;
12 import org.opendaylight.controller.sal.utils.Status;
15 * Interface that defines the methods available to the functional modules above
16 * SAL for installing/modifying/removing flows on a network node
18 public interface IFlowProgrammerService {
20 * Synchronously add a flow to the network node
23 * The target network node
26 * @return The status of this request
28 Status addFlow(Node node, Flow flow);
31 * Synchronously modify existing flow on the switch
34 * The target network node
36 * The existing flow to modify
38 * The new flow to install
39 * @return The status of this request
41 Status modifyFlow(Node node, Flow oldFlow, Flow newFlow);
44 * Synchronously remove the flow from the network node
47 * The target network node
50 * @return The status of this request
52 Status removeFlow(Node node, Flow flow);
55 * Asynchronously add a flow to the network node
58 * The target network node
61 * @return The status of this request containing the unique request id
63 Status addFlowAsync(Node node, Flow flow);
66 * Asynchronously modify existing flow on the switch
69 * The target network node
71 * The existing flow to modify
73 * The new flow to install
74 * @return The status of this request containing the unique request id
76 Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow);
79 * Asynchronously remove the flow from the network node
82 * The target network node
85 * @return The status of this request containing the unique request id
87 Status removeFlowAsync(Node node, Flow flow);
90 * Remove all flows present on the network node
93 * The target network node
94 * @return The status of this request containing the unique request id
96 Status removeAllFlows(Node node);
99 * Send synchronous Barrier message
101 * Solicit the network node to report whether all the requests sent so far
102 * are completed. When this call is done, caller knows that all past flow
103 * operations requested to the node in asynchronous fashion were satisfied
104 * by the network node and that in case of any failure, a message was sent
108 * The network node to solicit
109 * @return The status of this request containing the unique request id
111 Status sendBarrierMessage(Node node);