Modify the java-client to use the build-helper-maven-plugin
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / 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 "2010-09-24";}
6     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
7     import opendaylight-l2-types {prefix l2t; revision-date "2013-08-27";}
8     
9     revision "2013-11-12" {
10         description "Initial revision of action service";
11     }
12     
13     typedef vlan-cfi {
14         type int32;    
15     }
16
17     grouping address {
18         choice address {
19             case ipv4 {
20                 leaf ipv4-address {
21                     type inet:ipv4-prefix;
22                 }
23             }
24             case ipv6 {
25                 leaf ipv6-address {
26                     type inet:ipv6-prefix;
27                 }
28             }
29         }
30     }  
31     
32     grouping action-list {
33         list action {
34             key "order";
35             leaf order {
36                 type int32;
37             }
38             uses action;
39         }
40     }
41     
42     grouping action {
43         choice action {
44             case output-action {
45                 leaf-list output-node-connector {
46                     type inet:uri;
47                 }
48                 
49                 leaf max-length {
50                     type uint16 {
51                         range "0..65294";
52                     }
53                 }                
54             }
55
56             case controller-action {
57                 leaf max-length {
58                     type uint16 {
59                         range "0..65294";
60                     }
61                 }
62             }
63
64             case set-queue-action {
65                 leaf queue {
66                     type string; 
67                 }
68             }
69
70             case pop-mpls-action {
71                 leaf ethernet-type {
72                     type uint16; // TODO: define ethertype type
73                 }
74             }
75
76             case set-mpls-ttl-action {
77                 leaf mpls-ttl {
78                     type uint8;
79                 }
80             }
81
82             case set-nw-ttl-action {
83                 leaf nw-ttl {
84                     type uint8;
85                 }
86             }
87
88             case push-pbb-action {
89                 leaf ethernet-type {
90                     type uint16; // TODO: define ethertype type
91                 }
92             }
93
94             case pop-pbb-action {
95                 
96             }
97             
98             case push-mpls-action {
99                 leaf ethernet-type {
100                     type uint16; // TODO: define ethertype type
101                 }
102             }
103             
104             case dec-mpls-ttl {
105             }
106             
107             case dec-nw-ttl {
108             }
109             
110             case drop-action {
111             }
112             
113             case flood-action {
114             }
115             
116             case flood-all-action {
117             }
118             
119             case hw-path-action {
120             }
121             
122             case loopback-action {
123             }
124             
125             case pop-vlan-action {
126             }
127             
128             case push-vlan-action {
129                 leaf ethernet-type {
130                     type uint16; // TODO: define ethertype type
131                 }
132                 leaf tag {               // TPID - 16 bits
133                     type int32;
134                 } 
135                 leaf pcp {               // PCP - 3 bits
136                     type int32;
137                 }
138                 leaf cfi {               // CFI - 1 bit (drop eligible)
139                     type vlan-cfi;
140                 }
141                 leaf vlan-id {           // VID - 12 bits
142                     type l2t:vlan-id;
143                 }
144 //                leaf tci {               //TCI = [PCP + CFI + VID]
145 //                }
146 //                leaf header {            //header = [TPID + TCI] 
147 //                }
148             }
149             
150             case copy-ttl-out {
151             }
152             
153             case copy-ttl-in {
154             }
155             
156             case set-dl-dst-action {
157                 leaf address {
158                     type yang:mac-address;
159                 }
160             }
161             
162             case set-dl-src-action {
163                 leaf address {
164                     type yang:mac-address;
165                 }
166             }
167             case group-action {
168                 leaf group {
169                     type string;
170                 }
171             }
172             
173             case set-dl-type-action {
174                 leaf dl-type {
175                     type l2t:ether-type;
176                 }
177             }
178             
179             case set-next-hop-action {
180                 uses address;
181             }
182             
183             case set-nw-dst-action {
184                 uses address;            
185             }
186             
187             case set-nw-src-action{
188                 uses address;            
189             }
190             
191             case set-nw-tos-action {
192                 leaf tos {
193                     type int32;
194                 }
195             }
196             
197             case set-tp-dst-action {
198                 leaf port {
199                     type inet:port-number;
200                 }                
201             }
202             case set-tp-src-action {
203                 leaf port {
204                     type inet:port-number;
205                 }                
206             }
207             case set-vlan-cfi-action {
208                 leaf vlan-cfi {
209                     type vlan-cfi;
210                 }
211             }
212             
213             case set-vlan-id-action {
214                 leaf vlan-id {
215                     type l2t:vlan-id;
216                 } 
217             }
218             
219             case set-vlan-pcp-action {
220                 leaf vlan-pcp {
221                     type l2t:vlan-pcp;
222                 }            
223             }
224             
225             case sw-path-action {            
226             }  
227         }
228     }
229 }