Merge "Update context-instance xpath format according to latest changes in config...
[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     grouping group-types {
18         leaf group-type {
19             type enumeration {
20                 enum group-all;
21                 enum group-select;
22                 enum group-indirect;
23                 enum group-ff;
24             }
25         }
26     }
27     
28     typedef group-capabilities { 
29                 type enumeration {
30                 enum select-weight;
31                 enum select-liveness;
32                 enum chaining;
33                 enum chaining-checks;
34             }   
35         }
36     
37     
38     grouping group {
39         
40         uses group-types;
41         
42         leaf group-id {
43             type group-id;
44         }
45         
46         leaf group-name {
47             type string;
48         }
49         
50         leaf container-name {
51             type string; 
52         }
53         
54         leaf install {
55             type boolean; 
56         } 
57         
58         leaf barrier {
59             type boolean; 
60         }       
61         
62         container buckets {
63             list bucket {
64                 key "order";
65                 leaf order {
66                     type int32;
67                 }
68                 
69                 leaf weight {
70                     type uint16;
71                 }
72                 
73                 leaf watch_port {
74                     type uint32;
75                 }
76                 
77                 leaf watch_group {
78                     type uint32;
79                 }
80                 
81                 uses action:action-list;
82             }
83         }
84     }
85     
86     grouping group-statistics {
87             
88         leaf group-id {
89             type int32;
90         }
91         
92         leaf ref-count {
93             type yang:counter32;
94         }
95         
96         leaf packet-count {
97             type yang:counter64;
98         } 
99         
100         leaf byte-count {
101             type yang:counter64;
102         }
103
104         container duration {
105             leaf second {
106                 type yang:counter32;
107             }
108             leaf nanosecond {
109                 type yang:counter32;
110             }
111         }
112         
113         container buckets {
114             list bucket-counter {
115                 key "order";
116                 leaf order {
117                     type int32;
118                 }
119                 
120                 leaf packet-count {
121                     type yang:counter64;
122                 } 
123         
124                 leaf byte-count {
125                     type yang:counter64;
126                 }
127             }
128         }       
129     }
130
131     grouping group-features {
132         leaf types {
133             type bits {
134                 bit group-all;
135                 bit group-select;
136                 bit group-indirect;
137                 bit group-ff;
138             }
139         }
140             
141         leaf capabilities { 
142                 type bits {
143                 bit select-weight;
144                 bit select-liveness;
145                 bit chaining;
146                 bit chaining-checks;
147             }   
148         }
149
150         leaf-list max-groups {
151             type uint32;
152             description "Maximum number of groups for each type";
153             max-elements 4;
154         }
155             
156         leaf-list actions {
157             type uint32;
158             description "Bitmap number OFPAT_* that are supported";
159             max-elements 4;
160         }
161     }
162     
163     grouping group-statistics-request {
164         list group-stats {
165             key "group-id";         
166             
167             leaf group-id {
168                 type int32;
169             }           
170         }
171     }
172     
173     
174     grouping group-statistics-reply {
175         
176         list group-stats {
177             key "group-stats-order";
178             leaf group-stats-order {
179                 type int32;
180             }
181             
182             uses group-statistics;
183         }
184     }
185     
186     grouping group-desc-stats-reply {
187         
188         list group-desc-stats {
189             key "order-id";         
190             leaf order-id {
191                 type int32;
192             }
193             
194             uses group;
195         }
196     }
197     
198     grouping group-features-reply {
199         uses group-features;
200     }
201     
202 }