BUG-2218: Keep existing link augmentations during discovery process
[controller.git] / opendaylight / protocol_plugins / stub / src / main / java / org / opendaylight / controller / protocol_plugins / stub / internal / FlowProgrammerService.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.protocol_plugins.stub.internal;
10
11 import org.opendaylight.controller.sal.flowprogrammer.Flow;
12 import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.utils.Status;
15 import org.opendaylight.controller.sal.utils.StatusCode;
16
17
18
19 /**
20  * Represents the openflow plugin component in charge of programming the flows
21  * the flow programming and relay them to functional modules above SAL.
22  */
23 public class FlowProgrammerService implements IPluginInFlowProgrammerService
24   {
25     void init() {
26     }
27
28     /**
29      * Function called by the dependency manager when at least one dependency
30      * become unsatisfied or when the component is shutting down because for
31      * example bundle is being stopped.
32      *
33      */
34     void destroy() {
35     }
36
37     /**
38      * Function called by dependency manager after "init ()" is called and after
39      * the services provided by the class are registered in the service registry
40      *
41      */
42     void start() {
43     }
44
45     /**
46      * Function called by the dependency manager before the services exported by
47      * the component are unregistered, this will be followed by a "destroy ()"
48      * calls
49      *
50      */
51     void stop() {
52     }
53
54
55     /**
56      * Synchronously add a flow to the network node
57      *
58      * @param node
59      * @param flow
60      */
61     public Status addFlow(Node node, Flow flow){
62         return new Status(StatusCode.SUCCESS);
63     }
64
65     /**
66      * Synchronously modify existing flow on the switch
67      *
68      * @param node
69      * @param flow
70      */
71     public Status modifyFlow(Node node, Flow oldFlow, Flow newFlow){
72         return new Status(StatusCode.SUCCESS);
73     }
74     /**
75      * Synchronously remove the flow from the network node
76      *
77      * @param node
78      * @param flow
79      */
80     public Status removeFlow(Node node, Flow flow){
81         return new Status(StatusCode.SUCCESS);
82     }
83
84     /**
85      * Asynchronously add a flow to the network node
86      *
87      * @param node
88      * @param flow
89      * @param rid
90      */
91     public Status addFlowAsync(Node node, Flow flow, long rid){
92         return new Status(StatusCode.SUCCESS);
93     }
94
95     /**
96      * Asynchronously modify existing flow on the switch
97      *
98      * @param node
99      * @param flow
100      * @param rid
101      */
102     public Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow, long rid){
103         return new Status(StatusCode.SUCCESS);
104     }
105
106     /**
107      * Asynchronously remove the flow from the network node
108      *
109      * @param node
110      * @param flow
111      * @param rid
112      */
113     public Status removeFlowAsync(Node node, Flow flow, long rid){
114         return new Status(StatusCode.SUCCESS);
115     }
116
117     /**
118      * Remove all flows present on the network node
119      *
120      * @param node
121      */
122     public Status removeAllFlows(Node node){
123         return new Status(StatusCode.SUCCESS);
124     }
125
126     /**
127      * Send Barrier message synchronously. The caller will be blocked until the
128      * Barrier reply arrives.
129      *
130      * @param node
131      */
132     public Status syncSendBarrierMessage(Node node){
133         return new Status(StatusCode.SUCCESS);
134     }
135
136     /**
137      * Send Barrier message asynchronously. The caller is not blocked.
138      *
139      * @param node
140      */
141     public Status asyncSendBarrierMessage(Node node){
142         return new Status(StatusCode.SUCCESS);
143     }
144   }