d90e4400cfc09e8becc1a9910bf366889c200038
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-augments.yang
1 /*
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9  module openflow-augments {
10     namespace "urn:opendaylight:openflow:augments";
11     prefix "aug";
12
13     import yang-ext {prefix ext;}
14     import ietf-inet-types {prefix inet;}
15     import ietf-yang-types {prefix yang;}
16
17     import openflow-types {prefix oft;}
18     import openflow-protocol {prefix ofproto;}
19     import openflow-action {prefix ofaction;}
20     import openflow-instruction {prefix ofinstruction;}
21     import openflow-extensible-match {prefix oxm;}
22
23     revision "2015-02-25" {
24         description "OpenFlow 1.3 - augments model.
25                     Please visit
26                     https://wiki.opendaylight.org/view/File:OpenFlow_Protocol_Library_-_Project_documentation.pdf
27                      - Augmentation Tables chapter";
28     }
29
30 // OFP_MATCH AUGMENTS
31      augment "/oxm:oxm-container/oxm:match-entry-value" {
32          ext:augment-identifier "experimenter-id-match-entry";
33          case experimenter-id-case {
34              container experimenter {
35                  leaf experimenter {
36                      type oft:experimenter-id;
37                  }
38              }
39          }
40      }
41
42 // OFP_ACTION AUGMENTS
43      augment "/ofaction:actions-container/ofaction:action" {
44          ext:augment-identifier "port-action";
45          leaf port {
46              type oft:port-number;
47          }
48      }
49      augment "/ofaction:actions-container/ofaction:action" {
50          ext:augment-identifier "max-length-action";
51          leaf max-length {
52              type uint16;
53          }
54      }
55      augment "/ofaction:actions-container/ofaction:action" {
56          ext:augment-identifier "mpls-ttl-action";
57          leaf mpls-ttl {
58              type uint8;
59          }
60      }
61      augment "/ofaction:actions-container/ofaction:action" {
62          ext:augment-identifier "ethertype-action";
63          leaf ethertype {
64              type oft:ether-type;
65          }
66      }
67      augment "/ofaction:actions-container/ofaction:action" {
68          ext:augment-identifier "queue-id-action";
69          leaf queue-id {
70              type uint32;
71          }
72      }
73      augment "/ofaction:actions-container/ofaction:action" {
74          ext:augment-identifier "group-id-action";
75          leaf group-id {
76              type uint32;
77          }
78      }
79      augment "/ofaction:actions-container/ofaction:action" {
80          ext:augment-identifier "nw-ttl-action";
81          leaf nw-ttl {
82              type uint8;
83          }
84      }
85      augment "/ofaction:actions-container/ofaction:action" {
86          ext:augment-identifier "oxm-fields-action";
87          uses oxm:match-entries-grouping;
88      }
89      augment "/ofaction:actions-container/ofaction:action" {
90          ext:augment-identifier "experimenter-id-action";
91          leaf experimenter {
92              type oft:experimenter-id;
93          }
94          leaf sub-type {
95             type identityref {
96                 base ofaction:experimenter-action-sub-type;
97             }
98          }
99      }
100      // OF1.0 structures
101      augment "/ofaction:actions-container/ofaction:action" {
102          ext:augment-identifier "vlan-vid-action";
103          leaf vlan-vid {
104              type uint16;
105          }
106      }
107      augment "/ofaction:actions-container/ofaction:action" {
108          ext:augment-identifier "vlan-pcp-action";
109          leaf vlan-pcp {
110              type uint8;
111          }
112      }
113      augment "/ofaction:actions-container/ofaction:action" {
114          ext:augment-identifier "dl-address-action";
115          leaf dl-address {
116              type yang:mac-address;
117          }
118      }
119      augment "/ofaction:actions-container/ofaction:action" {
120          ext:augment-identifier "nw-tos-action";
121          leaf nw-tos {
122              type uint8;
123          }
124      }
125      augment "/ofaction:actions-container/ofaction:action" {
126          ext:augment-identifier "ip-address-action";
127          leaf ip-address {
128              type inet:ipv4-address;
129          }
130      }
131
132 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS
133      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
134          ext:augment-identifier "instruction-related-table-feature-property";
135          uses ofinstruction:instructions-grouping;
136      }
137      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
138          ext:augment-identifier "next-table-related-table-feature-property";
139          list next-table-ids {
140              config false;
141              leaf table-id {
142                  type uint8;
143              }
144          }
145      }
146      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
147          ext:augment-identifier "action-related-table-feature-property";
148          uses ofaction:actions-grouping;
149      }
150      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
151          ext:augment-identifier "oxm-related-table-feature-property";
152          uses oxm:match-entries-grouping;
153      }
154      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
155          ext:augment-identifier "experimenter-id-table-feature-property";
156          leaf experimenter {
157              type oft:experimenter-id;
158          }
159          leaf exp-type {
160              type uint32;
161          }
162      }
163
164 // OFP_INSTRUCTION AUGMENTS
165      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
166          ext:augment-identifier "table-id-instruction";
167          leaf table-id {
168              type uint8;
169          }
170      }
171      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
172          ext:augment-identifier "metadata-instruction";
173          leaf metadata {
174              type binary;
175          }
176          leaf metadata-mask {
177              type binary;
178          }
179      }
180      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
181          ext:augment-identifier "actions-instruction";
182          uses ofaction:actions-grouping;
183      }
184      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
185          ext:augment-identifier "meter-id-instruction";
186          leaf meter-id {
187              type uint32;
188          }
189      }
190      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
191          ext:augment-identifier "experimenter-id-instruction";
192          leaf experimenter {
193              type oft:experimenter-id;
194          }
195      }
196
197 // OFP_QUEUE_PROP AUGMENTS
198      augment "/ofproto:queue-prop-container/ofproto:queue-property" {
199          ext:augment-identifier "rate-queue-property";
200          leaf rate {
201              type uint16;
202          }
203      }
204      augment "/ofproto:queue-prop-container/ofproto:queue-property" {
205          ext:augment-identifier "experimenter-id-queue-property";
206          leaf experimenter {
207              type oft:experimenter-id;
208          }
209      }
210
211 // OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3)
212      augment "/ofproto:error-message" {
213          ext:augment-identifier "experimenter-id-error";
214          leaf experimenter {
215              type oft:experimenter-id;
216          }
217      }
218
219 // OFP_MULTIPART AUGMENTS
220      augment "/ofproto:multipart-request/input/ofproto:multipart-request-body/ofproto:multipart-request-experimenter-case/ofproto:multipart-request-experimenter" {
221          ext:augment-identifier "experimenter-id-multipart-request";
222          leaf experimenter {
223              type oft:experimenter-id;
224          }
225          leaf exp-type {
226              type uint32;
227          }
228      }
229      augment "/ofproto:multipart-reply-message/ofproto:multipart-reply-body/ofproto:multipart-reply-experimenter-case/ofproto:multipart-reply-experimenter" {
230          ext:augment-identifier "experimenter-id-multipart-reply";
231          leaf experimenter {
232              type oft:experimenter-id;
233          }
234          leaf exp-type {
235              type uint32;
236          }
237      }
238
239 // OFP_METER_BAND AUGMENTS
240      augment "/ofproto:meter-band-container/ofproto:meter-band/ofproto:meter-band-experimenter-case/ofproto:meter-band-experimenter" {
241          ext:augment-identifier "experimenter-id-meter-band";
242          leaf experimenter {
243              type oft:experimenter-id;
244          }
245      }
246 }