e0f60e4054e4b919fc5303ec4b062b6a3d1bce07
[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;}
6     import ietf-yang-types {prefix yang;}
7     import opendaylight-flow-types {prefix flow-types;}
8
9     revision "2013-09-18" {
10         description "Initial revision of group service";
11     }
12
13     typedef group-ref {
14         type instance-identifier;
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-ref;
34         }
35         
36         container buckets {
37             list bucket {
38                 key "order";
39                 leaf order {
40                     type int32;
41                 }
42                 
43                 leaf weight {
44                     type uint16;
45                 }
46                 
47                 leaf watch_port {
48                     type uint32;
49                 }
50                 
51                 leaf watch_group {
52                     type uint32;
53                 }
54                 
55                 container actions {
56                     list action {
57                         key "action-order";
58                         leaf action-order {
59                             type int32;
60                         }
61             
62                         uses flow-types:action;
63                     }
64                 }
65             }
66         }
67     }
68     
69     grouping group-statistics-request {
70         list group-stats {
71             key "group-id";         
72             
73             leaf group-id {
74                 type int32;
75             }           
76         }
77     }
78     
79     grouping group-statistics {
80             
81         leaf group-id {
82             type int32;
83         }
84         
85         leaf ref-count {
86             type yang:counter32;
87         }
88         
89         leaf packet-count {
90             type yang:counter64;
91         } 
92         
93         leaf byte-count {
94             type yang:counter64;
95         }
96
97         container duration {
98             leaf second {
99                 type yang:counter32;
100             }
101             leaf nanosecond {
102                 type yang:counter32;
103             }
104         }
105         
106         container buckets {
107             list bucket-counter {
108                 key "order";
109                 leaf order {
110                     type int32;
111                 }
112                 
113                 leaf packet-count {
114                     type yang:counter64;
115                 } 
116         
117                 leaf byte-count {
118                     type yang:counter64;
119                 }
120             }
121         }       
122     }
123
124     grouping group-statistics-reply {
125         list group-stats {
126             key "group-stats-order";
127             leaf group-stats-order {
128                 type int32;
129             }
130             
131             uses group-statistics;
132         }
133     }
134     
135     grouping group-desc-stats {
136         list group-desc-stats {
137             key "order-id";         
138             
139             leaf order-id {
140                 type int32;
141             }
142             
143             uses group;
144         }
145     }
146     
147     grouping group-features {
148         list group-features {
149             key "order";
150             leaf order {
151                 type int32;
152             }
153             
154             uses group-types;
155             type capabilities {
156                 enum select-weight;
157                 enum select-liveness;
158                 enum chaining;
159                 enum chaining-checks;
160             }   
161
162             leaf-list max-groups {
163                 type uint32;
164                 description "Maximum number of groups for each type";
165                 max-elements 4;
166             }
167             
168             leaf-list actions {
169                 type uint32;
170                 description "Bitmap number OFPAT_* that are supported";
171                 max-elements 4;
172             }
173         }
174     }    
175 }