1 module opendaylight-flow-statistics {
2 namespace "urn:opendaylight:flow:statistics";
5 import yang-ext {prefix ext; revision-date "2013-07-09";}
6 import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
7 import opendaylight-flow-types {prefix flow-types;revision-date "2013-10-26";}
8 import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";}
9 import opendaylight-table-types {prefix table-types;revision-date "2013-10-26";}
10 import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";}
11 import flow-capable-transaction {prefix tr;}
12 import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
14 description "Openflow statistics polling.";
16 revision "2013-08-19" {
17 description "Initial revision of flow statistics service";
20 augment "/inv:nodes/inv:node/flow-node:table/flow-node:flow" {
21 ext:augment-identifier "flow-statistics-data";
22 description "Openflow flow statistics data into the flow-capable-node->table->flow";
27 grouping flow-statistics {
28 container flow-statistics {
29 uses stat-types:generic-statistics;
34 description "flow id, TODO:: replace with inv: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 {
58 description "Fetch statistics of all the flow present in all the flow tables of the switch";
60 uses inv:node-context-ref;
63 uses flow-and-statistics-map-list;
64 uses tr:transaction-aware;
69 rpc get-all-flow-statistics-from-flow-table {
71 description "Fetch statistics of all the flow present in the specific flow table of the switch";
73 uses inv:node-context-ref;
75 type table-types:table-id;
79 uses flow-and-statistics-map-list;
80 uses tr:transaction-aware;
84 rpc get-flow-statistics-from-flow-table {
86 description "Fetch statistics of the specific flow present in the specific flow table of the switch";
88 uses inv:node-context-ref;
92 uses flow-and-statistics-map-list;
93 uses tr:transaction-aware;
97 notification flows-statistics-update {
99 description "Flows statistics sent by switch";
104 uses flow-and-statistics-map-list;
105 uses tr:transaction-aware;
108 //Models for aggregate flow statistics collection
109 augment "/inv:nodes/inv:node/flow-node:table" {
111 ext:augment-identifier "aggregate-flow-statistics-data";
112 uses aggregate-flow-statistics;
115 grouping aggregate-flow-statistics {
116 container aggregate-flow-statistics {
117 uses stat-types:aggregate-flow-statistics;
121 // RPC calls to fetch aggregate flow statistics
122 rpc get-aggregate-flow-statistics-from-flow-table-for-all-flows {
124 description "Fetch aggregate statistics for all the flows present in the specific flow table of the switch";
127 uses inv:node-context-ref;
129 type table-types:table-id;
133 uses stat-types:aggregate-flow-statistics;
134 uses tr:transaction-aware;
138 rpc get-aggregate-flow-statistics-from-flow-table-for-given-match {
139 description "Fetch aggregate statistics for flows filtered by
140 - table (eventually all tables)
145 This values are contained in flow (among others).
146 TODO:: filter values should be modeled more exact - omitting unusable fields.";
149 uses inv:node-context-ref;
150 uses flow-types:flow;
153 list aggregated-flow-statistics {
154 uses stat-types:aggregate-flow-statistics;
156 uses tr:transaction-aware;
160 notification aggregate-flow-statistics-update {
163 description "Aggregate flow statistics for a table, sent by switch";
165 uses stat-types:aggregate-flow-statistics;
166 uses tr:multipart-transaction-aware;