Merge "creating a default subnet"
[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         leaf barrier {
45             type boolean; 
46         }       
47         
48         container buckets {
49             list bucket {
50                 key "order";
51                 leaf order {
52                     type int32;
53                 }
54                 
55                 leaf weight {
56                     type uint16;
57                 }
58                 
59                 leaf watch_port {
60                     type uint32;
61                 }
62                 
63                 leaf watch_group {
64                     type uint32;
65                 }
66                 
67                 container actions {
68                     list action {
69                         key "action-order";
70                         leaf action-order {
71                             type int32;
72                         }
73             
74                         uses flow-types:action;
75                     }
76                 }
77             }
78         }
79     }
80     
81     grouping group-statistics-request {
82         list group-stats {
83             key "group-id";         
84             
85             leaf group-id {
86                 type int32;
87             }           
88         }
89     }
90     
91     grouping group-statistics {
92             
93         leaf group-id {
94             type int32;
95         }
96         
97         leaf ref-count {
98             type yang:counter32;
99         }
100         
101         leaf packet-count {
102             type yang:counter64;
103         } 
104         
105         leaf byte-count {
106             type yang:counter64;
107         }
108
109         container duration {
110             leaf second {
111                 type yang:counter32;
112             }
113             leaf nanosecond {
114                 type yang:counter32;
115             }
116         }
117         
118         container buckets {
119             list bucket-counter {
120                 key "order";
121                 leaf order {
122                     type int32;
123                 }
124                 
125                 leaf packet-count {
126                     type yang:counter64;
127                 } 
128         
129                 leaf byte-count {
130                     type yang:counter64;
131                 }
132             }
133         }       
134     }
135
136     grouping group-statistics-reply {
137         list group-stats {
138             key "group-stats-order";
139             leaf group-stats-order {
140                 type int32;
141             }
142             
143             uses group-statistics;
144         }
145     }
146     
147     grouping group-desc-stats {
148         list group-desc-stats {
149             key "order-id";         
150             
151             leaf order-id {
152                 type int32;
153             }
154             
155             uses group;
156         }
157     }
158     
159     grouping group-features {
160         list group-features {
161             key "order";
162             leaf order {
163                 type int32;
164             }
165             
166             uses group-types;
167             leaf capabilities { 
168                 type enumeration {
169                     enum select-weight;
170                     enum select-liveness;
171                     enum chaining;
172                     enum chaining-checks;
173                 }   
174             }
175
176             leaf-list max-groups {
177                 type uint32;
178                 description "Maximum number of groups for each type";
179                 max-elements 4;
180             }
181             
182             leaf-list actions {
183                 type uint32;
184                 description "Bitmap number OFPAT_* that are supported";
185                 max-elements 4;
186             }
187         }
188     }    
189 }