Added cookie to data packet model
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / packet-processing.yang
1 module packet-processing {
2     namespace "urn:opendaylight:packet:service";
3     prefix flow;
4
5     import opendaylight-inventory {prefix inv;}
6     import ietf-inet-types {prefix inet;}
7     import ietf-yang-types {prefix yang;} 
8     import opendaylight-l2-types {prefix types;}
9     
10     revision "2013-07-09" {
11         description "";
12     }
13
14     typedef cookie {
15         type uint32;
16     }
17
18     grouping raw-packet {
19         leaf ingress {
20                 type inv:node-connector-ref;
21         }
22         leaf payload {
23                 type binary;
24         }
25     }
26
27     grouping ethernet-packet {
28         leaf source {
29                 type yang:mac-address;
30         }
31
32         leaf destination {
33                 type yang:mac-address;
34         }
35     }
36
37
38     notification packet-received {
39         leaf cookie {
40                 type cookie;
41         }
42         uses raw-packet;
43     }
44
45     rpc transmit-packet {
46         input {
47             leaf cookie {
48                 type cookie;
49             }
50                 leaf egress {
51                         type inv:node-connector-ref;
52                 }
53                 uses raw-packet;
54         }
55     }
56 }