Updated models, modeling existing SAL and its functionality
[controller.git] / opendaylight / sal / yang-prototype / 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     }
80
81     grouping flow-statistics {
82         leaf packet-count {
83             type yang:counter64;
84         } 
85
86         leaf byte-count {
87             type yang:counter64;
88         }
89
90         container duration {
91             leaf second {
92                 type yang:counter64;
93             }
94             leaf nanosecond {
95                 type yang:counter64;
96             }
97         }
98     }
99
100     grouping flow-table-statistics {
101         leaf active {
102             type yang:counter64;
103         } 
104
105         leaf lookup {
106             type yang:counter64;
107         }
108
109         leaf matched {
110             type yang:counter64;   
111         }
112     }
113 }