Merge "BUG-2329 Add test for anyxmls inside rpc resonse for netcfon-connector"
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / reader / IPluginInReadService.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.reader;
11
12 import java.util.List;
13
14 import org.opendaylight.controller.sal.core.Node;
15 import org.opendaylight.controller.sal.core.NodeConnector;
16 import org.opendaylight.controller.sal.core.NodeTable;
17 import org.opendaylight.controller.sal.flowprogrammer.Flow;
18
19 /**
20  * The interface defines hardware view read methods to be implemented by protocol plugins
21  */
22 public interface IPluginInReadService {
23
24     /**
25      * Returns the hardware image for the specified flow on the specified
26      * network node
27      *
28      * @param node
29      *            the network node
30      * @param flow
31      *            the target flow
32      * @param cached
33      *            specify if entry has to be queried from the cached hardware
34      *            information maintained locally or directly from the network
35      *            node.
36      * @return The FlowOnNode object containing the information present in
37      *         hardware for the passed flow on the specified network node
38      */
39     public FlowOnNode readFlow(Node node, Flow flow, boolean cached);
40
41     /**
42      * Returns the hardware view of all the flow installed on the specified
43      * network node
44      *
45      * @param node
46      *            the network node
47      * @param cached
48      *            specify if entries have to be queried from the cached hardware
49      *            information maintained locally or directly from the network
50      *            node.
51      * @return The list of FlowOnNode objects containing the information present
52      *         in hardware on the specified network node for all its flows
53      */
54     public List<FlowOnNode> readAllFlow(Node node, boolean cached);
55
56     /**
57      * Returns the description of the network node as provided by the node
58      * itself
59      *
60      * @param node
61      *            the network node
62      * @param cached
63      *            specify if entry has to be queried from the cached hardware
64      *            information maintained locally or directly from the network
65      *            node.
66      * @return The NodeDescription object containing the description information
67      *         for the specified network node
68      */
69     public NodeDescription readDescription(Node node, boolean cached);
70
71     /**
72      * Returns the hardware view of the specified network node connector
73      *
74      * @param connector
75      *            the target nodeConnector
76      * @param cached
77      *            specify if entry has to be queried from the cached hardware
78      *            information maintained locally or directly from the
79      *            corresponding network node.
80      * @return The NodeConnectorStatistics object containing the statistics
81      *         present in hardware for the corresponding network node port
82      */
83     public NodeConnectorStatistics readNodeConnector(NodeConnector connector,
84             boolean cached);
85
86     /**
87      * Returns the hardware info for all the node connectors on the specified
88      * network node
89      *
90      * @param node
91      *            the target node
92      * @param cached
93      *            specify if entries have to be queried from the cached hardware
94      *            information maintained locally or directly from the
95      *            corresponding network node.
96      * @return The list of NodeConnectorStatistics objects containing the
97      *         statistics present in hardware for all the network node ports
98      */
99     public List<NodeConnectorStatistics> readAllNodeConnector(Node node,
100             boolean cached);
101
102     /**
103      * Returns the table statistics for the node
104      * @param table
105      *            the target network node table
106      * @param cached
107      *            specify if entry has to be queried from the cached hardware
108      *            information maintained locally or directly from
109      *            the corresponding network node.
110      * @return The NodeTableStatistics object containing the statistics present
111      *         in hardware for the corresponding network node table
112      */
113     public NodeTableStatistics readNodeTable(NodeTable table, boolean cached);
114
115     /**
116      * Returns all the table statistics for the node
117      *
118      * @param node
119      *            the target node
120      * @param cached
121      *            specify if entries have to be queried from the cached hardware
122      *            information maintained locally or directly from the
123      *            corresponding network node.
124      * @return The list of NodeTableStatistics objects containing the statistics
125      *         present in hardware for all the network node tables
126      */
127     public List<NodeTableStatistics> readAllNodeTable(Node node, boolean cached);
128
129     /**
130      * Returns the averaged transmit rate for the specified node connector
131      * @param connector
132      *            the target nodeConnector
133      * @return tx rate [bps]
134      */
135     public long getTransmitRate(NodeConnector connector);
136
137 }