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