a62f91ac0ffc026a39ba5cbe02358c268055e6ea
[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 "port-match-entry";\r
82          leaf port {\r
83              type inet:port-number;\r
84          }\r
85      }\r
86      augment "/oxm:oxm-container/oxm:match-entries" {\r
87          ext:augment-identifier "icmpv4-type-match-entry";\r
88          leaf icmpv4-type {\r
89              type uint8;\r
90          }\r
91      }\r
92      augment "/oxm:oxm-container/oxm:match-entries" {\r
93          ext:augment-identifier "icmpv4-code-match-entry";\r
94          leaf icmpv4-code {\r
95              type uint8;\r
96          }\r
97      }\r
98      augment "/oxm:oxm-container/oxm:match-entries" {\r
99          ext:augment-identifier "op-code-match-entry";\r
100          leaf op-code {\r
101              type uint16;\r
102          }\r
103      }\r
104      augment "/oxm:oxm-container/oxm:match-entries" {\r
105          ext:augment-identifier "ipv6-flabel-match-entry";\r
106          leaf ipv6-flabel {\r
107              type inet:ipv6-flow-label;\r
108          }\r
109      }\r
110      augment "/oxm:oxm-container/oxm:match-entries" {\r
111          ext:augment-identifier "icmpv6-type-match-entry";\r
112          leaf icmpv6-type {\r
113              type uint8;\r
114          }\r
115      }\r
116      augment "/oxm:oxm-container/oxm:match-entries" {\r
117          ext:augment-identifier "icmpv6-code-match-entry";\r
118          leaf icmpv6-code {\r
119              type uint8;\r
120          }\r
121      }\r
122      augment "/oxm:oxm-container/oxm:match-entries" {\r
123          ext:augment-identifier "ipv6-address-match-entry";\r
124          leaf ipv6-address {\r
125              type inet:ipv6-address;\r
126          }\r
127      }\r
128      augment "/oxm:oxm-container/oxm:match-entries" {\r
129          ext:augment-identifier "ipv4-address-match-entry";\r
130          leaf ipv4-address {\r
131              type inet:ipv4-address;\r
132          }\r
133      }\r
134      augment "/oxm:oxm-container/oxm:match-entries" {\r
135          ext:augment-identifier "mpls-label-match-entry";\r
136          leaf mpls-label {\r
137              type uint32;\r
138          }\r
139      }\r
140      augment "/oxm:oxm-container/oxm:match-entries" {\r
141          ext:augment-identifier "tc-match-entry";\r
142          leaf tc {\r
143              type uint8;\r
144          }\r
145      }\r
146      augment "/oxm:oxm-container/oxm:match-entries" {\r
147          ext:augment-identifier "bos-match-entry";\r
148          leaf bos {\r
149              type boolean;\r
150          }\r
151      }\r
152      augment "/oxm:oxm-container/oxm:match-entries" {\r
153          ext:augment-identifier "isid-match-entry";\r
154          leaf isid {\r
155              type uint32;\r
156          }\r
157      }\r
158      augment "/oxm:oxm-container/oxm:match-entries" {\r
159          ext:augment-identifier "pseudo-field-match-entry";\r
160          leaf pseudo-field {\r
161              type bits {\r
162                  bit nonext {\r
163                      description "<No next header> encountered.";\r
164                      position 0;\r
165                  }\r
166                  bit esp {\r
167                      description "Encrypted Sec Payload header present.";\r
168                      position 1;\r
169                  }\r
170                  bit auth {\r
171                      description "Authentication header present.";\r
172                      position 2;\r
173                  }\r
174                  bit dest {\r
175                      description "1 or 2 dest headers present.";\r
176                      position 3;\r
177                  }\r
178                  bit frag {\r
179                      description "Fragment header present.";\r
180                      position 4;\r
181                  }\r
182                  bit router {\r
183                      description "Router header present.";\r
184                      position 5;\r
185                  }\r
186                  bit hop {\r
187                      description "Hop-by-hop header present.";\r
188                      position 6;\r
189                  }\r
190                  bit unrep {\r
191                      description "Unexpected repeats encountered.";\r
192                      position 7;\r
193                  }\r
194                  bit unseq {\r
195                      description "Unexpected sequencing encountered.";\r
196                      position 8;\r
197                  }\r
198              }\r
199          }\r
200      }\r
201 \r
202 // OFP_ACTION AUGMENTS\r
203      augment "/ofaction:actions-container/ofaction:action" {\r
204          ext:augment-identifier "port-action";\r
205          leaf port {\r
206              type oft:port-number;\r
207          }\r
208      }\r
209      augment "/ofaction:actions-container/ofaction:action" {\r
210          ext:augment-identifier "max-length-action";\r
211          leaf max-length {\r
212              type uint16;\r
213          }\r
214      }\r
215      augment "/ofaction:actions-container/ofaction:action" {\r
216          ext:augment-identifier "mpls-ttl-action";\r
217          leaf mpls-ttl {\r
218              type uint8;\r
219          }\r
220      }\r
221      augment "/ofaction:actions-container/ofaction:action" {\r
222          ext:augment-identifier "ethertype-action";\r
223          leaf ethertype {\r
224              type oft:ether-type;\r
225          }\r
226      }\r
227      augment "/ofaction:actions-container/ofaction:action" {\r
228          ext:augment-identifier "queue-id-action";\r
229          leaf queue-id {\r
230              type uint32;\r
231          }\r
232      }\r
233      augment "/ofaction:actions-container/ofaction:action" {\r
234          ext:augment-identifier "group-id-action";\r
235          leaf group-id {\r
236              type uint32;\r
237          }\r
238      }\r
239      augment "/ofaction:actions-container/ofaction:action" {\r
240          ext:augment-identifier "nw-ttl-action";\r
241          leaf nw-ttl {\r
242              type uint8;\r
243          }\r
244      }\r
245      augment "/ofaction:actions-container/ofaction:action" {\r
246          ext:augment-identifier "oxm-fields-action";\r
247          uses oxm:oxm-fields;\r
248      }\r
249      augment "/ofaction:actions-container/ofaction:action" {\r
250          ext:augment-identifier "experimenter-action";\r
251          leaf experimenter {\r
252              type uint32;\r
253          }\r
254      }\r
255 \r
256 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
257      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
258          ext:augment-identifier "instruction-ids-table-feature-properties";\r
259          list instruction-ids {\r
260              uses ofinstruction:instructions;\r
261          }\r
262      }\r
263      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
264          ext:augment-identifier "next-table-ids-table-feature-properties";\r
265          list next-table-ids {\r
266              leaf table-id {\r
267                  type uint8;\r
268              }\r
269          }\r
270      }\r
271      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
272          ext:augment-identifier "action-ids-table-feature-properties";\r
273          list action-ids {\r
274              uses ofaction:action-header;\r
275          }\r
276      }\r
277      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
278          ext:augment-identifier "oxm-ids-table-feature-properties";\r
279          list oxm-ids {\r
280              uses oxm:oxm-fields;\r
281          }\r
282      }\r
283      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
284          ext:augment-identifier "experimenter-table-feature-properties";\r
285          leaf experimenter {\r
286              type uint32;\r
287          }\r
288          leaf exp-type {\r
289              type uint32;\r
290          }\r
291          leaf data {\r
292              type binary;\r
293          }\r
294      }\r
295 \r
296 // OFP_INSTRUCTION AUGMENTS\r
297      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
298          ext:augment-identifier "table-id-instruction";\r
299          leaf table-id {\r
300              type uint8;\r
301          }\r
302      }\r
303      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
304          ext:augment-identifier "metadata-instruction";\r
305          leaf metadata {\r
306              type binary;\r
307          }\r
308          leaf metadata-mask {\r
309              type binary;\r
310          }\r
311      }\r
312      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
313          ext:augment-identifier "action-header-instruction";\r
314          list actions {\r
315              uses ofaction:action-header;\r
316          }\r
317      }\r
318      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
319          ext:augment-identifier "meter-id-instruction";\r
320          leaf meter-id {\r
321              type uint32;\r
322          }\r
323      }\r
324      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
325          ext:augment-identifier "experimenter-instruction";\r
326          leaf experimenter {\r
327              type uint32;\r
328          }\r
329      }\r
330 }