1 module openflowplugin-extension-nicira-match {
4 namespace "urn:opendaylight:openflowplugin:extension:nicira:match";
5 prefix "openflowplugin-nicira-match";
7 import yang-ext {prefix ext; revision-date "2013-07-09";}
8 import flow-node-inventory {prefix fni; revision-date 2013-08-19; }
9 import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
10 import sal-flow {prefix sal-flow;revision-date "2013-08-19";}
11 import packet-processing {prefix sal-packet;revision-date "2013-07-09";}
12 import openflowplugin-extension-general {prefix ext-gen;revision-date "2014-07-14";}
13 import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";}
14 import nicira-match {prefix nicira-match;revision-date "2014-04-21";}
15 import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
16 import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
19 "Nicira openflow match extensions.";
21 revision "2014-07-14" {
22 description "Initial revision";
25 identity nxm-nx-reg0-key {
26 base ext-gen:extension-key;
28 identity nxm-nx-reg1-key {
29 base ext-gen:extension-key;
31 identity nxm-nx-reg2-key {
32 base ext-gen:extension-key;
34 identity nxm-nx-reg3-key {
35 base ext-gen:extension-key;
37 identity nxm-nx-reg4-key {
38 base ext-gen:extension-key;
40 identity nxm-nx-reg5-key {
41 base ext-gen:extension-key;
43 identity nxm-nx-reg6-key {
44 base ext-gen:extension-key;
46 identity nxm-nx-reg7-key {
47 base ext-gen:extension-key;
49 identity nxm-nx-tun-id-key {
50 base ext-gen:extension-key;
52 identity nxm-nx-arp-sha-key {
53 base ext-gen:extension-key;
55 identity nxm-nx-arp-tha-key {
56 base ext-gen:extension-key;
58 identity nxm-of-arp-op-key {
59 base ext-gen:extension-key;
61 identity nxm-of-arp-spa-key {
62 base ext-gen:extension-key;
64 identity nxm-of-arp-tpa-key {
65 base ext-gen:extension-key;
67 identity nxm-nx-tun-ipv4-dst-key {
68 base ext-gen:extension-key;
70 identity nxm-nx-tun-ipv4-src-key {
71 base ext-gen:extension-key;
73 identity nxm-of-eth-src-key {
74 base ext-gen:extension-key;
76 identity nxm-of-eth-dst-key {
77 base ext-gen:extension-key;
79 identity nxm-of-eth-type-key {
80 base ext-gen:extension-key;
82 identity nxm-nx-nsp-key {
83 base ext-gen:extension-key;
85 identity nxm-nx-nsi-key {
86 base ext-gen:extension-key;
88 identity nxm-nx-nshc-1-key {
89 base ext-gen:extension-key;
91 identity nxm-nx-nshc-2-key {
92 base ext-gen:extension-key;
94 identity nxm-nx-nshc-3-key {
95 base ext-gen:extension-key;
97 identity nxm-nx-nshc-4-key {
98 base ext-gen:extension-key;
100 identity nxm-of-tcp-src-key {
101 base ext-gen:extension-key;
103 identity nxm-of-tcp-dst-key {
104 base ext-gen:extension-key;
106 identity nxm-of-udp-src-key {
107 base ext-gen:extension-key;
109 identity nxm-of-udp-dst-key {
110 base ext-gen:extension-key;
112 grouping ipv4-address-grouping {
114 type inet:ipv4-address;
117 grouping mac-address-grouping {
119 type yang:mac-address;
123 grouping nxm-nx-reg-grouping {
124 container nxm-nx-reg {
127 base nicira-match:nxm-nx-reg;
135 grouping nxm-nx-tun-id-grouping {
136 container nxm-nx-tun-id {
142 grouping nxm-nx-arp-sha-grouping {
143 container nxm-nx-arp-sha {
144 uses mac-address-grouping;
147 grouping nxm-nx-arp-tha-grouping {
148 container nxm-nx-arp-tha {
149 uses mac-address-grouping;
152 grouping nxm-of-arp-op-grouping {
153 container nxm-of-arp-op {
154 description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035.";
160 grouping nxm-of-arp-spa-grouping {
161 container nxm-of-arp-spa {
162 description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035.";
163 uses ipv4-address-grouping;
166 grouping nxm-of-tcp-src-grouping {
167 container nxm-of-tcp-src {
169 type inet:port-number;
176 grouping nxm-of-tcp-dst-grouping {
177 container nxm-of-tcp-dst {
179 type inet:port-number;
186 grouping nxm-of-udp-src-grouping {
187 container nxm-of-udp-src {
189 type inet:port-number;
196 grouping nxm-of-udp-dst-grouping {
197 container nxm-of-udp-dst {
199 type inet:port-number;
206 grouping nxm-of-arp-tpa-grouping {
207 container nxm-of-arp-tpa {
208 description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035.";
209 uses ipv4-address-grouping;
212 grouping nxm-nx-tun-ipv4-dst-grouping {
213 container nxm-nx-tun-ipv4-dst {
214 uses ipv4-address-grouping;
217 grouping nxm-nx-tun-ipv4-src-grouping {
218 container nxm-nx-tun-ipv4-src {
219 uses ipv4-address-grouping;
222 grouping nxm-of-eth-src-grouping {
223 container nxm-of-eth-src {
224 uses mac-address-grouping;
227 grouping nxm-of-eth-dst-grouping {
228 container nxm-of-eth-dst {
229 uses mac-address-grouping;
232 grouping nxm-of-eth-type-grouping {
233 container nxm-of-eth-type {
239 grouping nxm-nx-nsp-grouping {
240 container nxm-nx-nsp {
246 grouping nxm-nx-nsi-grouping {
247 container nxm-nx-nsi {
253 grouping nxm-nx-nshc-1-grouping {
254 container nxm-nx-nshc-1 {
260 grouping nxm-nx-nshc-2-grouping {
261 container nxm-nx-nshc-2 {
267 grouping nxm-nx-nshc-3-grouping {
268 container nxm-nx-nshc-3 {
274 grouping nxm-nx-nshc-4-grouping {
275 container nxm-nx-nshc-4 {
283 grouping all-matches-grouping {
284 uses nxm-nx-reg-grouping;
285 uses nxm-nx-tun-id-grouping;
286 uses nxm-nx-arp-sha-grouping;
287 uses nxm-nx-arp-tha-grouping;
288 uses nxm-of-arp-op-grouping;
289 uses nxm-of-arp-spa-grouping;
290 uses nxm-of-arp-tpa-grouping;
291 uses nxm-nx-tun-ipv4-dst-grouping;
292 uses nxm-nx-tun-ipv4-src-grouping;
293 uses nxm-of-eth-src-grouping;
294 uses nxm-of-eth-dst-grouping;
295 uses nxm-of-eth-type-grouping;
296 uses nxm-nx-nsp-grouping;
297 uses nxm-nx-nsi-grouping;
298 uses nxm-nx-nshc-1-grouping;
299 uses nxm-nx-nshc-2-grouping;
300 uses nxm-nx-nshc-3-grouping;
301 uses nxm-nx-nshc-4-grouping;
302 uses nxm-of-tcp-src-grouping;
303 uses nxm-of-tcp-dst-grouping;
304 uses nxm-of-udp-src-grouping;
305 uses nxm-of-udp-dst-grouping;
308 // MATCH augmentations
310 augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
311 ext:augment-identifier "nx-aug-match-rpc-add-flow";
312 uses all-matches-grouping;
314 augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
315 ext:augment-identifier "nx-aug-match-rpc-remove-flow";
316 uses all-matches-grouping;
318 augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
319 ext:augment-identifier "nx-aug-match-rpc-update-flow-original";
320 uses all-matches-grouping;
322 augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
323 ext:augment-identifier "nx-aug-match-rpc-update-flow-updated";
324 uses all-matches-grouping;
328 augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match/ext-gen:extension-list/ext-gen:extension" {
329 ext:augment-identifier "nx-aug-match-nodes-node-table-flow";
330 uses all-matches-grouping;
334 augment "/sal-flow:switch-flow-removed/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
335 ext:augment-identifier "nx-aug-match-notif-switch-flow-removed";
336 uses all-matches-grouping;
338 augment "/sal-packet:packet-received/sal-packet:match/ext-gen:extension-list/ext-gen:extension" {
339 ext:augment-identifier "nx-aug-match-notif-packet-in";
340 uses all-matches-grouping;
342 augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match/ext-gen:extension-list/ext-gen:extension" {
343 ext:augment-identifier "nx-aug-match-notif-update-flow-stats";
344 uses all-matches-grouping;