Make Raft messages serializable
[controller.git] / opendaylight / md-sal / model / model-flow-statistics / src / main / yang / opendaylight-flow-statistics.yang
1 module opendaylight-flow-statistics {
2     namespace "urn:opendaylight:flow:statistics";
3     prefix flowstat;
4
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";}
13
14
15     revision "2013-08-19" {
16         description "Initial revision of flow statistics service";
17     }
18
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";
22         uses flow-statistics;
23     }
24
25     grouping flow-statistics {
26         container flow-statistics {
27             //config "false";
28             uses flow-types:flow;
29             uses stat-types:generic-statistics;
30         }
31     }
32
33     typedef flow-id {
34         description "flow id";
35         type inet:uri;
36     }
37
38     grouping flow-and-statistics-map-list {
39         description "List of flow and statistics map";
40         list flow-and-statistics-map-list {
41             key "flow-id";
42             leaf flow-id {
43                 type flow-id;
44             }
45             uses flow-and-statistics-map;
46         }
47     }
48
49     grouping flow-and-statistics-map{
50         description "Mapping between flow and its statistics";
51         uses flow-types:flow;
52         uses stat-types:generic-statistics;
53     }
54
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";
58         input {
59             uses inv:node-context-ref;
60         }
61         output {
62             uses flow-and-statistics-map-list;
63             uses tr:transaction-aware;
64         }
65
66     }
67
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";
70         input {
71             uses inv:node-context-ref;
72             leaf table-id {
73                 type table-types:table-id;
74             }
75         }
76         output {
77             uses flow-and-statistics-map-list;
78             uses tr:transaction-aware;
79         }
80     }
81
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";
84         input {
85             uses inv:node-context-ref;
86             uses flow-types:flow;
87         }
88         output {
89             uses flow-and-statistics-map-list;
90             uses tr:transaction-aware;
91         }
92     }
93
94     notification flows-statistics-update {
95         description "Flows statistics sent by switch";
96         leaf moreReplies {
97             type boolean;
98         }
99         uses inv:node;
100         uses flow-and-statistics-map-list;
101         uses tr:transaction-aware;
102     }
103
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;
108     }
109
110     grouping aggregate-flow-statistics {
111         container aggregate-flow-statistics {
112             //config "false";
113             uses stat-types:aggregate-flow-statistics;
114         }
115     }
116
117     // RPC calls to fetch aggregate 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";
120         input {
121             uses inv:node-context-ref;
122             leaf table-id {
123                 type table-types:table-id;
124             }
125         }
126         output {
127             uses stat-types:aggregate-flow-statistics;
128             uses tr:transaction-aware;
129         }
130     }
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";
133         input {
134             uses inv:node-context-ref;
135             uses flow-types:flow;
136         }
137         output {
138             uses stat-types:aggregate-flow-statistics;
139             uses tr:transaction-aware;
140         }
141     }
142
143     notification aggregate-flow-statistics-update {
144         description "Aggregate flow statistics for a table, sent by switch";
145         uses inv:node;
146         uses stat-types:aggregate-flow-statistics;
147         uses tr:multipart-transaction-aware;
148     }
149 }