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.protocol_plugin.openflow;
11 import java.util.List;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.core.NodeConnector;
15 import org.opendaylight.controller.sal.core.NodeTable;
16 import org.opendaylight.controller.sal.flowprogrammer.Flow;
17 import org.opendaylight.controller.sal.reader.FlowOnNode;
18 import org.opendaylight.controller.sal.reader.NodeConnectorStatistics;
19 import org.opendaylight.controller.sal.reader.NodeDescription;
20 import org.opendaylight.controller.sal.reader.NodeTableStatistics;
23 * Interface to serve the hardware information requests coming from SAL It is
24 * implemented by the respective OF1.0 plugin component
27 public interface IReadServiceFilter {
29 * Returns the hardware image for the specified flow on the specified
30 * network node for the passed container
33 * the container for which the request is originated
39 * specify if entry has to be queried from the cached hardware
40 * information maintained in the protocol plugin or directly from
42 * @return The FlowOnNode object containing the information present in
43 * hardware for the passed flow on the specified network node
45 public FlowOnNode readFlow(String container, Node node, Flow flow, boolean cached);
48 * Returns the hardware view of all the flow installed on the specified
49 * network node for the passed container
52 * the container for which the request is originated
56 * specify if entries have to be queried from the cached hardware
57 * information maintained in the protocol plugin or directly from
59 * @return The list of FlowOnNode objects containing the information present
60 * in hardware on the specified network node for all its flows
62 public List<FlowOnNode> readAllFlow(String container, Node node, boolean cached);
65 * Returns the description of the network node as provided by the node
71 * specify if entry has to be queried from the cached hardware
72 * information maintained in the protocol plugin or directly from
74 * @return The NodeDescription object containing the description information
75 * for the specified network node
77 public NodeDescription readDescription(Node node, boolean cached);
80 * Returns the hardware view of the specified network node connector for the
84 * the container for which the request is originated
85 * @param nodeConnector
86 * the target nodeConnector
88 * specify if entry has to be queried from the cached hardware
89 * information maintained in the protocol plugin or directly from
90 * the corresponding network node.
91 * @return The NodeConnectorStatistics object containing the statistics
92 * present in hardware for the corresponding network node port
94 public NodeConnectorStatistics readNodeConnector(String container, NodeConnector nodeConnector, boolean cached);
97 * Returns the hardware info for all the node connectors on the specified
98 * network node for the given container
101 * the container for which the request is originated
105 * specify if entries have to be queried from the cached hardware
106 * information maintained in the protocol plugin or directly from
107 * the corresponding network node.
108 * @return The list of NodeConnectorStatistics objects containing the
109 * statistics present in hardware for all the network node ports
111 public List<NodeConnectorStatistics> readAllNodeConnector(String container, Node node, boolean cached);
114 * Returns the table statistics of the node as specified by the given
118 * the container for which the request is originated
120 * the target network node table
122 * specify if entry has to be queried from the cached hardware
123 * information maintained in the protocol plugin or directly from
124 * the corresponding network node.
125 * @return The NodeTableStatistics object containing the statistics present
126 * in hardware for the corresponding network node table
128 public NodeTableStatistics readNodeTable(String container, NodeTable nodeTable, boolean cached);
131 * Returns the table statistics of all the tables for the specified node
134 * the container for which the request is originated
138 * specify if entries have to be queried from the cached hardware
139 * information maintained in the protocol plugin or directly from
140 * the corresponding network node.
141 * @return The list of NodeTableStatistics objects containing the statistics
142 * present in hardware for all the network node tables
144 public List<NodeTableStatistics> readAllNodeTable(String containerName, Node node, boolean cached);
147 * Returns the average transmit rate for the specified node connector on the
148 * given container. If the node connector does not belong to the passed
149 * container a zero value is returned
152 * the container for which the request is originated
153 * @param nodeConnector
154 * the target node connector
155 * @return The average tx rate in bps
157 public long getTransmitRate(String container, NodeConnector nodeConnector);