293e3803cdab7f5b5ed46aa8e2e5933649429b4d
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-instruction.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-instruction {
10     namespace "urn:opendaylight:openflow:common:instruction";
11     prefix "ofinstruction";
12
13     import openflow-types { prefix oft; }
14     import openflow-action {prefix ofaction;}
15
16     revision "2013-07-31" {
17         description "OpenFlow 1.3 - instruction model";
18     }
19
20     container instruction-container {
21         uses instruction-grouping;
22     }
23
24     grouping instructions-grouping {
25         list instruction {
26             config false;
27             uses instruction-grouping;
28         }
29     }
30
31     grouping instruction-grouping {
32         choice instruction-choice {
33             case goto-table-case {
34                 container goto-table {
35                     leaf table-id {
36                         type uint8;
37                     }
38                 }
39             }
40             case write-metadata-case {
41                 container write-metadata {
42                     leaf metadata {
43                         type binary;
44                     }
45                     leaf metadata-mask {
46                         type binary;
47                     }
48                 }
49             }
50             case write-actions-case {
51                 container write-actions {
52                     uses ofaction:actions-grouping;
53                 }
54             }
55             case apply-actions-case {
56                 container apply-actions {
57                     uses ofaction:actions-grouping;
58                 }
59             }
60             case clear-actions-case {
61                 // empty instruction
62             }
63             case meter-case {
64                 container meter {
65                     leaf meter-id {
66                         type uint32;
67                     }
68                 }
69             }
70         }
71     }
72 }