Merge "Replay the installedSwView data structure to populate node flows and group...
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / flow-types.yang
1 module opendaylight-flow-types {
2     namespace "urn:opendaylight:flow:types";
3     prefix flow;
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-match-types {prefix match; revision-date 2013-10-26";}
8     import opendaylight-action-types {prefix action;}
9
10     revision "2013-10-26" {
11         description "Initial revision of flow service";
12     }
13     
14     grouping instruction-list {
15         list instruction {
16             key "order";
17             leaf order {
18                 type int32;
19             }
20             uses instruction;
21         }
22     }
23
24     grouping instruction {
25         choice instruction {
26             case go-to-table {
27                 leaf table_id {
28                     type uint8;
29                 }
30             }
31             
32             case write-metadata {
33                 leaf metadata {
34                     type uint64;
35                 }
36                 
37                 leaf metadata-mask {
38                     type uint64;
39                 }
40             }
41             
42             case write-actions {
43                 uses action:action-list;
44             }
45             
46             case apply-actions {
47                 uses action:action-list;
48             }
49             
50             case clear-actions {
51                 uses action:action-list;
52             }
53             
54             case meter {
55                 leaf meter {
56                     type string;
57                 }
58             }   
59         }
60     }
61     
62     typedef flow-mod-flags {
63         type bits {
64             bit CHECK_OVERLAP;
65             bit RESET_COUNTS;
66             bit NO_PKT_COUNTS;
67             bit NO_BYT_COUNTS;
68             bit SEND_FLOW_REM;
69         }
70     }
71     
72     grouping flow {
73         container match {
74             uses match:match;
75         }
76         
77         container instructions {
78             uses instruction-list;
79         }
80                 
81         leaf priority {
82             type uint16;
83         }
84         
85         leaf idle-timeout {
86             type uint16;
87         }
88         
89         leaf hard-timeout {
90             type uint16;
91         }
92         
93         leaf cookie {
94             type uint64;
95         }
96         
97         leaf container-name {
98             type string; 
99         }
100         
101         leaf cookie_mask {
102             type uint8;
103         }
104         
105         leaf table_id {
106             type uint8;
107         }
108         
109         leaf buffer_id {
110             type uint32;
111         }
112         
113         leaf out_port {
114             type uint64;
115         }
116         
117         leaf out_group {
118             type uint32;
119         }
120         
121         leaf flags{
122             type flow-mod-flags;
123         }
124         
125         leaf flow-name{
126             type string;
127         }
128         
129         leaf installHw {
130             type boolean;
131         }
132
133         leaf barrier {
134             type boolean;
135         }
136
137         leaf strict {
138             type boolean;
139             default "false";
140         }
141
142     }
143
144     grouping flow-statistics {
145         leaf packet-count {
146             type yang:counter64;
147         } 
148
149         leaf byte-count {
150             type yang:counter64;
151         }
152
153         container duration {
154             leaf second {
155                 type yang:counter64;
156             }
157             leaf nanosecond {
158                 type yang:counter64;
159             }
160         }
161     }
162
163     grouping flow-table-statistics {
164         leaf active {
165             type yang:counter64;
166         } 
167
168         leaf lookup {
169             type yang:counter64;
170         }
171
172         leaf matched {
173             type yang:counter64;   
174         }
175     }
176 }