292bd96113008b193a9e23afdeff88d2f281dbe2
[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:action-container/ofaction:action-choice" {
44          ext:augment-identifier "experimenter-id-action";
45          case experimenter-id-case {
46              container experimenter {
47                  leaf experimenter {
48                      type oft:experimenter-id;
49                  }
50                  leaf sub-type {
51                      type identityref {
52                          base ofaction:experimenter-action-sub-type;
53                      }
54                  }
55              }
56          }
57      }
58
59 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS
60      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
61          ext:augment-identifier "instruction-related-table-feature-property";
62          uses ofinstruction:instructions-grouping;
63      }
64      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
65          ext:augment-identifier "next-table-related-table-feature-property";
66          list next-table-ids {
67              config false;
68              leaf table-id {
69                  type uint8;
70              }
71          }
72      }
73      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
74          ext:augment-identifier "action-related-table-feature-property";
75          uses ofaction:actions-grouping;
76      }
77      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
78          ext:augment-identifier "oxm-related-table-feature-property";
79          uses oxm:match-entries-grouping;
80      }
81      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {
82          ext:augment-identifier "experimenter-id-table-feature-property";
83          leaf experimenter {
84              type oft:experimenter-id;
85          }
86          leaf exp-type {
87              type uint32;
88          }
89      }
90
91 // OFP_INSTRUCTION AUGMENTS
92      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
93          ext:augment-identifier "table-id-instruction";
94          leaf table-id {
95              type uint8;
96          }
97      }
98      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
99          ext:augment-identifier "metadata-instruction";
100          leaf metadata {
101              type binary;
102          }
103          leaf metadata-mask {
104              type binary;
105          }
106      }
107      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
108          ext:augment-identifier "actions-instruction";
109          uses ofaction:actions-grouping;
110      }
111      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
112          ext:augment-identifier "meter-id-instruction";
113          leaf meter-id {
114              type uint32;
115          }
116      }
117      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {
118          ext:augment-identifier "experimenter-id-instruction";
119          leaf experimenter {
120              type oft:experimenter-id;
121          }
122      }
123
124 // OFP_QUEUE_PROP AUGMENTS
125      augment "/ofproto:queue-prop-container/ofproto:queue-property" {
126          ext:augment-identifier "rate-queue-property";
127          leaf rate {
128              type uint16;
129          }
130      }
131      augment "/ofproto:queue-prop-container/ofproto:queue-property" {
132          ext:augment-identifier "experimenter-id-queue-property";
133          leaf experimenter {
134              type oft:experimenter-id;
135          }
136      }
137
138 // OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3)
139      augment "/ofproto:error-message" {
140          ext:augment-identifier "experimenter-id-error";
141          leaf experimenter {
142              type oft:experimenter-id;
143          }
144      }
145
146 // OFP_MULTIPART AUGMENTS
147      augment "/ofproto:multipart-request/input/ofproto:multipart-request-body/ofproto:multipart-request-experimenter-case/ofproto:multipart-request-experimenter" {
148          ext:augment-identifier "experimenter-id-multipart-request";
149          leaf experimenter {
150              type oft:experimenter-id;
151          }
152          leaf exp-type {
153              type uint32;
154          }
155      }
156      augment "/ofproto:multipart-reply-message/ofproto:multipart-reply-body/ofproto:multipart-reply-experimenter-case/ofproto:multipart-reply-experimenter" {
157          ext:augment-identifier "experimenter-id-multipart-reply";
158          leaf experimenter {
159              type oft:experimenter-id;
160          }
161          leaf exp-type {
162              type uint32;
163          }
164      }
165
166 // OFP_METER_BAND AUGMENTS
167      augment "/ofproto:meter-band-container/ofproto:meter-band/ofproto:meter-band-experimenter-case/ofproto:meter-band-experimenter" {
168          ext:augment-identifier "experimenter-id-meter-band";
169          leaf experimenter {
170              type oft:experimenter-id;
171          }
172      }
173 }