Fixed publishDataChangeEvent in 2phase commit
[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; revision-date "2013-07-09";}
6     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
7     import ietf-yang-types {prefix yang;revision-date "2010-09-24";} 
8     import opendaylight-l2-types {prefix types;revision-date "2013-08-27";}
9     import opendaylight-match-types {prefix match-type;revision-date "2013-10-26";}
10     import opendaylight-table-types {prefix table-type;revision-date "2013-10-26";}
11     
12     revision "2013-07-09" {
13         description "";
14     }
15
16     typedef cookie {
17         type uint32;
18     }
19
20     grouping raw-packet {
21         leaf ingress {
22                 type inv:node-connector-ref;
23         }
24         leaf payload {
25                 type binary;
26         }
27     }
28
29     grouping ethernet-packet {
30         leaf source {
31                 type yang:mac-address;
32         }
33
34         leaf destination {
35                 type yang:mac-address;
36         }
37     }
38
39     identity packet-in-reason {
40         description "Base identity for all the available packet in reason"; 
41     }
42     
43     identity no-match {
44         base packet-in-reason;
45         description "No matching flow in the classifier";
46     }
47     
48     identity send-to-controller {
49         base packet-in-reason;
50         description "Explicit instruction to send packet to controller";
51     }
52     
53     identity invalid-ttl {
54         base packet-in-reason;
55         description "Packet with invalid TTL";
56     }
57
58     notification packet-received {
59         leaf cookie {
60                 type cookie;
61         }
62         
63         leaf table-id {
64                 type table-type:table-id;
65         }
66         
67         leaf packet-in-reason {
68                 type identityref {
69                         base packet-in-reason;
70                 }
71                 }
72         
73         container match {
74                         uses match-type:match;
75         }
76         
77         uses raw-packet;
78     }
79
80     rpc transmit-packet {
81         input {
82             uses inv:node-context-ref;
83
84             leaf cookie {
85                 type cookie;
86             }
87             
88                 leaf egress {
89                         type inv:node-connector-ref;
90                 }
91                 uses raw-packet;
92         }
93     }
94 }