Refactored decoder models as per new design. Also modified abstract decoder to regist...
[l2switch.git] / packethandler / model / src / main / yang / packet.yang
1 module base-packet {
2   yang-version 1;
3   namespace "urn:opendaylight:packet:basepacket";
4   prefix bpacket;
5
6   import ietf-yang-types {prefix yang; revision-date 2010-09-24;}
7   import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
8   import packet-processing {prefix pprocessing; revision-date 2013-07-09;}
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-flow-types {prefix flow-type;revision-date "2013-10-26";}
12
13
14   revision 2014-05-28 {
15     description
16       "Base packet module draft.";
17   }
18
19   grouping packet-payload {
20     leaf payload {
21       type binary;
22     }
23   }
24
25   grouping packet-fields {
26     leaf payload-offset {
27       type int32;
28     }
29     leaf payload-length {
30       type int32;
31     }
32   }
33
34   grouping raw-packet-fields {
35     leaf ingress {
36       type inv:node-connector-ref;
37     }
38     leaf connection-cookie {
39       type pprocessing:connection-cookie;
40     }
41     leaf flow-cookie {
42       type flow-type:flow-cookie;
43     }
44     leaf table-id {
45       type table-type:table-id;
46     }
47     leaf packet-in-reason {
48       type identityref {
49         base pprocessing:packet-in-reason;
50       }
51     }
52     container match {
53       uses match-type:match;
54     }
55     uses packet-fields;
56   }
57
58 }