added content of grouping in of-protocol
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-instruction.yang
1 module openflow-instruction {
2     namespace "urn:opendaylight:openflow:common:instruction";
3     prefix "ofinstruction";
4
5     import openflow-types { prefix oft; }
6
7     revision "2013-07-31" {
8        // description "Initial model";
9     }
10     /*
11     identity goto_table {
12         //description " Setup the next table in the lookup pipeline";
13         base oft:instruction;
14     }
15     identity write_metadata {
16         //description " Setup the metadata field for use later in     pipeline";
17         base oft:instruction;
18     }
19     identity write_actions {
20         description " Write the action(s) onto the datapath action set";
21         base oft:instruction;
22     }
23     identity apply_actions {
24         description " Applies the action(s) immediately";
25         base oft:instruction;
26     }
27     identity clear_actions {
28         description " Clears all actions from the datapath action set";
29         base oft:instruction;
30     }
31     identity meter {
32         description " Apply meter (rate limiter)";
33         base oft:instruction;
34     }
35     identity experimenter {
36         description "Experimenter instruction";
37         base oft:instruction;
38     }
39     */
40     // Structures
41
42     grouping goto-table {
43         description " Setup the next table in the lookup pipeline";
44         leaf table {
45             type oft:table-id; // 
46         }
47     }
48     grouping write-metadata {
49         description " Setup the metadata field for use later in     pipeline";
50         leaf metadata {
51             type oft:metadata;
52         }
53         leaf mask {
54             type oft:metadata;
55         }
56     }
57     grouping actions {
58         leaf type {
59             type enumeration {
60                 enum write {
61                     description " Write the action(s) onto the datapath action set";            
62                 }
63                 enum apply {
64                     description " Applies the action(s) immediately";
65                 }
66                 enum clear {
67                     description " Clears all actions from the datapath action set";
68                 }
69             }
70         }
71         list action {
72             // TBD
73         }
74     }
75     
76     grouping meter {
77         description " Apply meter (rate limiter)";
78         leaf meter-id {
79             type oft:meter-id;
80         }
81     }
82
83 }