BUG-9223:Remove hardcoded value of lldp interval
[openflowplugin.git] / 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     identity tcp_flags {
192         base match-field;
193         description "TCP Flags Match";
194     }
195     identity tunnel_ipv4_dst {
196         base match-field;
197         description "IPv4 destination tunnel endpoint address.";
198     }
199     identity tunnel_ipv4_src {
200         base match-field;
201         description "IPv4 source tunnel endpoint address.";
202     }
203
204     grouping set-field-match {
205         list set-field-match {
206             key "match-type";
207             leaf match-type {
208                 type identityref {
209                     base match-field;
210                 }
211             }
212             leaf has-mask {
213                 type boolean;
214             } 
215         }
216     }
217       
218     grouping table-feature-prop-type {
219         choice table-feature-prop-type {
220             case instructions { 
221                 container instructions {
222                     uses flow:instruction-list;
223                 } 
224             }
225             
226             case instructions-miss {   
227                 container instructions-miss {
228                     uses flow:instruction-list;
229                 } 
230             }
231
232             case next-table {   
233                 container tables {
234                     leaf-list table-ids {
235                         type uint8;
236                     }
237                 } 
238             }
239             
240             case next-table-miss {   
241                 container tables-miss {
242                     leaf-list table-ids {
243                         type uint8;
244                     }
245                 } 
246             }
247             
248             case write-actions {   
249                 container write-actions {
250                     uses action:action-list;
251                 } 
252             }
253             
254             case write-actions-miss {   
255                 container write-actions-miss {
256                     uses action:action-list;
257                 } 
258             }
259             
260             case apply-actions {   
261                 container apply-actions {
262                     uses action:action-list;
263                 } 
264             }
265             
266             case apply-actions-miss {   
267                 container apply-actions-miss {
268                     uses action:action-list;
269                 } 
270             }
271             
272             case match {
273                         container match-setfield {
274                     uses set-field-match; 
275                         }
276             }
277             
278             case wildcards {   
279                         container wildcard-setfield {
280                     uses set-field-match;
281                 }
282             }
283             
284             case write-setfield {   
285                         container write-setfield {
286                     uses set-field-match;
287                 }
288             }
289             
290             case write-setfield-miss {   
291                 container write-setfield-miss {
292                     uses set-field-match;
293                 }
294             }
295             
296             case apply-setfield {   
297                 container apply-setfield {
298                     uses set-field-match; 
299                 }
300             }
301             
302             case apply-setfield-miss {   
303                 container apply-setfield-miss {
304                     uses set-field-match; 
305                 }
306             }
307         }
308     } 
309     
310     grouping table-features {
311         list table-features {
312             key "table-id";
313             
314             leaf table-id {
315                 type uint8;
316             }      
317             
318             leaf name {
319                 description "Name of the table";
320                 type string;               
321             }
322             
323             leaf metadata-match {
324                 description "Bits of metadata table can match";
325                 type uint64;                
326             }
327             
328             leaf metadata-write {
329                 description "Bits of metadata table can write";
330                 type uint64;                
331             }
332             
333             leaf max-entries {
334                 description "Max number of entries supported";
335                 type uint32;                
336             }
337             
338             leaf config {
339                 description "Bitmap of OFPTC_ values";
340                 type table-config;
341             }
342             
343             container table-properties {
344                 list table-feature-properties {
345                      key "order";
346                      uses action:ordered;
347                      uses table-feature-prop-type;
348                 }
349             }
350         }
351     }    
352 }