X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fforwardingrulesmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2FIForwardingRulesManager.java;h=b3d0c8acdf535f2f48d77c5940970587bbee954d;hb=8398f3adb544427642694be13abe9c3bc1a4e192;hp=d0efe4a83f7782d8225b79d483f446df49c5d280;hpb=f6fdaa2c3a3542264c4fa0e92e9ca14ed6f26b66;p=controller.git diff --git a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java index d0efe4a83f..b3d0c8acdf 100644 --- a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java +++ b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java @@ -18,7 +18,7 @@ import org.opendaylight.controller.sal.utils.Status; /** * Interface that describes methods for installing or removing forwarding rules * and to access to the flows database. - * + * */ public interface IForwardingRulesManager { @@ -27,7 +27,7 @@ public interface IForwardingRulesManager { * SDN protocol plugin to install the flow on the network node. Based on the * result of this operation FRM will update its database accordingly and * will return the proper {@code Status} code. - * + * * @param flow * the flow entry to install * @return the {@code Status} object indicating the result of this action. @@ -39,7 +39,7 @@ public interface IForwardingRulesManager { * protocol plugin to uninstall the flow from the network node. Based on the * result of this operation FRM will update its database accordingly and * will return the proper {@code Status} code. - * + * * @param flow * the flow entry to uninstall * @return the {@code Status} object indicating the result of this action @@ -53,7 +53,7 @@ public interface IForwardingRulesManager { * modify message depending on the SDN protocol specifications If the * current flow is equal to the new one it will be a no op and success code * is returned. - * + * * @param current * the current flow entry to modify * @param newone @@ -72,16 +72,101 @@ public interface IForwardingRulesManager { * it, it will request plugin to add the new flow. If the passed entry is * not valid an error code is returned. If the existing flow is equal to the * passed one it will be a no op and success code is returned. - * + * + * * @param newone * the new flow entry to install * @return the {@code Status} object indicating the result of this action */ public Status modifyOrAddFlowEntry(FlowEntry newone); + /** + * It requests FRM to install the passed Flow Entry through an asynchronous + * call. A unique request id is returned to the caller. FRM will request the + * SDN protocol plugin to install the flow on the network node. As immediate + * result of this asynchronous call, FRM will update its flow database as if + * the flow was successfully installed. + * + * @param flow + * the flow entry to install + * @return the status of this request containing the request id associated + * to this asynchronous request + */ + public Status installFlowEntryAsync(FlowEntry flow); + + /** + * It requests FRM to remove the passed Flow Entry through an asynchronous + * call. A unique request id is returned to the caller. FRM will request the + * SDN protocol plugin to uninstall the flow from the network node. As + * immediate result of this asynchronous call, FRM will update its flow + * database as if the flow was successfully installed. + * + * @param flow + * the flow entry to uninstall + * @return the status of this request containing the unique id associated to + * this asynchronous request + */ + public Status uninstallFlowEntryAsync(FlowEntry flow); + + /** + * It requests FRM to replace the currently installed Flow Entry with the + * new one through an asynchronous call. A unique request id is returned to + * the caller. It is up to the SDN protocol plugin to decide how to convey + * this message to the network node. It could be a delete + add or a single + * modify message depending on the SDN protocol specifications. If the + * current flow is equal to the new one it will be a no op. + * + * @param current + * the current flow entry to modify + * @param newone + * the new flow entry which will replace the current one + * @return the status of this request containing the request id associated + * to this asynchronous request + */ + public Status modifyFlowEntryAsync(FlowEntry current, FlowEntry newone); + + /** + * It requests the FRM to replace the currently installed Flow Entry with + * the new one through an asynchronous call. A unique request id is returned + * to the caller. The currently installed entry is derived by the Match + * portion of the passed Flow. FRM looks in its database for a previously + * installed FlowEntry which Match equals the Match of the passed Flow. If + * it finds it, it will request the SDN protocol plugin to replace the + * existing flow with the new one on the network node. If it does not find + * it, it will request plugin to add the new flow. If the passed entry is + * not valid a zero request id is returned. If the existing flow is equal to + * the passed one it will be a no op. + * + * @param newone + * the new flow entry to install + * @return the unique id associated to this request. In case of not + * acceptable request -1 will be returned. + */ + public Status modifyOrAddFlowEntryAsync(FlowEntry newone); + + /** + * Requests ForwardingRulesManager to solicit the network node to inform us + * about the status of its execution on the asynchronous requests that were + * sent to it so far. It is a way for an application to poke the network + * node in order to get a feedback asap on the asynchronous requests + * generated by the application. The caller may decide if this is a blocking + * or non-blocking operation. If blocking is set to true, the caller will be + * blocked until the solicitation response is received from the network node + * or receive timeout. Otherwise, it is a non-blocking call and does not + * guarantee the node will respond in any given time. + * + * @param node + * The network node to solicit a response + * @param blocking + * The blocking mode + * @return the status of this request containing the request id associated + * to this asynchronous request + */ + public Status solicitStatusResponse(Node node, boolean blocking); + /** * Check whether the passed flow entry conflicts with the Container flows - * + * * @param flow * the flow entry to test * @return true if conflicts, false otherwise @@ -91,7 +176,7 @@ public interface IForwardingRulesManager { /** * Returns the list of Flow entries across network nodes which are part of * the same flow group, policy - * + * * @param group * the group name * @return the list of flow entries belonging to the specified group @@ -101,7 +186,7 @@ public interface IForwardingRulesManager { /** * Add a list of output port to the flow with the specified name on the * specified network node - * + * * @param node * the network node * @param flowName @@ -115,7 +200,7 @@ public interface IForwardingRulesManager { /** * Remove a list of output port from the flow with the specified name on the * specified network node - * + * * @param node * the network node * @param flowName @@ -129,7 +214,7 @@ public interface IForwardingRulesManager { /** * Replace the current output port in the specified flow with the specified * one - * + * * @param node * the network node * @param groupName @@ -144,7 +229,7 @@ public interface IForwardingRulesManager { /** * Returns the output port configured on the specified flow - * + * * @param node * the network node * @param flowName @@ -157,14 +242,14 @@ public interface IForwardingRulesManager { * Returns all the troubleshooting information that applications have set * along with the policy they have configured through forwarding rules * manger. - * + * * @return the collection of troubleshooting objects */ public Map getTSPolicyData(); /** * Set the troubleshooting information for the policy - * + * * @param policyname * the flow group name * @param o @@ -177,7 +262,7 @@ public interface IForwardingRulesManager { /** * Returns the troubleshooting information that was set for the specified * policy - * + * * @param groupName * the flows group name * @return the troubleshooting info object @@ -187,7 +272,7 @@ public interface IForwardingRulesManager { /** * Returns the specifications of all the flows configured for all the * switches on the current container - * + * * @return the list of flow configurations present in the database */ public List getStaticFlows(); @@ -195,7 +280,7 @@ public interface IForwardingRulesManager { /** * Returns the specifications of all the flows configured for the given * switch on the current container - * + * * @param node * the network node identifier * @return the list of {@code FlowConfig} objects @@ -205,11 +290,11 @@ public interface IForwardingRulesManager { /** * Returns the specification of the flow configured for the given network * node on the current container - * + * * @param name * the flow name * @param n - * the netwrok node identifier + * the network node identifier * @return the {@code FlowConfig} object */ public FlowConfig getStaticFlow(String name, Node n); @@ -217,7 +302,7 @@ public interface IForwardingRulesManager { /** * Returns the list of names of flows configured for the given Network node * on the current container - * + * * @param node * the network node identifier * @return the list of flow names @@ -226,14 +311,14 @@ public interface IForwardingRulesManager { /** * Returns the list of Node(s) for which a static flow has been configured - * + * * @return the list of network nodes */ public List getListNodeWithConfiguredFlows(); /** * Save the flow configured so far to file - * + * * @return the {@code Status} object indicating the result of this action. */ public Status saveConfig(); @@ -241,7 +326,7 @@ public interface IForwardingRulesManager { /** * Add a flow specified by the {@code FlowConfig} object on the current * container - * + * * @param config * the {@code FlowConfig} object representing the static flow * @param restore @@ -254,7 +339,7 @@ public interface IForwardingRulesManager { /** * Remove a flow specified by the {@code FlowConfig} object on the current * container - * + * * @param config * the {@code FlowConfig} object representing the static flow * @return the {@code Status} object indicating the result of this action @@ -265,7 +350,7 @@ public interface IForwardingRulesManager { * Replace the flow identified by the {@code FlowConfig.name} name for the * {@code FlowConfig.node} network node with the new flow specified by * {@code FlowConfig} object - * + * * @param config * the {@code FlowConfig} object * @returnthe {@code Status} object indicating the result of this action @@ -274,7 +359,7 @@ public interface IForwardingRulesManager { /** * Remove the flow specified by name on the passed network node - * + * * @param name * for the static flow * @param node @@ -287,7 +372,7 @@ public interface IForwardingRulesManager { * Toggle the installation status of the specified configured flow If the * flow configuration status is active, this call will change the flow * status to inactive and vice-versa - * + * * @param configObject * the {@code FlowConfig} object * @return the {@code Status} object indicating the result of this action @@ -298,7 +383,7 @@ public interface IForwardingRulesManager { * Toggle the installation status of the specified configured flow If the * flow configuration status is active, this call will change the flow * status to inactive and vice-versa - * + * * @param name * for the static flow * @param node