BUG-9223:Remove hardcoded value of lldp interval
[openflowplugin.git] / 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 "2013-07-15";}
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     description "Packet processing - sending and receiving.";
15     
16     revision "2013-07-09" {
17         description "Initial.";
18     }
19
20     typedef connection-cookie {
21         description "Openflow connection identifier. Outgoing packets should use the same connection they came in.";
22         type uint32;
23     }
24
25     grouping raw-packet {
26         description "Basic packet structure.";
27         leaf ingress {
28                 type inv:node-connector-ref;
29         }
30         leaf payload {
31                 type binary;
32         }
33     }
34
35     grouping ethernet-packet {
36         description "Ethernet packet headers structure.";
37         leaf source {
38                 type yang:mac-address;
39         }
40
41         leaf destination {
42                 type yang:mac-address;
43         }
44     }
45
46     identity packet-in-reason {
47         description "Base identity for all the available packet in reasons."; 
48     }
49     
50     identity no-match {
51         base packet-in-reason;
52         description "No matching flow in the classifier";
53     }
54     
55     identity send-to-controller {
56         base packet-in-reason;
57         description "Explicit instruction to send packet to controller";
58     }
59     
60     identity invalid-ttl {
61         base packet-in-reason;
62         description "Packet with invalid TTL";
63     }
64
65     notification packet-received {
66         description "Delivery of incoming packet wrapped in openflow structure.";
67         leaf connection-cookie {
68             type connection-cookie;
69         }
70         
71         leaf flow-cookie {
72             type flow-type:flow-cookie;
73         }
74         
75         leaf table-id {
76                 type table-type:table-id;
77         }
78         
79         leaf packet-in-reason {
80                 type identityref {
81                         base packet-in-reason;
82                 }
83                 }
84         
85         container match {
86                         uses match-type:match;
87         }
88         
89         uses raw-packet;
90     }
91
92     rpc transmit-packet {
93         description "Sending packet out through openflow device.";
94         input {
95             uses inv:node-context-ref;
96
97             leaf connection-cookie {
98                 type connection-cookie;
99             }
100             
101                 leaf egress {
102                         type inv:node-connector-ref;
103                 }
104             leaf buffer-id {
105                   type uint32;
106             }
107
108                 uses raw-packet;
109                 uses action-type:action-list;
110         }
111     }
112 }