Merge "BUG-4062: Flows,Groups,Meters not getting deleted during switch flap"
[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
112     grouping ofj-nxm-nx-match-reg-grouping {
113         container reg-values {
114             leaf value {
115                 type uint32;
116             }
117         }
118     }
119     grouping ofj-nxm-nx-match-tun-id-grouping {
120         container tun-id-values {
121             leaf value {
122                 type uint64;
123             }
124         }
125     }
126     grouping ofj-nxm-nx-match-arp-sha-grouping {
127         container arp-sha-values {
128             leaf mac-address {
129                 type yang:mac-address;
130             }
131         }
132     }
133     grouping ofj-nxm-nx-match-arp-tha-grouping {
134         container arp-tha-values {
135             leaf mac-address {
136                 type yang:mac-address;
137             }
138         }
139     }
140     grouping ofj-nxm-of-match-arp-op-grouping {
141         container arp-op-values {
142             leaf value {
143                 type uint16;
144             }
145         }
146     }
147     grouping ofj-nxm-of-match-arp-spa-grouping {
148         container arp-spa-values {
149             leaf value {
150                 type uint32;
151             }
152         }
153     }
154     grouping ofj-nxm-of-match-arp-tpa-grouping {
155         container arp-tpa-values {
156             leaf value {
157                 type uint32;
158             }
159         }
160     }
161     grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping {
162         container tun-ipv4-dst-values {
163             leaf value {
164                 type uint32;
165             }
166         }
167     }
168     grouping ofj-nxm-nx-match-tun-ipv4-src-grouping {
169         container tun-ipv4-src-values {
170             leaf value {
171                 type uint32;
172             }
173         }
174     }
175     grouping ofj-nxm-of-match-eth-src-grouping {
176         container eth-src-values {
177             leaf mac-address {
178                 type yang:mac-address;
179             }
180         }
181     }
182     grouping ofj-nxm-of-match-eth-dst-grouping {
183         container eth-dst-values {
184             leaf mac-address {
185                 type yang:mac-address;
186             }
187         }
188     }
189     grouping ofj-nxm-of-match-eth-type-grouping {
190         container eth-type-values {
191             leaf value {
192                 type uint16;
193             }
194         }
195     }
196
197     grouping ofj-nxm-nx-match-nsp-grouping {
198         container nsp-values {
199             leaf nsp {
200                 type uint32;
201             }
202         }
203     }
204
205     grouping ofj-nxm-nx-match-nsi-grouping {
206         container nsi-values {
207             leaf nsi {
208                 type uint8;
209             }
210         }
211     }
212     
213     grouping ofj-nxm-nx-match-nshc-grouping {
214         leaf nshc {
215             type uint32;
216         }
217     }
218     
219     grouping ofj-nxm-nx-match-nshc-1-grouping {
220         container nshc-1-values {
221             uses ofj-nxm-nx-match-nshc-grouping;
222         }
223     }
224     grouping ofj-nxm-nx-match-nshc-2-grouping {
225         container nshc-2-values {
226             uses ofj-nxm-nx-match-nshc-grouping;
227         }
228     }
229     grouping ofj-nxm-nx-match-nshc-3-grouping {
230         container nshc-3-values {
231             uses ofj-nxm-nx-match-nshc-grouping;
232         }
233     }
234     grouping ofj-nxm-nx-match-nshc-4-grouping {
235         container nshc-4-values {
236             uses ofj-nxm-nx-match-nshc-grouping;
237         }
238     }
239     grouping ofj-nxm-of-match-tcp-src-grouping {
240         container tcp-src-values {
241             leaf port {
242                type inet:port-number;
243             }
244             leaf mask {
245                type uint16;
246             }
247         }
248     }
249     grouping ofj-nxm-of-match-tcp-dst-grouping {
250         container tcp-dst-values {
251             leaf port {
252                type inet:port-number;
253             }
254             leaf mask {
255                type uint16;
256             }
257         }
258     }
259      grouping ofj-nxm-of-match-udp-src-grouping {
260         container udp-src-values {
261             leaf port {
262                type inet:port-number;
263             }
264             leaf mask {
265                type uint16;
266             }
267         }
268     }
269     grouping ofj-nxm-of-match-udp-dst-grouping {
270         container udp-dst-values {
271             leaf port {
272                type inet:port-number;
273             }
274             leaf mask {
275                type uint16;
276             }
277         }
278     }
279
280     augment "/ofoxm:oxm-container/ofoxm:match-entry-value" {
281         ext:augment-identifier "ofj-aug-nx-match";
282         case reg-case-value {
283             uses ofj-nxm-nx-match-reg-grouping;
284         }
285         case tun-id-case-value {
286             uses ofj-nxm-nx-match-tun-id-grouping;
287         }
288         case arp-sha-case-value {
289             uses ofj-nxm-nx-match-arp-sha-grouping;
290         }
291         case arp-tha-case-value {
292             uses ofj-nxm-nx-match-arp-tha-grouping;
293         }
294         case arp-op-case-value {
295             uses ofj-nxm-of-match-arp-op-grouping;
296         }
297         case arp-spa-case-value {
298             uses ofj-nxm-of-match-arp-spa-grouping;
299         }
300         case arp-tpa-case-value {
301             uses ofj-nxm-of-match-arp-tpa-grouping;
302         }
303         case tun-ipv4-dst-case-value {
304             uses ofj-nxm-nx-match-tun-ipv4-dst-grouping;
305         }
306         case tun-ipv4-src-case-value {
307             uses ofj-nxm-nx-match-tun-ipv4-src-grouping;
308         }
309         case eth-src-case-value {
310             uses ofj-nxm-of-match-eth-src-grouping;
311         }
312         case eth-dst-case-value {
313             uses ofj-nxm-of-match-eth-dst-grouping;
314         }
315
316         case eth-type-case-value {
317             uses ofj-nxm-of-match-eth-type-grouping;
318         }
319         case nsp-case-value {
320             uses ofj-nxm-nx-match-nsp-grouping;
321         }
322         case nsi-case-value {
323             uses ofj-nxm-nx-match-nsi-grouping;
324         }
325         case nshc-1-case-value {
326             uses ofj-nxm-nx-match-nshc-1-grouping;
327         }
328         case nshc-2-case-value {
329             uses ofj-nxm-nx-match-nshc-2-grouping;
330         }
331         case nshc-3-case-value {
332             uses ofj-nxm-nx-match-nshc-3-grouping;
333         }
334         case nshc-4-case-value {
335             uses ofj-nxm-nx-match-nshc-4-grouping;
336         }
337         case tcp-src-case-value {
338             uses ofj-nxm-of-match-tcp-src-grouping;
339         }
340         case tcp-dst-case-value {
341             uses ofj-nxm-of-match-tcp-dst-grouping;
342         }
343         case udp-src-case-value {
344             uses ofj-nxm-of-match-udp-src-grouping;
345         }
346         case udp-dst-case-value {
347             uses ofj-nxm-of-match-udp-dst-grouping;
348         }
349
350     }
351
352 }