2a16bfcf503e41369912ea646c0cc974737528a3
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / table-types.yang
1 module opendaylight-table-types {
2     namespace "urn:opendaylight:table:types";
3     prefix table;
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;revision-date 2013-10-26";}
8     import opendaylight-action-types {prefix action;}
9
10     revision "2013-10-26" {
11         description "Initial revision of table service";
12     }
13
14     typedef table-ref {
15         type instance-identifier;
16     }
17     
18     typedef table-config {
19         type bits {
20             bit DEPRECATED-MASK;
21         }
22     }  
23       
24     grouping table-feature-prop-type {
25         choice table-feature-prop-type {
26             case instructions { 
27                 container instructions {
28                     uses flow:instruction-list;
29                 } 
30             }
31             
32             case instructions-miss {   
33                 container instructions-miss {
34                     uses flow:instruction-list;
35                 } 
36             }
37
38             case next-table {   
39                 container tables {
40                     list table-id {
41                         key "table";                        
42                         
43                         leaf table-id {
44                             type table-ref;
45                         } 
46                     }
47                 } 
48             }
49             
50             case next-table-miss {   
51                 container tables {
52                     list table-id {
53                         key "table-id";                        
54                         
55                         leaf table-id {
56                             type table-ref;
57                         } 
58                     }
59                 } 
60             }
61             
62             case write-actions {   
63                 container write-actions {
64                     uses action:action-list;
65                 } 
66             }
67             
68             case write-actions-miss {   
69                 container write-actions-miss {
70                     uses action:action-list;
71                 } 
72             }
73             
74             case apply-actions {   
75                 container apply-actions {
76                     uses action:action-list;
77                 } 
78             }
79             
80             case apply-actions-miss {   
81                 container apply-actions-miss {
82                     uses action:action-list;
83                 } 
84             }
85             
86             case match {   
87                 container matches {
88                     leaf-list match {                                              
89                         type uint32;
90                     }
91                 } 
92             }
93             
94             case wildcards {   
95                 container wildcards {
96                     leaf-list wildcard {                                              
97                         type uint32;
98                     }
99                 } 
100             }
101             
102             case write-setfield {   
103                 container write-setfield {
104                     leaf-list setfield {                                              
105                         type uint32;
106                     }
107                 } 
108             }
109             
110             case write-setfield-miss {   
111                 container write-setfield-miss {
112                     leaf-list setfield {                                              
113                         type uint32;
114                     }
115                 } 
116             }
117             
118             case apply-setfield {   
119                 container apply-setfield {
120                     leaf-list setfield {                                              
121                         type uint32;
122                     }
123                 } 
124             }
125             
126             case apply-setfield-miss {   
127                 container apply-setfield-miss {
128                     leaf-list setfield {                                              
129                         type uint32;
130                     }
131                 } 
132             }
133         }
134     } 
135     
136     grouping table-features {
137         list table-features {
138             key "table-id";
139             
140             leaf table-id {
141                 type table-ref;
142             }      
143             
144             leaf name {
145                 description "Name of the table";
146                 type string;               
147             }
148             
149             leaf metadata-match {
150                 description "Bits of metadata table can match";
151                 type uint64;                
152             }
153             
154             leaf metadata-write {
155                 description "Bits of metadata table can write";
156                 type uint64;                
157             }
158             
159             leaf max-entries {
160                 description "Max number of entries supported";
161                 type uint32;                
162             }
163             
164             leaf config {
165                 description "Bitmap of OFPTC_ values";
166                 type table-config;
167             }
168             
169             container table-properties {
170                 list instruction-id {
171                     key "order";
172                     leaf order {
173                         type int32;
174                     }
175                     
176                     uses table-feature-prop-type;
177                 }
178             }
179         }
180     }    
181 }