Added context-reference statements to the YANG models.
[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 yang-ext {prefix ext;}
6     import opendaylight-inventory {prefix inv;}
7     import ietf-inet-types {prefix inet;}
8     import ietf-yang-types {prefix yang;} 
9     import opendaylight-l2-types {prefix types;}
10     
11     revision "2013-07-09" {
12         description "";
13     }
14
15     typedef cookie {
16         type uint32;
17     }
18
19     grouping raw-packet {
20         leaf ingress {
21                 type inv:node-connector-ref;
22         }
23         leaf payload {
24                 type binary;
25         }
26     }
27
28     grouping ethernet-packet {
29         leaf source {
30                 type yang:mac-address;
31         }
32
33         leaf destination {
34                 type yang:mac-address;
35         }
36     }
37
38
39     notification packet-received {
40         leaf cookie {
41                 type cookie;
42         }
43         uses raw-packet;
44     }
45
46     rpc transmit-packet {
47         input {
48             leaf cookie {
49                 type cookie;
50             }
51             leaf node {
52                 ext:context-reference "inv:node-context";
53                 type inv:node-ref;
54             }
55                 leaf egress {
56                         type inv:node-connector-ref;
57                 }
58                 uses raw-packet;
59         }
60     }
61 }