Merge "BUG-6890:Flow-Removed Notification configuration"
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / main / yang / nicira-match.yang
1 module nicira-match {
2     yang-version 1;
3
4     namespace "urn:opendaylight:openflowjava:nx:match";
5     prefix "nicira-match";
6
7     import openflow-extensible-match {prefix ofoxm;}
8     import openflow-types {prefix oft;}
9     import ietf-yang-types {prefix yang; revision-date "2013-07-15";}
10     import yang-ext {prefix ext; revision-date "2013-07-09";}
11     import ietf-inet-types {prefix inet; revision-date "2013-07-15";}
12
13     description
14         "Nicira openflow extensions of match.";
15
16     revision "2014-04-21" {
17         description "Initial revision";
18     }
19
20     identity nxm-nx-reg {
21         base ofoxm:match-field;
22     }
23
24     identity nxm-nx-reg0 {
25         base nxm-nx-reg;
26     }
27     identity nxm-nx-reg1 {
28         base nxm-nx-reg;
29     }
30     identity nxm-nx-reg2 {
31         base nxm-nx-reg;
32     }
33     identity nxm-nx-reg3 {
34         base nxm-nx-reg;
35     }
36     identity nxm-nx-reg4 {
37         base nxm-nx-reg;
38     }
39     identity nxm-nx-reg5 {
40         base nxm-nx-reg;
41     }
42     identity nxm-nx-reg6 {
43         base nxm-nx-reg;
44     }
45     identity nxm-nx-reg7 {
46         base nxm-nx-reg;
47     }
48     identity nxm-nx-tun-id {
49         base ofoxm:match-field;
50     }
51     identity nxm-nx-arp-sha {
52         base ofoxm:match-field;
53     }
54     identity nxm-nx-arp-tha {
55         base ofoxm:match-field;
56     }
57     identity nxm-of-arp-op {
58         base ofoxm:match-field;
59     }
60     identity nxm-of-arp-spa {
61         base ofoxm:match-field;
62     }
63     identity nxm-of-arp-tpa {
64         base ofoxm:match-field;
65     }
66     identity nxm-of-in-port {
67         base ofoxm:match-field;
68     }
69     identity nxm-nx-tun-ipv4-dst {
70         base ofoxm:match-field;
71     }
72     identity nxm-nx-tun-ipv4-src {
73         base ofoxm:match-field;
74     }
75     identity nxm-of-eth-src {
76         base ofoxm:match-field;
77     }
78     identity nxm-of-eth-dst {
79         base ofoxm:match-field;
80     }
81     identity nxm-of-eth-type {
82         base ofoxm:match-field;
83     }
84     identity nxm-nx-nsp {
85         base ofoxm:match-field;
86     }
87     identity nxm-nx-nsi {
88         base ofoxm:match-field;
89     }
90     identity nxm-nx-nshc-1 {
91         base ofoxm:match-field;
92     }
93     identity nxm-nx-nshc-2 {
94         base ofoxm:match-field;
95     }
96     identity nxm-nx-nshc-3 {
97         base ofoxm:match-field;
98     }
99     identity nxm-nx-nshc-4 {
100         base ofoxm:match-field;
101     }
102     identity nxm-of-tcp-src {
103         base ofoxm:match-field;
104     }
105     identity nxm-of-tcp-dst {
106         base ofoxm:match-field;
107     }
108     identity nxm-of-udp-src {
109         base ofoxm:match-field;
110     }
111     identity nxm-of-udp-dst {
112         base ofoxm:match-field;
113     }
114     identity nxm-nx-ct-state {
115         base ofoxm:match-field;
116     }
117     identity nxm-nx-ct-zone {
118         base ofoxm:match-field;
119     }
120     identity nxm-of-ip-dst {
121         base ofoxm:match-field;
122     }
123     identity nxm-of-ip-src {
124         base ofoxm:match-field;
125     }
126     identity nxm-of-icmp-type {
127         base ofoxm:match-field;
128     }
129     identity nxm-nx-encap-eth-type {
130         base ofoxm:match-field;
131     }
132     identity nxm-nx-encap-eth-src {
133         base ofoxm:match-field;
134     }
135     identity nxm-nx-encap-eth-dst {
136         base ofoxm:match-field;
137     }
138     identity nxm-nx-nsh-mdtype {
139         base ofoxm:match-field;
140     }
141     identity nxm-nx-nsh-np {
142         base ofoxm:match-field;
143     }
144     identity nxm-nx-tun-gpe-np {
145         base ofoxm:match-field;
146     }
147     identity nxm-of-mpls-label {
148         base ofoxm:match-field;
149     }
150
151
152     grouping ofj-nxm-nx-match-reg-grouping {
153         container reg-values {
154             leaf value {
155                 type uint32;
156             }
157         }
158     }
159     grouping ofj-oxm-of-mpls-label-grouping {
160         container mpls-label-values {
161              leaf mpls-label {
162                  type uint32;
163              }
164         }
165     }
166
167     grouping ofj-nxm-nx-match-tun-id-grouping {
168         container tun-id-values {
169             leaf value {
170                 type uint64;
171             }
172         }
173     }
174     grouping ofj-nxm-nx-match-arp-sha-grouping {
175         container arp-sha-values {
176             leaf mac-address {
177                 type yang:mac-address;
178             }
179         }
180     }
181     grouping ofj-nxm-nx-match-arp-tha-grouping {
182         container arp-tha-values {
183             leaf mac-address {
184                 type yang:mac-address;
185             }
186         }
187     }
188     grouping ofj-nxm-of-match-arp-op-grouping {
189         container arp-op-values {
190             leaf value {
191                 type uint16;
192             }
193         }
194     }
195     grouping ofj-nxm-of-match-arp-spa-grouping {
196         container arp-spa-values {
197             leaf value {
198                 type uint32;
199             }
200         }
201     }
202     grouping ofj-nxm-of-match-arp-tpa-grouping {
203         container arp-tpa-values {
204             leaf value {
205                 type uint32;
206             }
207         }
208     }
209     grouping ofj-nxm-of-in-port-type-grouping {
210         container nxm-of-in-port-values {
211             leaf value {
212                 type uint16;
213             }
214         }
215     }
216     grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping {
217         container tun-ipv4-dst-values {
218             leaf value {
219                 type uint32;
220             }
221         }
222     }
223     grouping ofj-nxm-nx-match-tun-ipv4-src-grouping {
224         container tun-ipv4-src-values {
225             leaf value {
226                 type uint32;
227             }
228         }
229     }
230     grouping ofj-nxm-of-match-eth-src-grouping {
231         container eth-src-values {
232             leaf mac-address {
233                 type yang:mac-address;
234             }
235         }
236     }
237     grouping ofj-nxm-of-match-eth-dst-grouping {
238         container eth-dst-values {
239             leaf mac-address {
240                 type yang:mac-address;
241             }
242         }
243     }
244     grouping ofj-nxm-of-match-eth-type-grouping {
245         container eth-type-values {
246             leaf value {
247                 type uint16;
248             }
249         }
250     }
251
252     grouping ofj-nxm-nx-match-nsp-grouping {
253         container nsp-values {
254             leaf nsp {
255                 type uint32;
256             }
257         }
258     }
259
260     grouping ofj-nxm-nx-match-nsi-grouping {
261         container nsi-values {
262             leaf nsi {
263                 type uint8;
264             }
265         }
266     }
267
268     grouping ofj-nxm-nx-match-nshc-grouping {
269         leaf nshc {
270             type uint32;
271         }
272     }
273
274     grouping ofj-nxm-nx-match-nshc-1-grouping {
275         container nshc-1-values {
276             uses ofj-nxm-nx-match-nshc-grouping;
277         }
278     }
279     grouping ofj-nxm-nx-match-nshc-2-grouping {
280         container nshc-2-values {
281             uses ofj-nxm-nx-match-nshc-grouping;
282         }
283     }
284     grouping ofj-nxm-nx-match-nshc-3-grouping {
285         container nshc-3-values {
286             uses ofj-nxm-nx-match-nshc-grouping;
287         }
288     }
289     grouping ofj-nxm-nx-match-nshc-4-grouping {
290         container nshc-4-values {
291             uses ofj-nxm-nx-match-nshc-grouping;
292         }
293     }
294     grouping ofj-nxm-of-match-tcp-src-grouping {
295         container tcp-src-values {
296             leaf port {
297                type inet:port-number;
298             }
299             leaf mask {
300                type uint16;
301             }
302         }
303     }
304     grouping ofj-nxm-of-match-tcp-dst-grouping {
305         container tcp-dst-values {
306             leaf port {
307                type inet:port-number;
308             }
309             leaf mask {
310                type uint16;
311             }
312         }
313     }
314      grouping ofj-nxm-of-match-udp-src-grouping {
315         container udp-src-values {
316             leaf port {
317                type inet:port-number;
318             }
319             leaf mask {
320                type uint16;
321             }
322         }
323     }
324     grouping ofj-nxm-of-match-udp-dst-grouping {
325         container udp-dst-values {
326             leaf port {
327                type inet:port-number;
328             }
329             leaf mask {
330                type uint16;
331             }
332         }
333     }
334     grouping ofj-nxm-nx-match-ct-state-grouping{
335          container ct-state-values {
336             leaf ct-state {
337                type uint32;
338             }
339              leaf mask {
340                type uint32;
341             }
342         }
343     }
344     grouping ofj-nxm-nx-match-ct-zone-grouping{
345          container ct-zone-values {
346             leaf ct-zone {
347                type uint16;
348             }
349         }
350     }
351     grouping ofj-nxm-of-match-ip-dst-grouping {
352         container ip-dst-values {
353             leaf value {
354                 type uint32;
355             }
356         }
357     }
358     grouping ofj-nxm-of-match-ip-src-grouping {
359         container ip-src-values {
360             leaf value {
361                 type uint32;
362             }
363         }
364     }
365     grouping ofj-nxm-of-match-icmp-type-grouping {
366         container icmp-type-values {
367             leaf value {
368                 type uint8;
369             }
370         }
371     }
372     grouping ofj-nxm-nx-match-encap-eth-type-grouping {
373         container encap-eth-type-values {
374             leaf encap-eth-type {
375                 type uint16;
376             }
377         }
378     }
379     grouping ofj-nxm-nx-match-encap-eth-src-grouping {
380         container encap-eth-src-values {
381             leaf mac-address {
382                 type yang:mac-address;
383             }
384         }
385     }
386     grouping ofj-nxm-nx-match-encap-eth-dst-grouping {
387         container encap-eth-dst-values {
388             leaf mac-address {
389                 type yang:mac-address;
390             }
391         }
392     }
393     grouping ofj-nxm-nx-match-nsh-mdtype-grouping {
394         container nsh-mdtype-values {
395             leaf value {
396                 type uint8;
397             }
398         }
399     }
400     grouping ofj-nxm-nx-match-nsh-np-grouping {
401         container nsh-np-values {
402             leaf value {
403                 type uint8;
404             }
405         }
406     }
407     grouping ofj-nxm-nx-match-tun-gpe-np-grouping {
408         container tun-gpe-np-values {
409             leaf value {
410                 type uint8;
411             }
412         }
413     }
414
415     augment "/ofoxm:oxm-container/ofoxm:match-entry-value" {
416         ext:augment-identifier "ofj-aug-nx-match";
417         case reg-case-value {
418             uses ofj-nxm-nx-match-reg-grouping;
419         }
420         case tun-id-case-value {
421             uses ofj-nxm-nx-match-tun-id-grouping;
422         }
423         case arp-sha-case-value {
424             uses ofj-nxm-nx-match-arp-sha-grouping;
425         }
426         case arp-tha-case-value {
427             uses ofj-nxm-nx-match-arp-tha-grouping;
428         }
429         case arp-op-case-value {
430             uses ofj-nxm-of-match-arp-op-grouping;
431         }
432         case arp-spa-case-value {
433             uses ofj-nxm-of-match-arp-spa-grouping;
434         }
435         case arp-tpa-case-value {
436             uses ofj-nxm-of-match-arp-tpa-grouping;
437         }
438         case of-in-port-case-value {
439             uses ofj-nxm-of-in-port-type-grouping;
440         }
441         case tun-ipv4-dst-case-value {
442             uses ofj-nxm-nx-match-tun-ipv4-dst-grouping;
443         }
444         case tun-ipv4-src-case-value {
445             uses ofj-nxm-nx-match-tun-ipv4-src-grouping;
446         }
447         case eth-src-case-value {
448             uses ofj-nxm-of-match-eth-src-grouping;
449         }
450         case of-mpls-label-case-value {
451             uses ofj-oxm-of-mpls-label-grouping;
452         }
453         case eth-dst-case-value {
454             uses ofj-nxm-of-match-eth-dst-grouping;
455         }
456         case encap-eth-type-case-value {
457             uses ofj-nxm-nx-match-encap-eth-type-grouping;
458         }
459         case encap-eth-src-case-value {
460             uses ofj-nxm-nx-match-encap-eth-src-grouping;
461         }
462         case encap-eth-dst-case-value {
463             uses ofj-nxm-nx-match-encap-eth-dst-grouping;
464         }
465         case nsh-mdtype-case-value {
466             uses ofj-nxm-nx-match-nsh-mdtype-grouping;
467         }
468         case nsh-np-case-value {
469             uses ofj-nxm-nx-match-nsh-np-grouping;
470         }
471         case tun-gpe-np-case-value {
472             uses ofj-nxm-nx-match-tun-gpe-np-grouping;
473         }
474
475         case eth-type-case-value {
476             uses ofj-nxm-of-match-eth-type-grouping;
477         }
478         case nsp-case-value {
479             uses ofj-nxm-nx-match-nsp-grouping;
480         }
481         case nsi-case-value {
482             uses ofj-nxm-nx-match-nsi-grouping;
483         }
484         case nshc-1-case-value {
485             uses ofj-nxm-nx-match-nshc-1-grouping;
486         }
487         case nshc-2-case-value {
488             uses ofj-nxm-nx-match-nshc-2-grouping;
489         }
490         case nshc-3-case-value {
491             uses ofj-nxm-nx-match-nshc-3-grouping;
492         }
493         case nshc-4-case-value {
494             uses ofj-nxm-nx-match-nshc-4-grouping;
495         }
496         case tcp-src-case-value {
497             uses ofj-nxm-of-match-tcp-src-grouping;
498         }
499         case tcp-dst-case-value {
500             uses ofj-nxm-of-match-tcp-dst-grouping;
501         }
502         case udp-src-case-value {
503             uses ofj-nxm-of-match-udp-src-grouping;
504         }
505         case udp-dst-case-value {
506             uses ofj-nxm-of-match-udp-dst-grouping;
507         }
508         case ct-state-case-value {
509             uses ofj-nxm-nx-match-ct-state-grouping;
510         }
511         case ct-zone-case-value {
512             uses ofj-nxm-nx-match-ct-zone-grouping;
513         }
514         case ip-dst-case-value {
515             uses ofj-nxm-of-match-ip-dst-grouping;
516         }
517         case ip-src-case-value {
518             uses ofj-nxm-of-match-ip-src-grouping;
519         }
520         case icmp-type-case-value {
521             uses ofj-nxm-of-match-icmp-type-grouping;
522         }
523
524     }
525
526 }