X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fforwardingrulesmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2FIForwardingRulesManager.java;h=070e8c499800c39068bbb16d2a879a4eb353497b;hp=087c0bc878b7140e4d409dc14ba5cad1b0b19b5d;hb=408eeef51f435abd2027f9d25ac5592066b202dd;hpb=59cc8f34c24d81a8890a94c11dedd4b21caa0adf 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 087c0bc878..070e8c4998 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,6 @@ 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 +26,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,13 +38,26 @@ 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 */ public Status uninstallFlowEntry(FlowEntry flow); + /** + * It requests FRM to remove all the Flow Entry that are part of the + * specified group. FRM will request the SDN protocol plugin to uninstall + * the flows from the network node one by one. Based on the result of this + * operation FRM will update its database accordingly and will return the + * proper {@code Status} code. + * + * @param groupName + * the group name + * @return the {@code Status} object indicating the result of this action + */ + public Status uninstallFlowEntryGroup(String groupName); + /** * It requests FRM to replace the currently installed Flow Entry with the * new one. It is up to the SDN protocol plugin to decide how to convey this @@ -53,7 +65,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,8 +84,7 @@ 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 @@ -86,7 +97,7 @@ public interface IForwardingRulesManager { * 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 @@ -99,8 +110,8 @@ public interface IForwardingRulesManager { * 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. - * + * database as if the flow was successfully removed. + * * @param flow * the flow entry to uninstall * @return the status of this request containing the unique id associated to @@ -108,6 +119,19 @@ public interface IForwardingRulesManager { */ public Status uninstallFlowEntryAsync(FlowEntry flow); + /** + * It requests FRM to remove all the Flow Entry that are part of the + * specified group through an asynchronous call. FRM will request the SDN + * protocol plugin to uninstall the flows from the network node one by one. + * As immediate result of this asynchronous call, FRM will update its flow + * database as if the flow was successfully removed. + * + * @param groupName + * the group name + * @return the {@code Status} object indicating the result of this action + */ + public Status uninstallFlowEntryGroupAsync(String groupName); + /** * 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 @@ -115,7 +139,7 @@ public interface IForwardingRulesManager { * 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 @@ -136,7 +160,7 @@ public interface IForwardingRulesManager { * 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 @@ -154,7 +178,7 @@ public interface IForwardingRulesManager { * 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 @@ -166,7 +190,7 @@ public interface IForwardingRulesManager { /** * Check whether the passed flow entry conflicts with the Container flows - * + * * @param flow * the flow entry to test * @return true if conflicts, false otherwise @@ -175,18 +199,33 @@ public interface IForwardingRulesManager { /** * Returns the list of Flow entries across network nodes which are part of - * the same flow group, policy - * + * the same flow group, policy. This list contains the flows as they were + * requested to be installed by the applications, before any merging with + * container flow is done. + * * @param group * the group name - * @return the list of flow entries belonging to the specified group + * @return the original list of flow entries belonging to the specified group */ public List getFlowEntriesForGroup(String group); + /** + * Returns the list of Flow entries installed in network nodes which are part of + * the same flow group, policy. This list contains the effective flows installed + * on the nodes after the merging with any possible container flow was performed. + * If no container flow are specified, this method returns the same list returned + * by getFlowEntriesForGroup(String group). + * + * @param group + * the group name + * @return the list of container flow merged flow entries belonging to the specified group + */ + public List getInstalledFlowEntriesForGroup(String policyName); + /** * 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 @@ -194,13 +233,12 @@ public interface IForwardingRulesManager { * @param dstPort * the list of ports to be added to the flow output actions */ - public void addOutputPort(Node node, String flowName, - List dstPort); + public void addOutputPort(Node node, String flowName, List dstPort); /** * 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 @@ -208,13 +246,12 @@ public interface IForwardingRulesManager { * @param dstPortthe * list of ports to be removed from the flow output actions */ - public void removeOutputPort(Node node, String flowName, - List dstPort); + public void removeOutputPort(Node node, String flowName, List dstPort); /** * Replace the current output port in the specified flow with the specified * one - * + * * @param node * the network node * @param groupName @@ -224,12 +261,11 @@ public interface IForwardingRulesManager { * @param dstPort * the new output action port */ - public void replaceOutputPort(Node node, String flowName, - NodeConnector outPort); + public void replaceOutputPort(Node node, String flowName, NodeConnector outPort); /** * Returns the output port configured on the specified flow - * + * * @param node * the network node * @param flowName @@ -242,14 +278,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 @@ -262,7 +298,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 @@ -272,7 +308,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(); @@ -280,7 +316,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 @@ -290,7 +326,7 @@ 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 @@ -302,7 +338,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 @@ -311,14 +347,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(); @@ -326,40 +362,57 @@ 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 + * @return the {@code Status} object indicating the result of this action. + */ + public Status addStaticFlow(FlowConfig config); + + /** + * Add a flow specified by the {@code FlowConfig} object on the current + * container, through an asynchronous call. + * * @param config * the {@code FlowConfig} object representing the static flow - * @param restore - * if set to true, the config object validation will be skipped. - * Used only internally, always set it to false. * @return the {@code Status} object indicating the result of this action. */ - public Status addStaticFlow(FlowConfig config, boolean restore); + public Status addStaticFlowAsync(FlowConfig config); /** * 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 */ public Status removeStaticFlow(FlowConfig config); + /** + * Remove a flow specified by the {@code FlowConfig} object on the current + * container, through an asynchronous call. + * + * @param config + * the {@code FlowConfig} object representing the static flow + * @return the {@code Status} object indicating the result of this action + */ + public Status removeStaticFlowAsync(FlowConfig config); + /** * 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 + * @return the {@code Status} object indicating the result of this action */ public Status modifyStaticFlow(FlowConfig config); /** * Remove the flow specified by name on the passed network node - * + * * @param name * for the static flow * @param node @@ -368,11 +421,23 @@ public interface IForwardingRulesManager { */ public Status removeStaticFlow(String name, Node node); + /** + * Remove the flow specified by name on the passed network node via an + * asynchronous call + * + * @param name + * for the static flow + * @param node + * on which the flow is attached + * @return the {@code Status} object indicating the result of this action + */ + public Status removeStaticFlowAsync(String name, Node node); + /** * 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 @@ -383,7 +448,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 @@ -400,4 +465,27 @@ public interface IForwardingRulesManager { public PortGroupProvider getPortGroupProvider(); + /** + * Returns the list of Flow entries for a network node. + * This list contains the flows as they were + * requested to be installed by the applications, before any merging with + * container flow is done. + * + * @param node + * @return the original list of flow entries belonging to the specified node + */ + public List getFlowEntriesForNode(Node node); + + /** + * Returns the list of Flow entries installed in a network node. + * This list contains the effective flows installed + * on the nodes after the merging with any possible container flow was performed. + * If no container flow are specified, this method returns the same list as returned + * by getFlowEntriesForNode(Node node). + * + * @param node + * @return the list of container flow merged flow entries belonging to the specified node + */ + public List getInstalledFlowEntriesForNode(Node node); + }