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