Integration test, SimpleClient bundle
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-action.yang
1 module openflow-action {
2     namespace "urn:opendaylight:openflow:common:action";
3     prefix "ofaction";
4
5     import openflow-types { prefix oft; }
6
7     revision "2013-07-31" {
8         description "Initial model";
9     }
10
11     identity output {
12         description " Output to switch port. ";
13         base oft:action;
14     }
15     identity copy_ttl_out {
16         description " Copy TTL \"outwards\" -- from next-to-outermost to outermost ";
17         base oft:action;
18     }
19     identity copy_ttl_in {
20         description " Copy TTL \"inwards\" -- from outermost to next-to-outermost ";
21         base oft:action;
22     }
23     identity set_mpls_ttl {
24         description " MPLS TTL ";
25         base oft:action;
26     }
27     identity dec_mpls_ttl {
28         description " Decrement MPLS TTL ";
29         base oft:action;
30     }
31     identity push_vlan {
32         description " Push a new VLAN tag ";
33         base oft:action;
34     }
35     identity pop_vlan {
36         description " Pop the outer VLAN tag ";
37         base oft:action;
38     }
39     identity push_mpls {
40         description " Push a new MPLS tag ";
41         base oft:action;
42     }
43     identity pop_mpls {
44         description " Pop the outer MPLS tag ";
45         base oft:action;
46     }
47     identity set_queue {
48         description " Set queue id when outputting to a port ";
49         base oft:action;
50     }
51     identity group {
52         description " Apply group. ";
53         base oft:action;
54     }
55     identity set_nw_ttl {
56         description " IP TTL. ";
57         base oft:action;
58     }
59     identity dec_nw_ttl {
60         description " Decrement IP TTL. ";
61         base oft:action;
62     }
63     identity set_field {
64         description " Set a header field using OXM TLV format. ";
65         base oft:action;
66     }
67     identity push_pbb {
68         description " Push a new PBB service tag (I-TAG) ";
69         base oft:action;
70     }
71     identity pop_pbb {
72         description " Pop the outer PBB service tag (I-TAG) ";
73         base oft:action;
74     }
75     identity experimenter {
76         description "";
77         base oft:action;
78     }
79     
80     /*
81     grouping output {
82         description 
83             "Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
84             When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
85             number of bytes to send. A 'max_len' of zero means no bytes of the
86             packet should be sent. A 'max_len' of OFPCML_NO_BUFFER means that
87             the packet is not buffered and the complete packet is to be sent to
88             the controller.";
89         leaf port {
90             type oft:any-port-number;
91         }
92         leaf max-length {
93             description "Maximum packet length to be send to controller.";
94             type union {
95                 type uint16 {
96                     range "0..65294"; // 0..0xff0e
97                 }
98                 type enumeration {
99                     enum max {
100                         desription
101                             "maximum max_len value which can be used
102                             to request a specific byte length";
103                         value 65509; //0xffe5
104                     }
105                     enum no-buffer {
106                         description 
107                             "indicates that no buffering should be
108                              applied and the whole packet is to be
109                              sent to the controller";
110                         value 65535; //0xffff
111                     }
112                 }
113             }
114         }
115     }
116
117     grouping group {
118         leaf group {
119             type oft:group-id; // define action group-id type;
120         }
121     }
122
123     grouping set-queue {
124         leaf queue {
125             type oft:queue-id;
126         }
127     }
128
129     grouping set-mpls-ttl {
130         leaf mpls_ttl {
131             type uint8;
132         }
133     }
134
135     grouping set-nw-ttl {
136         leaf nw_ttl {
137             type uint8;
138         }
139     }
140
141     grouping push-pbb {
142         leaf ethertype {
143             type oft:ether-type;
144         }
145     }
146
147     grouping push-mpls {
148         leaf ethertype {
149             type oft:ether-type;
150         }
151     }
152
153     grouping push-vlan {
154         leaf ethertype {
155             type oft:ether-type;
156         }
157     }
158
159     grouping pop-mpls {
160         leaf ethertype {
161             type oft:ether-type;
162         }
163     }
164
165     grouping set-field {
166         container field {
167             // TODO: figure definition
168         }
169     }
170     */
171     
172     container actions {
173         uses action-header;
174     }
175     
176     grouping action-header {
177         leaf type {
178             type identityref {
179                 base oft:action;
180             }
181         }
182     }
183     
184 }