1 module opendaylight-flow-statistics {
2 namespace "urn:opendaylight:flow:statistics";
5 import yang-ext {prefix ext; revision-date "2013-07-09";}
6 import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
7 import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
8 import opendaylight-flow-types {prefix flow-types;revision-date "2013-10-26";}
9 import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";}
10 import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";}
11 import flow-capable-transaction {prefix tr;}
12 import sal-flow {prefix flow;}
15 revision "2013-08-19" {
16 description "Initial revision of flow statistics service";
19 //Augment flow statistics data to the flow-capable-node->table->flow
20 augment "/inv:nodes/inv:node/flow-node:table/flow-node:flow" {
21 ext:augment-identifier "flow-statistics-data";
25 grouping flow-statistics {
26 container flow-statistics {
29 uses stat-types:generic-statistics;
34 description "flow id";
38 grouping flow-and-statistics-map-list {
39 description "List of flow and statistics map";
40 list flow-and-statistics-map-list {
45 uses flow-and-statistics-map;
49 grouping flow-and-statistics-map{
50 description "Mapping between flow and its statistics";
52 uses stat-types:generic-statistics;
55 // RPC calls to fetch flow statistics
56 rpc get-all-flows-statistics-from-all-flow-tables {
57 description "Fetch statistics of all the flow present in all the flow tables of the switch";
59 uses inv:node-context-ref;
62 uses flow-and-statistics-map-list;
63 uses tr:transaction-aware;
68 rpc get-all-flow-statistics-from-flow-table {
69 description "Fetch statistics of all the flow present in the specific flow table of the switch";
71 uses inv:node-context-ref;
73 type flow-types:table-id;
77 uses flow-and-statistics-map-list;
78 uses tr:transaction-aware;
82 rpc get-flow-statistics-from-flow-table {
83 description "Fetch statistics of the specific flow present in the specific flow table of the switch";
85 uses inv:node-context-ref;
89 uses flow-and-statistics-map-list;
90 uses tr:transaction-aware;
94 notification flows-statistics-update {
95 description "Flows statistics sent by switch";
100 uses flow-and-statistics-map-list;
101 uses tr:transaction-aware;
104 //Models for aggregate flow statistics collection
105 augment "/inv:nodes/inv:node/flow-node:table" {
106 ext:augment-identifier "aggregate-flow-statistics-data";
107 uses aggregate-flow-statistics;
110 grouping aggregate-flow-statistics {
111 container aggregate-flow-statistics {
113 uses stat-types:aggregate-flow-statistics;
117 // RPC calls to fetch flow statistics
118 rpc get-aggregate-flow-statistics-from-flow-table-for-all-flows {
119 description "Fetch aggregate statistics for all the flows present in the specific flow table of the switch";
121 uses inv:node-context-ref;
123 type flow-types:table-id;
127 uses stat-types:aggregate-flow-statistics;
128 uses tr:transaction-aware;
131 rpc get-aggregate-flow-statistics-from-flow-table-for-given-match {
132 description "Fetch aggregate statistics for all the flow matches to the given match from the given table of the switch";
134 uses inv:node-context-ref;
135 uses flow-types:flow;
138 uses stat-types:aggregate-flow-statistics;
139 uses tr:transaction-aware;
143 notification aggregate-flow-statistics-update {
144 description "Aggregate flow statistics for a table, sent by switch";
149 uses stat-types:aggregate-flow-statistics;
150 uses tr:transaction-aware;
153 //Keeping flow statistics RPC call for backward compatibility for sal-compatibility layer --START
154 rpc get-flow-statistics {
156 uses inv:node-context-ref;
157 uses flow-types:flow;
160 uses flow-types:flow-statistics;
164 rpc get-all-flow-statistics {
166 uses inv:node-context-ref;
169 list flow-statistics {
170 uses flow-types:flow-statistics;
175 notification flow-statistics-updated {
176 uses flow-types:flow-statistics;
179 //Keeping flow statistics RPC call for backward compatibility for sal-compatibility layer --END
181 //RPC call to fetch node connector statistics
182 rpc get-node-connector-statistics {
184 uses inv:node-context-ref;
185 leaf node-connector {
186 type inv:node-connector-ref;
190 uses stat-types:node-connector-statistics;
194 rpc get-all-node-connector-statistics {
196 uses inv:node-context-ref;
199 list node-connector-statistics {
200 uses stat-types:node-connector-statistics;
205 rpc get-flow-table-statistics {
207 uses inv:node-context-ref;
210 uses flow-types:flow-table-statistics;
214 notification flow-table-statistics-updated {
216 type flow:flow-table-ref;
218 uses flow-types:flow-table-statistics;
221 notification node-connector-statistics-updated {
222 uses stat-types:node-connector-statistics;