Merge "Added Conntrack Support in Nicira Extenstion."
[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 "2010-09-24";}
10     import yang-ext {prefix ext; revision-date "2013-07-09";}
11     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
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-nx-tun-ipv4-dst {
67         base ofoxm:match-field;
68     }
69     identity nxm-nx-tun-ipv4-src {
70         base ofoxm:match-field;
71     }
72     identity nxm-of-eth-src {
73         base ofoxm:match-field;
74     }
75     identity nxm-of-eth-dst {
76         base ofoxm:match-field;
77     }
78     identity nxm-of-eth-type {
79         base ofoxm:match-field;
80     }
81     identity nxm-nx-nsp {
82         base ofoxm:match-field;
83     }
84     identity nxm-nx-nsi {
85         base ofoxm:match-field;
86     }
87     identity nxm-nx-nshc-1 {
88         base ofoxm:match-field;
89     }
90     identity nxm-nx-nshc-2 {
91         base ofoxm:match-field;
92     }
93     identity nxm-nx-nshc-3 {
94         base ofoxm:match-field;
95     }
96     identity nxm-nx-nshc-4 {
97         base ofoxm:match-field;
98     }
99     identity nxm-of-tcp-src {
100         base ofoxm:match-field;
101     }
102     identity nxm-of-tcp-dst {
103         base ofoxm:match-field;
104     }
105     identity nxm-of-udp-src {
106         base ofoxm:match-field;
107     }
108     identity nxm-of-udp-dst {
109         base ofoxm:match-field;
110     }
111     identity nxm-nx-ct-state {
112         base ofoxm:match-field;
113     }
114      identity nxm-nx-ct-zone {
115         base ofoxm:match-field;
116     }
117
118     grouping ofj-nxm-nx-match-reg-grouping {
119         container reg-values {
120             leaf value {
121                 type uint32;
122             }
123         }
124     }
125     grouping ofj-nxm-nx-match-tun-id-grouping {
126         container tun-id-values {
127             leaf value {
128                 type uint64;
129             }
130         }
131     }
132     grouping ofj-nxm-nx-match-arp-sha-grouping {
133         container arp-sha-values {
134             leaf mac-address {
135                 type yang:mac-address;
136             }
137         }
138     }
139     grouping ofj-nxm-nx-match-arp-tha-grouping {
140         container arp-tha-values {
141             leaf mac-address {
142                 type yang:mac-address;
143             }
144         }
145     }
146     grouping ofj-nxm-of-match-arp-op-grouping {
147         container arp-op-values {
148             leaf value {
149                 type uint16;
150             }
151         }
152     }
153     grouping ofj-nxm-of-match-arp-spa-grouping {
154         container arp-spa-values {
155             leaf value {
156                 type uint32;
157             }
158         }
159     }
160     grouping ofj-nxm-of-match-arp-tpa-grouping {
161         container arp-tpa-values {
162             leaf value {
163                 type uint32;
164             }
165         }
166     }
167     grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping {
168         container tun-ipv4-dst-values {
169             leaf value {
170                 type uint32;
171             }
172         }
173     }
174     grouping ofj-nxm-nx-match-tun-ipv4-src-grouping {
175         container tun-ipv4-src-values {
176             leaf value {
177                 type uint32;
178             }
179         }
180     }
181     grouping ofj-nxm-of-match-eth-src-grouping {
182         container eth-src-values {
183             leaf mac-address {
184                 type yang:mac-address;
185             }
186         }
187     }
188     grouping ofj-nxm-of-match-eth-dst-grouping {
189         container eth-dst-values {
190             leaf mac-address {
191                 type yang:mac-address;
192             }
193         }
194     }
195     grouping ofj-nxm-of-match-eth-type-grouping {
196         container eth-type-values {
197             leaf value {
198                 type uint16;
199             }
200         }
201     }
202
203     grouping ofj-nxm-nx-match-nsp-grouping {
204         container nsp-values {
205             leaf nsp {
206                 type uint32;
207             }
208         }
209     }
210
211     grouping ofj-nxm-nx-match-nsi-grouping {
212         container nsi-values {
213             leaf nsi {
214                 type uint8;
215             }
216         }
217     }
218
219     grouping ofj-nxm-nx-match-nshc-grouping {
220         leaf nshc {
221             type uint32;
222         }
223     }
224
225     grouping ofj-nxm-nx-match-nshc-1-grouping {
226         container nshc-1-values {
227             uses ofj-nxm-nx-match-nshc-grouping;
228         }
229     }
230     grouping ofj-nxm-nx-match-nshc-2-grouping {
231         container nshc-2-values {
232             uses ofj-nxm-nx-match-nshc-grouping;
233         }
234     }
235     grouping ofj-nxm-nx-match-nshc-3-grouping {
236         container nshc-3-values {
237             uses ofj-nxm-nx-match-nshc-grouping;
238         }
239     }
240     grouping ofj-nxm-nx-match-nshc-4-grouping {
241         container nshc-4-values {
242             uses ofj-nxm-nx-match-nshc-grouping;
243         }
244     }
245     grouping ofj-nxm-of-match-tcp-src-grouping {
246         container tcp-src-values {
247             leaf port {
248                type inet:port-number;
249             }
250             leaf mask {
251                type uint16;
252             }
253         }
254     }
255     grouping ofj-nxm-of-match-tcp-dst-grouping {
256         container tcp-dst-values {
257             leaf port {
258                type inet:port-number;
259             }
260             leaf mask {
261                type uint16;
262             }
263         }
264     }
265      grouping ofj-nxm-of-match-udp-src-grouping {
266         container udp-src-values {
267             leaf port {
268                type inet:port-number;
269             }
270             leaf mask {
271                type uint16;
272             }
273         }
274     }
275     grouping ofj-nxm-of-match-udp-dst-grouping {
276         container udp-dst-values {
277             leaf port {
278                type inet:port-number;
279             }
280             leaf mask {
281                type uint16;
282             }
283         }
284     }
285     grouping ofj-nxm-nx-match-ct-state-grouping{
286          container ct-state-values {
287             leaf ct-state {
288                type uint32;
289             }
290              leaf mask {
291                type uint32;
292             }
293         }
294     }
295     grouping ofj-nxm-nx-match-ct-zone-grouping{
296          container ct-zone-values {
297             leaf ct-zone {
298                type uint16;
299             }
300         }
301     }
302     augment "/ofoxm:oxm-container/ofoxm:match-entry-value" {
303         ext:augment-identifier "ofj-aug-nx-match";
304         case reg-case-value {
305             uses ofj-nxm-nx-match-reg-grouping;
306         }
307         case tun-id-case-value {
308             uses ofj-nxm-nx-match-tun-id-grouping;
309         }
310         case arp-sha-case-value {
311             uses ofj-nxm-nx-match-arp-sha-grouping;
312         }
313         case arp-tha-case-value {
314             uses ofj-nxm-nx-match-arp-tha-grouping;
315         }
316         case arp-op-case-value {
317             uses ofj-nxm-of-match-arp-op-grouping;
318         }
319         case arp-spa-case-value {
320             uses ofj-nxm-of-match-arp-spa-grouping;
321         }
322         case arp-tpa-case-value {
323             uses ofj-nxm-of-match-arp-tpa-grouping;
324         }
325         case tun-ipv4-dst-case-value {
326             uses ofj-nxm-nx-match-tun-ipv4-dst-grouping;
327         }
328         case tun-ipv4-src-case-value {
329             uses ofj-nxm-nx-match-tun-ipv4-src-grouping;
330         }
331         case eth-src-case-value {
332             uses ofj-nxm-of-match-eth-src-grouping;
333         }
334         case eth-dst-case-value {
335             uses ofj-nxm-of-match-eth-dst-grouping;
336         }
337
338         case eth-type-case-value {
339             uses ofj-nxm-of-match-eth-type-grouping;
340         }
341         case nsp-case-value {
342             uses ofj-nxm-nx-match-nsp-grouping;
343         }
344         case nsi-case-value {
345             uses ofj-nxm-nx-match-nsi-grouping;
346         }
347         case nshc-1-case-value {
348             uses ofj-nxm-nx-match-nshc-1-grouping;
349         }
350         case nshc-2-case-value {
351             uses ofj-nxm-nx-match-nshc-2-grouping;
352         }
353         case nshc-3-case-value {
354             uses ofj-nxm-nx-match-nshc-3-grouping;
355         }
356         case nshc-4-case-value {
357             uses ofj-nxm-nx-match-nshc-4-grouping;
358         }
359         case tcp-src-case-value {
360             uses ofj-nxm-of-match-tcp-src-grouping;
361         }
362         case tcp-dst-case-value {
363             uses ofj-nxm-of-match-tcp-dst-grouping;
364         }
365         case udp-src-case-value {
366             uses ofj-nxm-of-match-udp-src-grouping;
367         }
368         case udp-dst-case-value {
369             uses ofj-nxm-of-match-udp-dst-grouping;
370         }
371         case ct-state-case-value {
372             uses ofj-nxm-nx-match-ct-state-grouping;
373         }
374         case ct-zone-case-value {
375             uses ofj-nxm-nx-match-ct-zone-grouping;
376         }
377
378     }
379
380 }