Bump MRI upstreams
[openflowplugin.git] / model / model-flow-base / src / main / yang / opendaylight-group-types.yang
1 module opendaylight-group-types {
2     namespace "urn:opendaylight:group:types";
3     prefix group;
4
5     import ietf-yang-types {prefix yang; revision-date "2013-07-15";}
6     import opendaylight-action-types {prefix action;}
7     import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; }
8     import openflow-types { prefix oft; revision-date "2013-07-31"; }
9
10     revision "2013-10-18" {
11         description "Initial revision of group service";
12     }
13
14     typedef group-id {
15         type uint32;
16     }
17
18     typedef bucket-id {
19         type uint32;
20     }
21
22     typedef group-types {
23         type enumeration {
24             enum group-all;
25             enum group-select;
26             enum group-indirect;
27             enum group-ff;
28         }
29     }
30
31     typedef group-capabilities {
32         type enumeration {
33             enum select-weight;
34             enum select-liveness;
35             enum chaining;
36             enum chaining-checks;
37         }
38     }
39
40     identity group-type {
41         description "Base identity for all the available group types";
42     }
43
44     identity group-all {
45         base group-type;
46         description "All (multicast/broadcast) group";
47     }
48
49     identity group-select {
50         base group-type;
51         description "Select group";
52     }
53
54     identity group-indirect {
55         base group-type;
56         description "Indirect group";
57     }
58
59     identity group-ff {
60         base group-type;
61         description "Fast failover group";
62     }
63
64     identity group-capability {
65         description "Base identity for all the supported group capabilities";
66     }
67
68     identity select-weight{
69         base group-capability;
70         description "Support weight for select groups";
71     }
72
73     identity select-liveness{
74         base group-capability;
75         description "Support liveness for select groups";
76     }
77
78     identity chaining{
79         base group-capability;
80         description "Support chaining groups";
81     }
82
83     identity chaining-checks{
84         base group-capability;
85         description "Check chaining for loops and delete";
86     }
87
88     typedef group-ref {
89         type instance-identifier;
90     }
91
92     grouping group {
93
94         leaf group-type {
95             type group-types;
96         }
97
98         leaf group-id {
99             type group-id;
100         }
101
102         leaf group-name {
103             type string;
104         }
105
106         leaf container-name {
107             type string;
108         }
109
110         leaf barrier {
111             type boolean;
112         }
113
114         container buckets {
115             list bucket {
116                 key "bucket-id";
117                 leaf bucket-id {
118                     type bucket-id;
119                 }
120
121                 leaf weight {
122                     type uint16;
123                 }
124
125                 leaf watch_port {
126                     type uint32;
127                 }
128
129                 leaf watch_group {
130                     type uint32;
131                 }
132
133                 uses action:action-list;
134             }
135         }
136     }
137
138     grouping group-statistics {
139
140         leaf group-id {
141             type group-id;
142         }
143
144         leaf ref-count {
145             type yang:counter32;
146         }
147
148         leaf packet-count {
149             type yang:counter64;
150         }
151
152         leaf byte-count {
153             type yang:counter64;
154         }
155
156         container duration {
157             leaf second {
158                 type yang:counter32;
159             }
160             leaf nanosecond {
161                 type yang:counter32;
162             }
163         }
164
165         container buckets {
166             list bucket-counter {
167                 key "bucket-id";
168                 leaf bucket-id {
169                     type bucket-id;
170                 }
171
172                 leaf packet-count {
173                     type yang:counter64;
174                 }
175
176                 leaf byte-count {
177                     type yang:counter64;
178                 }
179             }
180         }
181     }
182
183     grouping group-features {
184
185         leaf-list group-types-supported {
186             type identityref {
187                 base group-type;
188             }
189         }
190
191         leaf-list group-capabilities-supported {
192             type identityref {
193                 base group-capability;
194             }
195         }
196
197         leaf-list max-groups {
198             type uint32;
199             description "Maximum number of groups for each type";
200             max-elements 4;
201             ordered-by user;
202         }
203
204         leaf-list actions {
205             type uint32;
206             description "Bitmap number OFPAT_* that are supported";
207             max-elements 4;
208             ordered-by user;
209         }
210     }
211
212     grouping group-statistics-request {
213         list group-stats {
214             key "group-id";
215             leaf group-id {
216                 type group-id;
217             }
218         }
219     }
220
221
222     grouping group-statistics-reply {
223
224         list group-stats {
225             key "group-id";
226             uses group-statistics;
227         }
228     }
229
230     grouping group-desc-stats-reply {
231
232         list group-desc-stats {
233             key "group-id";
234             uses group;
235         }
236     }
237
238     grouping group-features-reply {
239         uses group-features;
240     }
241
242     grouping groups {
243         list group {
244             key "group-id";
245
246             uses group;
247         }
248
249         // BE-RECON: Modification for including stale-group for Reconciliation
250         list stale-group {
251             key "group-id";
252
253             uses group;
254         }
255     }
256
257     container group-message {
258         uses group;
259         uses ofproto:ofHeader;
260
261         leaf command {
262             type oft:group-mod-command;
263         }
264     }
265 }