a000024e9e0c7e5355e49e668cb966f71f004080
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / IPluginReadServiceFilter.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.protocol_plugin.openflow;
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.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
21 /**
22  * Interface to serve the hardware information requests coming from SAL
23  * It is implemented by the respective OF1.0 plugin component
24  *
25  */
26 public interface IPluginReadServiceFilter {
27     /**
28      * Returns the hardware image for the specified flow
29      * on the specified network node for the passed container
30      *
31      * @param container
32      * @param node
33      * @param flow
34      * @param cached
35      * @return
36      */
37     public FlowOnNode readFlow(String container, Node node, Flow flow,
38             boolean cached);
39
40     /**
41      * Returns the hardware view of all the flow installed
42      * on the specified network node for the passed container
43      *
44      * @param container
45      * @param node
46      * @param cached
47      * @return
48      */
49     public List<FlowOnNode> readAllFlow(String container, Node node,
50             boolean cached);
51
52     /**
53      * Returns the description of the network node as provided by the node itself
54      *
55      * @param node
56      * @param cached
57      * @return
58      */
59     public NodeDescription readDescription(Node node, boolean cached);
60
61     /**
62      * Returns the hardware view of the specified network node connector
63      * for the given container
64      * @param node
65      * @return
66      */
67     public NodeConnectorStatistics readNodeConnector(String container,
68             NodeConnector nodeConnector, boolean cached);
69
70     /**
71      * Returns the hardware info for all the node connectors on the
72      * specified network node for the given container
73      *
74      * @param node
75      * @return
76      */
77     public List<NodeConnectorStatistics> readAllNodeConnector(String container,
78             Node node, boolean cached);
79
80     /**
81      * Returns the average transmit rate for the specified node conenctor on
82      * the given container. If the node connector does not belong to the passed
83      * container a zero value is returned
84      *
85      * @param container
86      * @param nodeConnector
87      * @return tx rate [bps]
88      */
89     public long getTransmitRate(String container, NodeConnector nodeConnector);
90 }