BUG-2794: incorporate openflowjava api changes to openflowplugin
[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
12     description 
13         "Nicira openflow extensions of match.";
14
15     revision "2014-04-21" {
16         description "Initial revision";
17     }
18
19     identity nxm-nx-reg {
20         base ofoxm:match-field;
21     }
22
23     identity nxm-nx-reg0 {
24         base nxm-nx-reg;
25     }
26     identity nxm-nx-reg1 {
27         base nxm-nx-reg;
28     }
29     identity nxm-nx-reg2 {
30         base nxm-nx-reg;
31     }
32     identity nxm-nx-reg3 {
33         base nxm-nx-reg;
34     }
35     identity nxm-nx-reg4 {
36         base nxm-nx-reg;
37     }
38     identity nxm-nx-reg5 {
39         base nxm-nx-reg;
40     }
41     identity nxm-nx-reg6 {
42         base nxm-nx-reg;
43     }
44     identity nxm-nx-reg7 {
45         base nxm-nx-reg;
46     }
47     identity nxm-nx-tun-id {
48         base ofoxm:match-field;
49     }
50     identity nxm-nx-arp-sha {
51         base ofoxm:match-field;
52     }
53     identity nxm-nx-arp-tha {
54         base ofoxm:match-field;
55     }
56     identity nxm-of-arp-op {
57         base ofoxm:match-field;
58     }
59     identity nxm-of-arp-spa {
60         base ofoxm:match-field;
61     }
62     identity nxm-of-arp-tpa {
63         base ofoxm:match-field;
64     }
65     identity nxm-nx-tun-ipv4-dst {
66         base ofoxm:match-field;
67     }
68     identity nxm-nx-tun-ipv4-src {
69         base ofoxm:match-field;
70     }
71     identity nxm-of-eth-src {
72         base ofoxm:match-field;
73     }
74     identity nxm-of-eth-dst {
75         base ofoxm:match-field;
76     }
77     identity nxm-of-eth-type {
78         base ofoxm:match-field;
79     }
80     identity nxm-nx-nsp {
81         base ofoxm:match-field;
82     }
83     identity nxm-nx-nsi {
84         base ofoxm:match-field;
85     }
86
87     grouping ofj-nxm-nx-match-reg-grouping {
88         container reg-values {
89             leaf value {
90                 type uint32;
91             }
92         }
93     }
94     grouping ofj-nxm-nx-match-tun-id-grouping {
95         container tun-id-values {
96             leaf value {
97                 type uint64;
98             }
99         }
100     }
101     grouping ofj-nxm-nx-match-arp-sha-grouping {
102         container arp-sha-values {
103             leaf mac-address {
104                 type yang:mac-address;
105             }
106         }
107     }
108     grouping ofj-nxm-nx-match-arp-tha-grouping {
109         container arp-tha-values {
110             leaf mac-address {
111                 type yang:mac-address;
112             }
113         }
114     }
115     grouping ofj-nxm-of-match-arp-op-grouping {
116         container arp-op-values {
117             leaf value {
118                 type uint16;
119             }
120         }
121     }
122     grouping ofj-nxm-of-match-arp-spa-grouping {
123         container arp-spa-values {
124             leaf value {
125                 type uint32;
126             }
127         }
128     }
129     grouping ofj-nxm-of-match-arp-tpa-grouping {
130         container arp-tpa-values {
131             leaf value {
132                 type uint32;
133             }
134         }
135     }
136     grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping {
137         container tun-ipv4-dst-values {
138             leaf value {
139                 type uint32;
140             }
141         }
142     }
143     grouping ofj-nxm-nx-match-tun-ipv4-src-grouping {
144         container tun-ipv4-src-values {
145             leaf value {
146                 type uint32;
147             }
148         }
149     }
150     grouping ofj-nxm-of-match-eth-src-grouping {
151         container eth-src-values {
152             leaf mac-address {
153                 type yang:mac-address;
154             }
155         }
156     }
157     grouping ofj-nxm-of-match-eth-dst-grouping {
158         container eth-dst-values {
159             leaf mac-address {
160                 type yang:mac-address;
161             }
162         }
163     }
164     grouping ofj-nxm-of-match-eth-type-grouping {
165         container eth-type-values {
166             leaf value {
167                 type uint16;
168             }
169         }
170     }
171
172     grouping ofj-nxm-nx-match-nsp-grouping {
173         container nsp-values {
174             leaf nsp {
175                 type uint32;
176             }
177         }
178     }
179
180     grouping ofj-nxm-nx-match-nsi-grouping {
181         container nsi-values {
182             leaf nsi {
183                 type uint8;
184             }
185         }
186     }
187
188     augment "/ofoxm:oxm-container/ofoxm:match-entry-value" {
189         ext:augment-identifier "ofj-aug-nx-match";
190         case reg-case-value {
191             uses ofj-nxm-nx-match-reg-grouping;
192         }
193         case tun-id-case-value {
194             uses ofj-nxm-nx-match-tun-id-grouping;
195         }
196         case arp-sha-case-value {
197             uses ofj-nxm-nx-match-arp-sha-grouping;
198         }
199         case arp-tha-case-value {
200             uses ofj-nxm-nx-match-arp-tha-grouping;
201         }
202         case arp-op-case-value {
203             uses ofj-nxm-of-match-arp-op-grouping;
204         }
205         case arp-spa-case-value {
206             uses ofj-nxm-of-match-arp-spa-grouping;
207         }
208         case arp-tpa-case-value {
209             uses ofj-nxm-of-match-arp-tpa-grouping;
210         }
211         case tun-ipv4-dst-case-value {
212             uses ofj-nxm-nx-match-tun-ipv4-dst-grouping;
213         }
214         case tun-ipv4-src-case-value {
215             uses ofj-nxm-nx-match-tun-ipv4-src-grouping;
216         }
217         case eth-src-case-value {
218             uses ofj-nxm-of-match-eth-src-grouping;
219         }
220         case eth-dst-case-value {
221             uses ofj-nxm-of-match-eth-dst-grouping;
222         }
223
224         case eth-type-case-value {
225             uses ofj-nxm-of-match-eth-type-grouping;
226         }
227         case nsp-case-value {
228             uses ofj-nxm-nx-match-nsp-grouping;
229         }
230         case nsi-case-value {
231             uses ofj-nxm-nx-match-nsi-grouping;
232         }
233
234     }
235
236 }