Merge "Enhance debug capabilities"
[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;}
6     import opendaylight-match-types {prefix match;}
7     import ietf-yang-types {prefix yang;}
8
9
10     revision "2013-08-19" {
11         description "Initial revision of flow service";
12     }
13
14     grouping action {
15         choice action {
16             case output-action {
17                 leaf-list output-node-connector {
18                     type inet:uri;
19                 }
20             }
21
22             case controller-action {
23                 leaf max-length {
24                     type uint16 {
25                         range "0..65294";
26                     }
27                 }
28             }
29
30             case set-queue-action {
31                 leaf queue {
32                     type string; // TODO: define queues
33                 }
34             }
35
36             case pop-mpls-action {
37                 leaf ethernet-type {
38                         type uint16; // TODO: define ethertype type
39                 }
40             }
41
42             case set-mpls-ttl-action {
43                 leaf mpls-ttl {
44                     type uint8;
45                 }
46             }
47
48             case set-nw-ttl-action {
49                 leaf nw-ttl {
50                     type uint8;
51                 }
52             }
53
54             case push-pbb-action {
55
56             }
57
58             case push-mpls-action {
59
60             }
61
62             case push-vlan-action {
63
64             }
65         }
66     }
67
68     grouping flow {
69         container match {
70             uses match:match;
71         }
72         list action {
73             key "order";
74             leaf order {
75                 type int32;
76             }
77             uses action;
78         }
79         leaf priority {
80             type uint16;
81         }
82         
83         leaf idle-timeout {
84             type uint16;
85         }
86         
87         leaf hard-timeout {
88             type uint16;
89         }
90         
91         leaf cookie {
92             type uint64;
93         }
94     }
95
96     grouping flow-statistics {
97         leaf packet-count {
98             type yang:counter64;
99         } 
100
101         leaf byte-count {
102             type yang:counter64;
103         }
104
105         container duration {
106             leaf second {
107                 type yang:counter64;
108             }
109             leaf nanosecond {
110                 type yang:counter64;
111             }
112         }
113     }
114
115     grouping flow-table-statistics {
116         leaf active {
117             type yang:counter64;
118         } 
119
120         leaf lookup {
121             type yang:counter64;
122         }
123
124         leaf matched {
125             type yang:counter64;   
126         }
127     }
128 }