Eliminate blueprint for southbound-cli commands
[openflowplugin.git] / model / model-flow-base / src / main / yang / opendaylight-action-types.yang
1 module opendaylight-action-types {
2     namespace "urn:opendaylight:action:types";
3     prefix action;
4
5     import ietf-inet-types {prefix inet; revision-date "2013-07-15";}
6     import ietf-yang-types {prefix yang; revision-date "2013-07-15";}
7     import opendaylight-l2-types {prefix l2t; revision-date "2013-08-27";}
8     import opendaylight-match-types {prefix match; revision-date "2013-10-26";}
9
10     revision "2013-11-12" {
11         description "Initial revision of action service";
12     }
13
14     typedef vlan-cfi {
15         type int32;
16     }
17
18     grouping address {
19         choice address {
20             case ipv4 {
21                 leaf ipv4-address {
22                     type inet:ipv4-prefix;
23                 }
24             }
25             case ipv6 {
26                 leaf ipv6-address {
27                     type inet:ipv6-prefix;
28                 }
29             }
30         }
31     }
32
33     container action-types {
34        uses action-list;
35     }
36
37     grouping ordered {
38         leaf order {
39           type int32;
40         }
41     }
42
43     grouping action-list {
44         list action {
45             key "order";
46             uses ordered;
47             uses action;
48         }
49     }
50
51     grouping action {
52         choice action {
53             case output-action-case {
54                 container output-action {
55                     leaf output-node-connector {
56                         type inet:uri;
57                     }
58
59                     leaf max-length {
60                         type uint16;
61                     }
62                 }
63             }
64
65             case controller-action-case {
66                 container controller-action {
67                  leaf max-length {
68                      type uint16;
69                  }
70              }
71             }
72
73
74
75             case set-field-case {
76                 container set-field {
77                      uses match:match;
78                  }
79              }
80
81
82             case set-queue-action-case {
83                 container set-queue-action {
84                  leaf queue {
85                      type string;
86                  }
87                  leaf queue-id {
88                      type uint32;
89                  }
90              }
91             }
92
93            case pop-mpls-action-case {
94                 container pop-mpls-action {
95                  leaf ethernet-type {
96                      type uint16; // TODO: define ethertype type
97                  }
98              }
99             }
100
101
102             case set-mpls-ttl-action-case {
103                 container set-mpls-ttl-action {
104                  leaf mpls-ttl {
105                      type uint8;
106                  }
107              }
108             }
109
110
111             case set-nw-ttl-action-case {
112                 container set-nw-ttl-action {
113                  leaf nw-ttl {
114                      type uint8;
115                  }
116              }
117             }
118
119
120             case push-pbb-action-case {
121                 container push-pbb-action {
122                  leaf ethernet-type {
123                      type uint16; // TODO: define ethertype type
124                  }
125              }
126             }
127
128
129             case pop-pbb-action-case {
130                 container pop-pbb-action {
131                     presence "no content action";
132                 }
133             }
134
135
136             case push-mpls-action-case {
137                 container push-mpls-action {
138                  leaf ethernet-type {
139                      type uint16; // TODO: define ethertype type
140                  }
141              }
142             }
143
144
145             case dec-mpls-ttl-case {
146                 container dec-mpls-ttl {
147                     presence "no content action";
148                 }
149              }
150
151
152             case dec-nw-ttl-case {
153                 container dec-nw-ttl {
154                     presence "no content action";
155                 }
156              }
157
158
159             case drop-action-case {
160                 container drop-action {
161                     presence "no content action";
162                 }
163              }
164
165
166             case flood-action-case {
167                 container flood-action {
168                     presence "no content action";
169                 }
170              }
171
172
173             case flood-all-action-case {
174                 container flood-all-action {
175                     presence "no content action";
176                 }
177              }
178
179
180             case hw-path-action-case {
181                 container hw-path-action {
182                     presence "no content action";
183                 }
184              }
185
186
187             case loopback-action-case {
188                 container loopback-action {
189                     presence "no content action";
190                 }
191              }
192
193
194             case pop-vlan-action-case {
195                 container pop-vlan-action {
196                     presence "no content action";
197                 }
198              }
199
200
201
202             case push-vlan-action-case {
203                 container push-vlan-action {
204                  leaf ethernet-type {
205                      type uint16; // TODO: define ethertype type
206                  }
207                 leaf tag {               // TPID - 16 bits
208                     type int32;
209                 }
210                 leaf pcp {               // PCP - 3 bits
211                     type int32;
212                 }
213                 leaf cfi {               // CFI - 1 bit (drop eligible)
214                     type vlan-cfi;
215                 }
216                 leaf vlan-id {           // VID - 12 bits
217                     type l2t:vlan-id;
218                 }
219 //                leaf tci {               //TCI = [PCP + CFI + VID]
220 //                }
221 //                leaf header {            //header = [TPID + TCI]
222 //                }
223                 }
224              }
225
226             case copy-ttl-out-case {
227                 container copy-ttl-out {
228                     presence "no content action";
229                 }
230              }
231
232
233             case copy-ttl-in-case {
234                 container copy-ttl-in {
235                     presence "no content action";
236                 }
237              }
238
239
240             case set-dl-dst-action-case {
241                 container set-dl-dst-action {
242                  leaf address {
243                      type yang:mac-address;
244                  }
245              }
246             }
247
248
249             case set-dl-src-action-case {
250                 container set-dl-src-action {
251                  leaf address {
252                      type yang:mac-address;
253                  }
254              }
255
256             }
257             case group-action-case {
258                 container group-action {
259                  leaf group {
260                      type string;
261                  }
262
263                 leaf group-id {
264                     type uint32;
265                 }
266              }
267             }
268
269             case set-dl-type-action-case {
270                 container set-dl-type-action {
271                  leaf dl-type {
272                      type l2t:ether-type;
273                  }
274              }
275             }
276
277
278             case set-next-hop-action-case {
279                 container set-next-hop-action {
280                  uses address;
281              }
282             }
283
284
285             case set-nw-dst-action-case {
286                 container set-nw-dst-action {
287                  uses address;
288              }
289             }
290
291
292             case set-nw-src-action-case {
293                 container set-nw-src-action {
294                  uses address;
295              }
296             }
297
298
299             case set-nw-tos-action-case {
300                 container set-nw-tos-action {
301                  leaf tos {
302                      type int32;
303                  }
304              }
305             }
306
307
308             case set-tp-dst-action-case {
309                 container set-tp-dst-action {
310                  leaf port {
311                      type inet:port-number;
312                  }
313                  leaf ip-protocol {
314                      description "IP protocol.";
315                      type uint8;
316                      default 0;
317                  }
318              }
319
320             }
321             case set-tp-src-action-case {
322                 container set-tp-src-action {
323                  leaf port {
324                      type inet:port-number;
325                  }
326                  leaf ip-protocol {
327                      description "IP protocol.";
328                      type uint8;
329                      default 0;
330                  }
331              }
332
333             }
334             case set-vlan-cfi-action-case {
335                 container set-vlan-cfi-action {
336                  leaf vlan-cfi {
337                      type vlan-cfi;
338                  }
339              }
340             }
341
342
343             case set-vlan-id-action-case {
344                 container set-vlan-id-action {
345                  leaf vlan-id {
346                      type l2t:vlan-id;
347                  }
348              }
349             }
350
351
352             case set-vlan-pcp-action-case {
353                 container set-vlan-pcp-action {
354                  leaf vlan-pcp {
355                      type l2t:vlan-pcp;
356                  }
357              }
358             }
359
360             case strip-vlan-action-case {
361                 container strip-vlan-action {
362                     presence "no content action";
363                 }
364              }
365
366             case sw-path-action-case {
367                 container sw-path-action {
368                     presence "no content action";
369                 }
370              }
371          }
372      }
373 }