75c6590b96c6e6d032f6a4d9d029394a105d23ad
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-augments.yang
1 module openflow-augments {\r
2     namespace "urn:opendaylight:openflow:augments";\r
3     prefix "aug";\r
4     \r
5     import yang-ext {prefix ext;}\r
6     import ietf-inet-types {prefix inet;}\r
7     import ietf-yang-types {prefix yang;}\r
8 \r
9     import openflow-types {prefix oft;}\r
10     import openflow-protocol {prefix ofproto;}\r
11     import openflow-action {prefix ofaction;}\r
12     import openflow-instruction {prefix ofinstruction;}\r
13     import openflow-extensible-match {prefix oxm;}\r
14 \r
15     revision "2013-10-02" {\r
16         description "OpenFlow 1.3 - augments model";\r
17     }\r
18 \r
19 // OFP_MATCH AUGMENTS\r
20      augment "/oxm:oxm-container/oxm:match-entries" {\r
21          ext:augment-identifier "port-number-match-entry";\r
22          leaf port-number {\r
23              type oft:port-number;\r
24          }\r
25      }\r
26      augment "/oxm:oxm-container/oxm:match-entries" {\r
27          ext:augment-identifier "metadata-match-entry";\r
28          leaf metadata {\r
29              type binary;\r
30          }\r
31      }\r
32      augment "/oxm:oxm-container/oxm:match-entries" {\r
33          ext:augment-identifier "mask-match-entry";\r
34          leaf mask {\r
35              type binary;\r
36          }\r
37      }\r
38      augment "/oxm:oxm-container/oxm:match-entries" {\r
39          ext:augment-identifier "mac-address-match-entry";\r
40          leaf mac-address {\r
41              type yang:mac-address;\r
42          }\r
43      }\r
44      augment "/oxm:oxm-container/oxm:match-entries" {\r
45          ext:augment-identifier "eth-type-match-entry";\r
46          leaf eth-type {\r
47              type oft:ether-type;\r
48          }\r
49      }\r
50      augment "/oxm:oxm-container/oxm:match-entries" {\r
51          ext:augment-identifier "vlan-vid-match-entry";\r
52          leaf vlan-vid {\r
53              type uint16;\r
54          }\r
55      }\r
56      augment "/oxm:oxm-container/oxm:match-entries" {\r
57          ext:augment-identifier "vlan-pcp-match-entry";\r
58          leaf vlan-pcp {\r
59              type uint8;\r
60          }\r
61      }\r
62      augment "/oxm:oxm-container/oxm:match-entries" {\r
63          ext:augment-identifier "dscp-match-entry";\r
64          leaf dscp {\r
65              type inet:dscp;\r
66          }\r
67      }\r
68      augment "/oxm:oxm-container/oxm:match-entries" {\r
69          ext:augment-identifier "ecn-match-entry";\r
70          leaf ecn {\r
71              type uint8;\r
72          }\r
73      }\r
74      augment "/oxm:oxm-container/oxm:match-entries" {\r
75          ext:augment-identifier "protocol-number-match-entry";\r
76          leaf protocol-number {\r
77              type uint8;\r
78          }\r
79      }\r
80      augment "/oxm:oxm-container/oxm:match-entries" {\r
81          ext:augment-identifier "ipv4-prefix-match-entry";\r
82          leaf ipv4-prefix {\r
83              type inet:ipv4-prefix;\r
84          }\r
85      }\r
86      augment "/oxm:oxm-container/oxm:match-entries" {\r
87          ext:augment-identifier "port-match-entry";\r
88          leaf port {\r
89              type inet:port-number;\r
90          }\r
91      }\r
92      augment "/oxm:oxm-container/oxm:match-entries" {\r
93          ext:augment-identifier "icmpv4-type-match-entry";\r
94          leaf icmpv4-type {\r
95              type uint8;\r
96          }\r
97      }\r
98      augment "/oxm:oxm-container/oxm:match-entries" {\r
99          ext:augment-identifier "icmpv4-code-match-entry";\r
100          leaf icmpv4-code {\r
101              type uint8;\r
102          }\r
103      }\r
104      augment "/oxm:oxm-container/oxm:match-entries" {\r
105          ext:augment-identifier "op-code-match-entry";\r
106          leaf op-code {\r
107              type uint16;\r
108          }\r
109      }\r
110      augment "/oxm:oxm-container/oxm:match-entries" {\r
111          ext:augment-identifier "ipv6-prefix-match-entry";\r
112          leaf ipv6-prefix {\r
113              type inet:ipv6-prefix;\r
114          }\r
115      }\r
116      augment "/oxm:oxm-container/oxm:match-entries" {\r
117          ext:augment-identifier "ipv6-flabel-match-entry";\r
118          leaf ipv6-flabel {\r
119              type inet:ipv6-flow-label;\r
120          }\r
121      }\r
122      augment "/oxm:oxm-container/oxm:match-entries" {\r
123          ext:augment-identifier "icmpv6-type-match-entry";\r
124          leaf icmpv6-type {\r
125              type uint8;\r
126          }\r
127      }\r
128      augment "/oxm:oxm-container/oxm:match-entries" {\r
129          ext:augment-identifier "icmpv6-code-match-entry";\r
130          leaf icmpv6-code {\r
131              type uint8;\r
132          }\r
133      }\r
134      augment "/oxm:oxm-container/oxm:match-entries" {\r
135          ext:augment-identifier "ipv6-address-match-entry";\r
136          leaf ipv6-address {\r
137              type inet:ipv6-address;\r
138          }\r
139      }\r
140      augment "/oxm:oxm-container/oxm:match-entries" {\r
141          ext:augment-identifier "mpls-label-match-entry";\r
142          leaf mpls-label {\r
143              type uint32;\r
144          }\r
145      }\r
146      augment "/oxm:oxm-container/oxm:match-entries" {\r
147          ext:augment-identifier "tc-match-entry";\r
148          leaf tc {\r
149              type uint8;\r
150          }\r
151      }\r
152      augment "/oxm:oxm-container/oxm:match-entries" {\r
153          ext:augment-identifier "bos-match-entry";\r
154          leaf bos {\r
155              type boolean;\r
156          }\r
157      }\r
158      augment "/oxm:oxm-container/oxm:match-entries" {\r
159          ext:augment-identifier "isid-match-entry";\r
160          leaf isid {\r
161              type uint32;\r
162          }\r
163      }\r
164      augment "/oxm:oxm-container/oxm:match-entries" {\r
165          ext:augment-identifier "pseudo-field-match-entry";\r
166          leaf pseudo-field {\r
167              type bits {\r
168                  bit nonext {\r
169                      description "<No next header> encountered.";\r
170                      position 0;\r
171                  }\r
172                  bit esp {\r
173                      description "Encrypted Sec Payload header present.";\r
174                      position 1;\r
175                  }\r
176                  bit auth {\r
177                      description "Authentication header present.";\r
178                      position 2;\r
179                  }\r
180                  bit dest {\r
181                      description "1 or 2 dest headers present.";\r
182                      position 3;\r
183                  }\r
184                  bit frag {\r
185                      description "Fragment header present.";\r
186                      position 4;\r
187                  }\r
188                  bit router {\r
189                      description "Router header present.";\r
190                      position 5;\r
191                  }\r
192                  bit hop {\r
193                      description "Hop-by-hop header present.";\r
194                      position 6;\r
195                  }\r
196                  bit unrep {\r
197                      description "Unexpected repeats encountered.";\r
198                      position 7;\r
199                  }\r
200                  bit unseq {\r
201                      description "Unexpected sequencing encountered.";\r
202                      position 8;\r
203                  }\r
204              }\r
205          }\r
206      }\r
207 \r
208 // OFP_ACTION AUGMENTS\r
209      augment "/ofaction:actions-container/ofaction:action" {\r
210          ext:augment-identifier "port-action";\r
211          leaf port {\r
212              type oft:any-port-number;\r
213          }\r
214      }\r
215      augment "/ofaction:actions-container/ofaction:action" {\r
216          ext:augment-identifier "max-length-action";\r
217          leaf max-length {\r
218              type uint16;\r
219          }\r
220      }\r
221      augment "/ofaction:actions-container/ofaction:action" {\r
222          ext:augment-identifier "mpls-ttl-action";\r
223          leaf mpls-ttl {\r
224              type uint8;\r
225          }\r
226      }\r
227      augment "/ofaction:actions-container/ofaction:action" {\r
228          ext:augment-identifier "ethertype-action";\r
229          leaf ethertype {\r
230              type oft:ether-type;\r
231          }\r
232      }\r
233      augment "/ofaction:actions-container/ofaction:action" {\r
234          ext:augment-identifier "queue-id-action";\r
235          leaf queue-id {\r
236              type uint32;\r
237          }\r
238      }\r
239      augment "/ofaction:actions-container/ofaction:action" {\r
240          ext:augment-identifier "group-id-action";\r
241          leaf group-id {\r
242              type uint32;\r
243          }\r
244      }\r
245      augment "/ofaction:actions-container/ofaction:action" {\r
246          ext:augment-identifier "nw-ttl-action";\r
247          leaf nw-ttl {\r
248              type uint8;\r
249          }\r
250      }\r
251      augment "/ofaction:actions-container/ofaction:action" {\r
252          ext:augment-identifier "oxm-fields-action";\r
253          uses oxm:oxm-fields;\r
254      }\r
255      augment "/ofaction:actions-container/ofaction:action" {\r
256          ext:augment-identifier "experimenter-action";\r
257          leaf experimenter {\r
258              type uint32;\r
259          }\r
260      }\r
261 \r
262 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
263      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
264          ext:augment-identifier "instruction-ids-table-feature-properties";\r
265          list instruction-ids {\r
266              uses ofinstruction:instructions;\r
267          }\r
268      }\r
269      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
270          ext:augment-identifier "next-table-ids-table-feature-properties";\r
271          list next-table-ids {\r
272              leaf table-id {\r
273                  type uint8;\r
274              }\r
275          }\r
276      }\r
277      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
278          ext:augment-identifier "action-ids-table-feature-properties";\r
279          list action-ids {\r
280              uses ofaction:action-header;\r
281          }\r
282      }\r
283      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
284          ext:augment-identifier "oxm-ids-table-feature-properties";\r
285          list oxm-ids {\r
286              uses oxm:oxm-fields;\r
287          }\r
288      }\r
289      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
290          ext:augment-identifier "experimenter-table-feature-properties";\r
291          leaf experimenter {\r
292              type uint32;\r
293          }\r
294          leaf exp-type {\r
295              type uint32;\r
296          }\r
297          leaf data {\r
298              type binary;\r
299          }\r
300      }\r
301 \r
302 // OFP_INSTRUCTION AUGMENTS\r
303      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
304          ext:augment-identifier "table-id-instruction";\r
305          leaf table-id {\r
306              type uint8;\r
307          }\r
308      }\r
309      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
310          ext:augment-identifier "metadata-instruction";\r
311          leaf metadata {\r
312              type binary;\r
313          }\r
314          leaf metadata-mask {\r
315              type binary;\r
316          }\r
317      }\r
318      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
319          ext:augment-identifier "action-header-instruction";\r
320          list actions {\r
321              uses ofaction:action-header;\r
322          }\r
323      }\r
324      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
325          ext:augment-identifier "meter-id-instruction";\r
326          leaf meter-id {\r
327              type uint32;\r
328          }\r
329      }\r
330      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
331          ext:augment-identifier "experimenter-instruction";\r
332          leaf experimenter {\r
333              type uint32;\r
334          }\r
335      }\r
336 }