edf8a3a335ffb7fc4217576f0e8c01dae5c47772
[openflowjava.git] / openflow-extension-nicira / src / main / yang / nicira-match.yang
1 module nicira-match {
2     yang-version 1;
3
4     namespace "urn:opendaylight:openflow:extension:nicira: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
78     grouping ofj-nxm-nx-match-reg-grouping {
79         container reg-values {
80             leaf value {
81                 type uint32;
82             }
83         }
84     }
85     grouping ofj-nxm-nx-match-tun-id-grouping {
86         container tun-id-values {
87             leaf value {
88                 type uint64;
89             }
90         }
91     }
92     grouping ofj-nxm-nx-match-arp-sha-grouping {
93         container arp-sha-values {
94             leaf mac-address {
95                 type yang:mac-address;
96             }
97         }
98     }
99     grouping ofj-nxm-nx-match-arp-tha-grouping {
100         container arp-tha-values {
101             leaf mac-address {
102                 type yang:mac-address;
103             }
104         }
105     }
106     grouping ofj-nxm-of-match-arp-op-grouping {
107         container arp-op-values {
108             leaf value {
109                 type uint16;
110             }
111         }
112     }
113     grouping ofj-nxm-of-match-arp-spa-grouping {
114         container arp-spa-values {
115             leaf value {
116                 type uint32;
117             }
118         }
119     }
120     grouping ofj-nxm-of-match-arp-tpa-grouping {
121         container arp-tpa-values {
122             leaf value {
123                 type uint32;
124             }
125         }
126     }
127     grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping {
128         container tun-ipv4-dst-values {
129             leaf value {
130                 type uint32;
131             }
132         }
133     }
134     grouping ofj-nxm-nx-match-tun-ipv4-src-grouping {
135         container tun-ipv4-src-values {
136             leaf value {
137                 type uint32;
138             }
139         }
140     }
141     grouping ofj-nxm-of-match-eth-src-grouping {
142         container eth-src-values {
143             leaf mac-address {
144                 type yang:mac-address;
145             }
146         }
147     }
148     grouping ofj-nxm-of-match-eth-dst-grouping {
149         container eth-dst-values {
150             leaf mac-address {
151                 type yang:mac-address;
152             }
153         }
154     }
155
156     augment "/ofoxm:oxm-container/ofoxm:match-entries" {
157         ext:augment-identifier "ofj-aug_nx_match";
158         uses ofj-nxm-nx-match-reg-grouping;
159         uses ofj-nxm-nx-match-tun-id-grouping;
160         uses ofj-nxm-nx-match-arp-sha-grouping;
161         uses ofj-nxm-nx-match-arp-tha-grouping;
162         uses ofj-nxm-of-match-arp-op-grouping;
163         uses ofj-nxm-of-match-arp-spa-grouping;
164         uses ofj-nxm-of-match-arp-tpa-grouping;
165         uses ofj-nxm-nx-match-tun-ipv4-dst-grouping;
166         uses ofj-nxm-nx-match-tun-ipv4-src-grouping;
167         uses ofj-nxm-of-match-eth-src-grouping;
168         uses ofj-nxm-of-match-eth-dst-grouping;
169     }
170
171 }