Fixed publishDataChangeEvent in 2phase commit
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / opendaylight-table-types.yang
1 module opendaylight-table-types {
2     namespace "urn:opendaylight:table:types";
3     prefix table;
4
5     import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
6     import opendaylight-action-types {prefix action;}
7
8     revision "2013-10-26" {
9         description "Initial revision of table service";
10     }
11
12     typedef table-id {
13         type uint8;
14     }
15
16     typedef table-ref {
17         type instance-identifier;
18     }
19     
20     typedef table-config {
21         type bits {
22             bit DEPRECATED-MASK;
23         }
24     }
25
26     // field types
27     identity match-field {
28         description "Base identity for match Fields";
29     }
30
31     identity in_port {
32         base match-field;
33         description "Match for Switch input port.";
34     }
35     identity in_phy_port {
36         base match-field;
37         description "Match for Switch physical input port.";
38     }
39     identity metadata {
40         base match-field;
41         description "Match for Metadata passed between tables.";
42     }
43     identity eth_dst {
44         base match-field;
45         description "Match for Ethernet destination address.";
46     }
47     identity eth_src {
48         base match-field;
49         description "Match for Ethernet source address.";
50     }
51     identity eth_type {
52         base match-field;
53         description "Match for Ethernet frame type.";
54     }
55     identity vlan_vid {
56         base match-field;
57         description "Match for VLAN id.";
58     }
59     identity vlan_pcp {
60         base match-field;
61         description "Match for VLAN priority.";
62     }
63     identity ip_dscp {
64         base match-field;
65         description "Match for IP DSCP (6 bits in ToS field).";
66     }
67     identity ip_ecn {
68         base match-field;
69         description "Match for IP ECN (2 bits in ToS field).";
70     }
71     identity ip_proto {
72         base match-field;
73         description "Match for IP protocol.";
74     }
75     identity ipv4_src {
76         base match-field;
77         description "Match for IPv4 source address.";
78     }
79     identity ipv4_dst {
80         base match-field;
81         description "Match for IPv4 destination address.";
82     }
83     identity tcp_src {
84         base match-field;
85         description "Match for TCP source port.";
86     }
87     identity tcp_dst {
88         base match-field;
89         description "Match for TCP destination port.";
90     }
91     identity udp_src {
92         base match-field;
93         description "Match for UDP source port.";
94     }
95     identity udp_dst {
96         base match-field;
97         description "Match for UDP destination port.";
98     }
99     identity sctp_src {
100         base match-field;
101         description "Match for SCTP source port.";
102     }
103     identity sctp_dst {
104         base match-field;
105         description "Match for SCTP destination port.";
106     }
107     identity icmpv4_type {
108         base match-field;
109         description "Match for ICMP type.";
110     }
111     identity icmpv4_code {
112         base match-field;
113         description "Match for ICMP code.";
114     }
115     identity arp_op {
116         base match-field;
117         description "Match for ARP opcode.";
118     }
119     identity arp_spa {
120         base match-field;
121         description "Match for ARP source IPv4 address.";
122     }
123     identity arp_tpa {
124         base match-field;
125         description "Match for ARP target IPv4 address.";
126     }
127     identity arp_sha {
128         base match-field;
129         description "Match for ARP source hardware address.";
130     }
131     identity arp_tha {
132         base match-field;
133         description "Match for ARP target hardware address.";
134     }
135     identity ipv6_src {
136         base match-field;
137         description "Match for IPv6 source address.";
138     }
139     identity ipv6_dst {
140         base match-field;
141         description "Match for IPv6 destination address.";
142     }
143     identity ipv6_flabel {
144         base match-field;
145         description "Match for IPv6 Flow Label";
146     }
147     identity icmpv6_type {
148         base match-field;
149         description "Match for ICMPv6 type.";
150     }
151     identity icmpv6_code {
152         base match-field;
153         description "Match for ICMPv6 code.";
154     }
155     identity ipv6_nd_target {
156         base match-field;
157         description "Match for Target address for ND.";
158     }
159     identity ipv6_nd_sll {
160         base match-field;
161         description "Match for Source link-layer for ND.";
162     }
163     identity ipv6_nd_tll {
164         base match-field;
165         description "Match for Target link-layer for ND.";
166     }
167     identity mpls_label {
168         base match-field;
169         description "Match for MPLS label.";
170     }
171     identity mpls_tc {
172         base match-field;
173         description "Match for MPLS TC.";
174     }
175     identity mpls_bos {
176         base match-field;
177         description "Match for MPLS BoS bit.";
178     }
179     identity pbb_isid {
180         base match-field;
181         description "Match for PBB I-SID.";
182     }
183     identity tunnel_id {
184         base match-field;
185         description "Match for Logical Port Metadata";
186     }
187     identity ipv6_exthdr {
188         base match-field;
189         description "Match for IPv6 Extension Header pseudo-field";
190     }
191         
192     grouping set-field-match {
193         list set-field-match {
194             leaf match-type {
195                 type identityref {
196                     base match-field;
197                 }
198             }
199             leaf has-mask {
200                 type boolean;
201             } 
202         }
203     }
204       
205     grouping table-feature-prop-type {
206         choice table-feature-prop-type {
207             case instructions { 
208                 container instructions {
209                     uses flow:instruction-list;
210                 } 
211             }
212             
213             case instructions-miss {   
214                 container instructions-miss {
215                     uses flow:instruction-list;
216                 } 
217             }
218
219             case next-table {   
220                 container tables {
221                     leaf-list table-ids {
222                         type uint8;
223                     }
224                 } 
225             }
226             
227             case next-table-miss {   
228                 container tables-miss {
229                     leaf-list table-ids {
230                         type uint8;
231                     }
232                 } 
233             }
234             
235             case write-actions {   
236                 container write-actions {
237                     uses action:action-list;
238                 } 
239             }
240             
241             case write-actions-miss {   
242                 container write-actions-miss {
243                     uses action:action-list;
244                 } 
245             }
246             
247             case apply-actions {   
248                 container apply-actions {
249                     uses action:action-list;
250                 } 
251             }
252             
253             case apply-actions-miss {   
254                 container apply-actions-miss {
255                     uses action:action-list;
256                 } 
257             }
258             
259             case match {
260                         container match-setfield {
261                     uses set-field-match; 
262                         }
263             }
264             
265             case wildcards {   
266                         container wildcard-setfield {
267                     uses set-field-match;
268                 }
269             }
270             
271             case write-setfield {   
272                         container write-setfield {
273                     uses set-field-match;
274                 }
275             }
276             
277             case write-setfield-miss {   
278                 container write-setfield-miss {
279                     uses set-field-match;
280                 }
281             }
282             
283             case apply-setfield {   
284                 container apply-setfield {
285                     uses set-field-match; 
286                 }
287             }
288             
289             case apply-setfield-miss {   
290                 container apply-setfield-miss {
291                     uses set-field-match; 
292                 }
293             }
294         }
295     } 
296     
297     grouping table-features {
298         list table-features {
299             key "table-id";
300             
301             leaf table-id {
302                 type uint8;
303             }      
304             
305             leaf name {
306                 description "Name of the table";
307                 type string;               
308             }
309             
310             leaf metadata-match {
311                 description "Bits of metadata table can match";
312                 type uint64;                
313             }
314             
315             leaf metadata-write {
316                 description "Bits of metadata table can write";
317                 type uint64;                
318             }
319             
320             leaf max-entries {
321                 description "Max number of entries supported";
322                 type uint32;                
323             }
324             
325             leaf config {
326                 description "Bitmap of OFPTC_ values";
327                 type table-config;
328             }
329             
330             container table-properties {
331                 list table-feature-properties {
332                      key "order";
333                      leaf order {
334                          type int32;
335                      }
336                      uses table-feature-prop-type;
337                 }
338             }
339         }
340     }    
341 }