Fixed bug with groupRef and meterRef in group and meter models.
[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-flow-types {prefix flow-types;revision-date 2013-10-26";}
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         container buckets {
45             list bucket {
46                 key "order";
47                 leaf order {
48                     type int32;
49                 }
50                 
51                 leaf weight {
52                     type uint16;
53                 }
54                 
55                 leaf watch_port {
56                     type uint32;
57                 }
58                 
59                 leaf watch_group {
60                     type uint32;
61                 }
62                 
63                 container actions {
64                     list action {
65                         key "action-order";
66                         leaf action-order {
67                             type int32;
68                         }
69             
70                         uses flow-types:action;
71                     }
72                 }
73             }
74         }
75     }
76     
77     grouping group-statistics-request {
78         list group-stats {
79             key "group-id";         
80             
81             leaf group-id {
82                 type int32;
83             }           
84         }
85     }
86     
87     grouping group-statistics {
88             
89         leaf group-id {
90             type int32;
91         }
92         
93         leaf ref-count {
94             type yang:counter32;
95         }
96         
97         leaf packet-count {
98             type yang:counter64;
99         } 
100         
101         leaf byte-count {
102             type yang:counter64;
103         }
104
105         container duration {
106             leaf second {
107                 type yang:counter32;
108             }
109             leaf nanosecond {
110                 type yang:counter32;
111             }
112         }
113         
114         container buckets {
115             list bucket-counter {
116                 key "order";
117                 leaf order {
118                     type int32;
119                 }
120                 
121                 leaf packet-count {
122                     type yang:counter64;
123                 } 
124         
125                 leaf byte-count {
126                     type yang:counter64;
127                 }
128             }
129         }       
130     }
131
132     grouping group-statistics-reply {
133         list group-stats {
134             key "group-stats-order";
135             leaf group-stats-order {
136                 type int32;
137             }
138             
139             uses group-statistics;
140         }
141     }
142     
143     grouping group-desc-stats {
144         list group-desc-stats {
145             key "order-id";         
146             
147             leaf order-id {
148                 type int32;
149             }
150             
151             uses group;
152         }
153     }
154     
155     grouping group-features {
156         list group-features {
157             key "order";
158             leaf order {
159                 type int32;
160             }
161             
162             uses group-types;
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 }