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 "2013-07-15";}
13 import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; }
15 description "Openflow statistics polling.";
17 revision "2013-08-19" {
18 description "Initial revision of flow statistics service";
21 augment "/inv:nodes/inv:node/flow-node:table/flow-node:flow" {
22 ext:augment-identifier "flow-statistics-data";
23 description "Openflow flow statistics data into the flow-capable-node->table->flow";
28 grouping flow-statistics {
29 container flow-statistics {
30 uses stat-types:generic-statistics;
35 description "flow id, TODO:: replace with inv:flow-id.";
39 grouping flow-and-statistics-map-list {
40 description "List of flow and statistics map";
41 list flow-and-statistics-map-list {
46 uses flow-and-statistics-map;
50 grouping flow-and-statistics-map{
51 description "Mapping between flow and its statistics";
53 uses stat-types:generic-statistics;
56 // RPC calls to fetch flow statistics
57 rpc get-all-flows-statistics-from-all-flow-tables {
59 description "Fetch statistics of all the flow present in all the flow tables of the switch";
61 uses inv:node-context-ref;
64 uses flow-and-statistics-map-list;
65 uses tr:transaction-aware;
70 rpc get-all-flow-statistics-from-flow-table {
72 description "Fetch statistics of all the flow present in the specific flow table of the switch";
74 uses inv:node-context-ref;
76 type table-types:table-id;
80 uses flow-and-statistics-map-list;
81 uses tr:transaction-aware;
85 rpc get-flow-statistics-from-flow-table {
87 description "Fetch statistics of the specific flow present in the specific flow table of the switch";
89 uses inv:node-context-ref;
93 uses flow-and-statistics-map-list;
94 uses tr:transaction-aware;
98 notification flows-statistics-update {
100 description "Flows statistics sent by switch";
105 uses flow-and-statistics-map-list;
106 uses tr:transaction-aware;
109 //Models for aggregate flow statistics collection
110 augment "/inv:nodes/inv:node/flow-node:table" {
112 ext:augment-identifier "aggregate-flow-statistics-data";
113 uses aggregate-flow-statistics;
116 grouping aggregate-flow-statistics {
117 container aggregate-flow-statistics {
118 uses stat-types:aggregate-flow-statistics;
122 // RPC calls to fetch aggregate flow statistics
123 rpc get-aggregate-flow-statistics-from-flow-table-for-all-flows {
125 description "Fetch aggregate statistics for all the flows present in the specific flow table of the switch";
128 uses inv:node-context-ref;
130 type table-types:table-id;
134 uses stat-types:aggregate-flow-statistics;
135 uses tr:transaction-aware;
139 rpc get-aggregate-flow-statistics-from-flow-table-for-given-match {
140 description "Fetch aggregate statistics for flows filtered by
141 - table (eventually all tables)
146 This values are contained in flow (among others).
147 TODO:: filter values should be modeled more exact - omitting unusable fields.";
150 uses inv:node-context-ref;
151 uses flow-types:flow;
154 list aggregated-flow-statistics {
155 uses stat-types:aggregate-flow-statistics;
157 uses tr:transaction-aware;
161 notification aggregate-flow-statistics-update {
164 description "Aggregate flow statistics for a table, sent by switch";
166 uses stat-types:aggregate-flow-statistics;
167 uses tr:multipart-transaction-aware;
170 augment "/multipart:multipart-reply/multipart:multipart-reply-body" {
171 case multipart-reply-flow-stats {
172 uses flow-and-statistics-map-list;
175 case multipart-reply-flow-aggregate-stats {
176 uses stat-types:aggregate-flow-statistics;