1 module opendaylight-flow-base {
2 namespace "urn:opendaylight:flow:base";
5 import yang-ext {prefix ext;}
6 import ietf-inet-types {prefix inet;}
7 import ietf-yang-types {prefix yang;}
8 import opendaylight-inventory {prefix inv;}
9 import opendaylight-l2-types {prefix l2t;}
11 revision "2013-08-19" {
12 description "Initial revision of flow service";
15 /** Match Groupings **/
16 grouping "ethernet-match-fields" {
17 container ethernet-source {
18 //description "Ethernet source address.";
19 //presence "Match field is active and set";
22 type yang:mac-address;
28 container ethernet-destination {
29 description "Ethernet destination address.";
30 presence "Match field is active and set";
33 type yang:mac-address;
36 container ethernet-type {
37 description "Ethernet frame type.";
38 presence "Match field is active and set";
42 type l2t:ether-type; // Needs to define that as general model
50 grouping "vlan-match-fields" {
52 description "VLAN id.";
53 presence "Match field is active and set";
64 description "VLAN priority.";
71 grouping "ip-match-fields" {
73 description "IP protocol.";
74 type uint8; // TODO define IP protocol number
78 description "IP DSCP (6 bits in ToS field).";
79 type inet:dscp; // TODO: Define DSCP type
82 description "IP ECN (2 bits in ToS field).";
83 type uint8; // TODO define ECN
87 grouping "ipv4-match-fields" {
89 description "IPv4 source address.";
90 type inet:ipv4-prefix;
92 leaf ipv4-destination {
93 description "IPv4 destination address.";
94 type inet:ipv4-prefix;
98 grouping "ipv6-match-fields" {
100 description "IPv6 source address.";
101 type inet:ipv6-prefix;
103 leaf ipv6-destination {
104 description "IPv6 destination address.";
105 type inet:ipv6-prefix;
110 grouping "udp-match-fields" {
111 leaf udp-source-port {
112 description "UDP source port.";
113 type inet:port-number;
115 leaf udp-destination-port {
116 description "UDP destination port.";
117 type inet:port-number;
121 grouping "tcp-match-fields" {
122 leaf tcp-source-port {
123 description "TCP source port.";
124 type inet:port-number;
126 leaf tcp-destination-port {
127 description "TCP destination port.";
128 type inet:port-number;
132 grouping "sctp-match-fields" {
133 leaf sctp-source-port {
134 description "SCTP source port.";
135 type inet:port-number;
137 leaf sctp-destination-dst {
138 description "SCTP destination port.";
139 type inet:port-number;
143 grouping "icmpv4-match-fields" {
145 description "ICMP type.";
146 type uint8; // Define ICMP Type
148 description "ICMP code.";
150 type uint8; // Define ICMP Code
154 grouping "arp-match-fields" {
155 leaf arp-source-transport-address {
156 description "ARP source IPv4 address.";
157 type inet:ipv4-prefix;
160 leaf arp-target-transport-address {
161 description "ARP target IPv4 address.";
162 type inet:ipv4-prefix;
164 container arp-source-hardware-address {
165 description "ARP source hardware address.";
166 presence "Match field is active and set";
169 type yang:mac-address;
175 container arp-target-hardware-address {
176 description "ARP target hardware address.";
177 presence "Match field is active and set";
180 type yang:mac-address;
191 leaf output-node-connector {
196 case controller-action {
204 case set-queue-action {
206 type string; // TODO: define queues
210 case pop-mpls-action {
213 type uint16; // TODO: define ethertype type
218 case set-mpls-ttl-action {
224 case set-nw-ttl-action {
230 case push-pbb-action {
234 case push-mpls-action {
238 case push-vlan-action {
249 container "ethernet-match" {
250 uses "ethernet-match-fields";
252 container "vlan-match" {
253 uses "vlan-match-fields";
255 container "ip-match" {
256 uses "ip-match-fields";
258 container "ipv4-match" {
259 uses "ipv4-match-fields";
261 container "ipv6-match" {
262 uses "ipv6-match-fields";
264 container "udp-match" {
265 uses "udp-match-fields";
267 container "tcp-match" {
268 uses "tcp-match-fields";
270 container "sctp-match" {
271 uses "sctp-match-fields";
273 container "icmpv4-match" {
274 uses "icmpv4-match-fields";
276 container "arp-match" {
277 uses "arp-match-fields";