Add method to register listener for unknown msg
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-action.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-action {
10     namespace "urn:opendaylight:openflow:common:action";
11     prefix "ofaction";
12
13     import ietf-inet-types {prefix inet;}
14     import ietf-yang-types {prefix yang;}
15
16     import openflow-types { prefix oft; }
17     import openflow-extensible-match { prefix oxm;}
18
19     revision "2015-02-03" {
20         description "#NOT_PUBLISHED# OpenFlow 1.3 - action model";
21     }
22
23     identity experimenter-action-sub-type {
24         description "The base identity for vendor's actions.";
25     }
26
27     container action-container {
28         uses action-grouping;
29     }
30
31     grouping actions-grouping {
32         list action {
33             uses action-grouping;
34             leaf experimenter-id {
35                 type oft:experimenter-id;
36             }
37         }
38     }
39
40     grouping action-grouping {
41         choice action-choice {
42             case output-action-case {
43                 container output-action {
44                     leaf port {
45                         type oft:port-number;
46                     }
47                     leaf max-length {
48                         type uint16;
49                     }
50                 }
51             }
52             case copy-ttl-out-case {
53                 // empty action
54             }
55             case copy-ttl-in-case {
56                 // empty action
57             }
58             case set-mpls-ttl-case {
59                 container set-mpls-ttl-action {
60                     leaf mpls-ttl {
61                         type uint8;
62                     }
63                 }
64             }
65             case dec-mpls-ttl-case {
66                 // empty action
67             }
68             case push-vlan-case {
69                 container push-vlan-action {
70                     leaf ethertype {
71                         type oft:ether-type;
72                     }
73                 }
74             }
75             case pop-vlan-case {
76                 // empty action
77             }
78             case push-mpls-case {
79                 container push-mpls-action {
80                     leaf ethertype {
81                         type oft:ether-type;
82                     }
83                 }
84             }
85             case pop-mpls-case {
86                 container pop-mpls-action {
87                     leaf ethertype {
88                         type oft:ether-type;
89                     }
90                 }
91             }
92             case set-queue-case {
93                 container set-queue-action {
94                     leaf queue-id {
95                         type uint32;
96                     }
97                 }
98             }
99             case group-case {
100                 container group-action {
101                     leaf group-id {
102                         type uint32;
103                     }
104                 }
105             }
106             case set-nw-ttl-case {
107                 container set-nw-ttl-action {
108                     leaf nw-ttl {
109                         type uint8;
110                     }
111                 }
112             }
113             case dec-nw-ttl-case {
114                 // empty action
115             }
116             case set-field-case {
117                 container set-field-action {
118                     uses oxm:match-entries-grouping;
119                 }
120             }
121             case push-pbb-case {
122                 container push-pbb-action {
123                     leaf ethertype {
124                         type oft:ether-type;
125                     }
126                 }
127             }
128             case pop-pbb-case {
129                 // empty action
130             }
131         // OF1.0 structures
132             case set-vlan-vid-case {
133                 container set-vlan-vid-action {
134                     leaf vlan-vid {
135                         type uint16;
136                     }
137                 }
138             }
139             case set-vlan-pcp-case {
140                 container set-vlan-pcp-action {
141                     leaf vlan-pcp {
142                         type uint8;
143                     }
144                 }
145             }
146             case strip-vlan-case {
147                 // empty action
148             }
149             case set-dl-src-case {
150                 container set-dl-src-action {
151                     leaf dl-src-address {
152                         type yang:mac-address;
153                     }
154                 }
155             }
156             case set-dl-dst-case {
157                 container set-dl-dst-action {
158                     leaf dl-dst-address {
159                         type yang:mac-address;
160                     }
161                 }
162             }
163             case set-nw-src-case {
164                 container set-nw-src-action {
165                     leaf ip-address {
166                         type inet:ipv4-address;
167                     }
168                 }
169             }
170             case set-nw-dst-case {
171                 container set-nw-dst-action {
172                     leaf ip-address {
173                         type inet:ipv4-address;
174                     }
175                 }
176             }
177             case set-nw-tos-case {
178                 container set-nw-tos-action {
179                     leaf nw-tos {
180                         type uint8;
181                     }
182                 }
183             }
184             case set-tp-src-case {
185                 container set-tp-src-action {
186                     leaf port {
187                         type oft:port-number;
188                     }
189                 }
190             }
191             case set-tp-dst-case {
192                 container set-tp-dst-action {
193                     leaf port {
194                         type oft:port-number;
195                     }
196                 }
197             }
198             case enqueue-case {
199                 container enqueue-action {
200                     leaf port {
201                         type oft:port-number;
202                     }
203                     leaf queue-id {
204                         type oft:queue-id;
205                     }
206                 }
207             }
208         }
209     }
210
211 }