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 opendaylight-table-types {prefix table-types;revision-date "2013-10-26";}
11 import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";}
12 import flow-capable-transaction {prefix tr;}
13 import sal-flow {prefix flow;}
14 import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
17 revision "2013-08-19" {
18 description "Initial revision of flow statistics service";
21 //Augment flow statistics data to the flow-capable-node->table->flow
22 augment "/inv:nodes/inv:node/flow-node:table/flow-node:flow" {
23 ext:augment-identifier "flow-statistics-data";
27 grouping flow-statistics {
28 container flow-statistics {
31 uses stat-types:generic-statistics;
36 description "flow id";
40 grouping flow-and-statistics-map-list {
41 description "List of flow and statistics map";
42 list flow-and-statistics-map-list {
47 uses flow-and-statistics-map;
51 grouping flow-and-statistics-map{
52 description "Mapping between flow and its statistics";
54 uses stat-types:generic-statistics;
57 // RPC calls to fetch flow statistics
58 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 {
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 {
85 description "Fetch statistics of the specific flow present in the specific flow table of the switch";
87 uses inv:node-context-ref;
91 uses flow-and-statistics-map-list;
92 uses tr:transaction-aware;
96 notification flows-statistics-update {
97 description "Flows statistics sent by switch";
102 uses flow-and-statistics-map-list;
103 uses tr:transaction-aware;
106 //Models for aggregate flow statistics collection
107 augment "/inv:nodes/inv:node/flow-node:table" {
108 ext:augment-identifier "aggregate-flow-statistics-data";
109 uses aggregate-flow-statistics;
112 grouping aggregate-flow-statistics {
113 container aggregate-flow-statistics {
115 uses stat-types:aggregate-flow-statistics;
119 // RPC calls to fetch aggregate flow statistics
120 rpc get-aggregate-flow-statistics-from-flow-table-for-all-flows {
121 description "Fetch aggregate statistics for all the flows present in the specific flow table of the switch";
123 uses inv:node-context-ref;
125 type table-types:table-id;
129 uses stat-types:aggregate-flow-statistics;
130 uses tr:transaction-aware;
133 rpc get-aggregate-flow-statistics-from-flow-table-for-given-match {
134 description "Fetch aggregate statistics for all the flow matches to the given match from the given table of the switch";
136 uses inv:node-context-ref;
137 uses flow-types:flow;
140 uses stat-types:aggregate-flow-statistics;
141 uses tr:transaction-aware;
145 notification aggregate-flow-statistics-update {
146 description "Aggregate flow statistics for a table, sent by switch";
151 uses stat-types:aggregate-flow-statistics;
152 uses tr:transaction-aware;