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