BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / flowprogrammer / IPluginInFlowProgrammerService.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.sal.flowprogrammer;
10
11 import org.opendaylight.controller.sal.core.Node;
12 import org.opendaylight.controller.sal.utils.Status;
13
14 /**
15  * This interface defines the flow programmer methods to be implemented by
16  * protocol plugins
17  */
18 public interface IPluginInFlowProgrammerService {
19     /**
20      * Synchronously add a flow to the network node
21      *
22      * @param node
23      *            the network node
24      *            {@link org.opendaylight.controller.sal.core.Node} on which the
25      *            flow got added
26      * @param flow
27      *            the flow
28      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
29      *            that got added
30      * @return Status the operation status
31      *         {@link org.opendaylight.controller.sal.utils.Status}
32      */
33     Status addFlow(Node node, Flow flow);
34
35     /**
36      * Synchronously modify existing flow on the switch
37      *
38      * @param node
39      *            the network node
40      *            {@link org.opendaylight.controller.sal.core.Node} on which the
41      *            flow got modified
42      * @param flow
43      *            the flow
44      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
45      *            that got modified
46      * @return Status the operation status
47      *         {@link org.opendaylight.controller.sal.utils.Status}
48      */
49     Status modifyFlow(Node node, Flow oldFlow, Flow newFlow);
50
51     /**
52      * Synchronously remove the flow from the network node
53      *
54      * @param node
55      *            the network node
56      *            {@link org.opendaylight.controller.sal.core.Node} on which the
57      *            flow got removed
58      * @param flow
59      *            the flow
60      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
61      *            that got removed
62      * @return Status the operation status
63      *         {@link org.opendaylight.controller.sal.utils.Status}
64      */
65     Status removeFlow(Node node, Flow flow);
66
67     /**
68      * Asynchronously add a flow to the network node
69      *
70      * @param node
71      *            the network node
72      *            {@link org.opendaylight.controller.sal.core.Node} on which the
73      *            flow got added
74      * @param flow
75      *            the flow
76      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
77      *            that got added
78      * @param rid
79      *            the request id
80      * @return Status the operation status
81      *         {@link org.opendaylight.controller.sal.utils.Status}
82      */
83     Status addFlowAsync(Node node, Flow flow, long rid);
84
85     /**
86      * Asynchronously modify existing flow on the switch
87      *
88      * @param node
89      *            the network node
90      *            {@link org.opendaylight.controller.sal.core.Node} on which the
91      *            flow got modified
92      * @param oldFlow
93      *            the original flow
94      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
95      * @param newFlow
96      *            the new flow
97      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
98      * @param rid
99      *            the request id
100      * @return Status the operation status
101      *         {@link org.opendaylight.controller.sal.utils.Status}
102      */
103     Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow, long rid);
104
105     /**
106      * Asynchronously remove the flow from the network node
107      *
108      * @param node
109      *            the network node
110      *            {@link org.opendaylight.controller.sal.core.Node} on which the
111      *            flow got removed
112      * @param flow
113      *            the flow
114      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
115      *            that got removed
116      * @param rid
117      *            the request id
118      * @return Status the operation status
119      *         {@link org.opendaylight.controller.sal.utils.Status}
120      */
121     Status removeFlowAsync(Node node, Flow flow, long rid);
122
123     /**
124      * Remove all flows present on the network node
125      *
126      * @param node
127      *            the network node
128      *            {@link org.opendaylight.controller.sal.core.Node} on which the
129      *            flow got removed
130      * @return Status the operation status
131      *         {@link org.opendaylight.controller.sal.utils.Status}
132      */
133     Status removeAllFlows(Node node);
134
135     /**
136      * Send Barrier message synchronously. The caller will be blocked until the
137      * Barrier reply arrives.
138      *
139      * @param node
140      *            the network node
141      *            {@link org.opendaylight.controller.sal.core.Node}
142      * @return Status the operation status
143      *         {@link org.opendaylight.controller.sal.utils.Status}
144      */
145     Status syncSendBarrierMessage(Node node);
146
147     /**
148      * Send Barrier message asynchronously. The caller is not blocked.
149      *
150      * @param node
151      *            the network node
152      *            {@link org.opendaylight.controller.sal.core.Node}
153      * @return Status the operation status
154      *         {@link org.opendaylight.controller.sal.utils.Status}
155      */
156     Status asyncSendBarrierMessage(Node node);
157 }