685728a88709cac4396294e375f22943113de17c
[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     grouping group {
29         
30         uses group-types;
31         
32         leaf group-id {
33             type group-id;
34         }
35         
36         leaf group-name {
37             type string;
38         }
39         
40         leaf container-name {
41             type string; 
42         }
43         
44         leaf install {
45             type boolean; 
46         } 
47         
48         leaf barrier {
49             type boolean; 
50         }       
51         
52         container buckets {
53             list bucket {
54                 key "order";
55                 leaf order {
56                     type int32;
57                 }
58                 
59                 leaf weight {
60                     type uint16;
61                 }
62                 
63                 leaf watch_port {
64                     type uint32;
65                 }
66                 
67                 leaf watch_group {
68                     type uint32;
69                 }
70                 
71                 uses action:action-list;
72             }
73         }
74     }
75     
76     grouping group-statistics-request {
77         list group-stats {
78             key "group-id";         
79             
80             leaf group-id {
81                 type int32;
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-statistics-reply {
132         list group-stats {
133             key "group-stats-order";
134             leaf group-stats-order {
135                 type int32;
136             }
137             
138             uses group-statistics;
139         }
140     }
141     
142     grouping group-desc-stats {
143         list group-desc-stats {
144             key "order-id";         
145             
146             leaf order-id {
147                 type int32;
148             }
149             
150             uses group;
151         }
152     }
153     
154     grouping group-features {
155         list group-features {
156             key "order";
157             leaf order {
158                 type int32;
159             }
160             
161             uses group-types;
162             
163             leaf capabilities { 
164                 type enumeration {
165                     enum select-weight;
166                     enum select-liveness;
167                     enum chaining;
168                     enum chaining-checks;
169                 }   
170             }
171
172             leaf-list max-groups {
173                 type uint32;
174                 description "Maximum number of groups for each type";
175                 max-elements 4;
176             }
177             
178             leaf-list actions {
179                 type uint32;
180                 description "Bitmap number OFPAT_* that are supported";
181                 max-elements 4;
182             }
183         }
184     }    
185 }