Update context-instance xpath format according to latest changes in config-api yang.
[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 {
77             
78         leaf group-id {
79             type int32;
80         }
81         
82         leaf ref-count {
83             type yang:counter32;
84         }
85         
86         leaf packet-count {
87             type yang:counter64;
88         } 
89         
90         leaf byte-count {
91             type yang:counter64;
92         }
93
94         container duration {
95             leaf second {
96                 type yang:counter32;
97             }
98             leaf nanosecond {
99                 type yang:counter32;
100             }
101         }
102         
103         container buckets {
104             list bucket-counter {
105                 key "order";
106                 leaf order {
107                     type int32;
108                 }
109                 
110                 leaf packet-count {
111                     type yang:counter64;
112                 } 
113         
114                 leaf byte-count {
115                     type yang:counter64;
116                 }
117             }
118         }       
119     }
120
121     grouping group-features {
122         uses group-types;
123             
124         leaf capabilities { 
125                 type enumeration {
126                 enum select-weight;
127                 enum select-liveness;
128                 enum chaining;
129                 enum chaining-checks;
130             }   
131         }
132
133         leaf-list max-groups {
134             type uint32;
135             description "Maximum number of groups for each type";
136             max-elements 4;
137         }
138             
139         leaf-list actions {
140             type uint32;
141             description "Bitmap number OFPAT_* that are supported";
142             max-elements 4;
143         }
144     }
145     
146     grouping group-statistics-request {
147         list group-stats {
148             key "group-id";         
149             
150             leaf group-id {
151                 type int32;
152             }           
153         }
154     }
155     
156     
157     grouping group-statistics-reply {
158         
159         list group-stats {
160             key "group-stats-order";
161             leaf group-stats-order {
162                 type int32;
163             }
164             
165             uses group-statistics;
166         }
167     }
168     
169     grouping group-desc-stats-reply {
170         
171         list group-desc-stats {
172             key "order-id";         
173             leaf order-id {
174                 type int32;
175             }
176             
177             uses group;
178         }
179     }
180     
181     grouping group-features-reply {
182         uses group-features;
183     }
184     
185 }