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