dcc22745943af80329b981c6651655690d5ad635
[packetcable.git] / packetcable-model / src / main / yang / packetcable-match-types.yang
1 module packetcable-match-types
2 {
3     namespace "urn:opendaylight:packetcable:match:types";
4     prefix "packet-cable-match";
5
6     import yang-ext {prefix ext; revision-date "2013-07-09";}
7     import flow-node-inventory {prefix fni; revision-date "2013-08-19"; }
8     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
9     import sal-flow {prefix sal-flow;revision-date "2013-08-19";}
10     import packet-processing {prefix sal-packet;revision-date "2013-07-09";}
11     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
12     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
13     import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
14     import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";}
15
16     revision 2014-09-09 {
17         description "Initial revision of packetcable match types";
18     }        
19     
20
21     grouping "udp-match-ranges-attributes" {
22         container upd-match-ranges {
23             leaf udp-source-port-start {
24                 description "UDP source port start.";
25                 type inet:port-number;
26             }
27             leaf udp-source-port-end {
28                 description "UDP source port end.";
29                 type inet:port-number;
30             }
31             leaf udp-destination-port-start {
32                 description "UDP destination port start.";
33                 type inet:port-number;
34             }
35             leaf udp-destination-port-end {
36                 description "UDP destination port end.";
37                 type inet:port-number;
38             }
39         }
40     }
41
42     
43     //  MATCH augmentations for udp-match-range
44     // RPCS
45     augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
46         ext:augment-identifier "udp-match-ranges-rpc-add-flow";
47         uses udp-match-ranges-attributes;
48     }
49     augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
50         ext:augment-identifier "udp-match-ranges-rpc-remove-flow";
51         uses udp-match-ranges-attributes;
52     }
53     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
54         ext:augment-identifier "udp-match-ranges-rpc-update-flow-original";
55         uses udp-match-ranges-attributes;
56     }
57     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
58         ext:augment-identifier "udp-match-ranges-rpc-update-flow-updated";
59         uses udp-match-ranges-attributes;
60     }
61
62     // DATA
63     augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
64         ext:augment-identifier "udp-match-ranges-nodes-node-table-flow";
65         uses udp-match-ranges-attributes;
66     }
67
68     // NOTIFICATIONS
69     augment "/sal-flow:switch-flow-removed/sal-flow:match" {
70         ext:augment-identifier "udp-match-ranges-notif-switch-flow-removed";
71         uses udp-match-ranges-attributes;
72     }
73     augment "/sal-packet:packet-received/sal-packet:match" {
74         ext:augment-identifier "udp-match-ranges-notif-packet-in";
75         uses udp-match-ranges-attributes;
76     }
77     augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
78         ext:augment-identifier "udp-match-ranges-notif-update-flow-stats";
79         uses udp-match-ranges-attributes;
80     }
81     
82     grouping "tcp-match-ranges-attributes" {
83         container tcp-match-ranges {
84             leaf tcp-source-port-start {
85                 description "TCP source port start.";
86                 type inet:port-number;
87             }
88             leaf tcp-source-port-end {
89                 description "TCP source port end.";
90                 type inet:port-number;
91             }
92             leaf tcp-destination-port-start {
93                 description "TCP destination port start.";
94                 type inet:port-number;
95             }
96             leaf tcp-destination-port-end {
97                 description "TCP destination port end.";
98                 type inet:port-number;
99             }
100         }
101     }
102     
103 //  MATCH augmentations for tcp-match-range
104 // RPCS
105     augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
106         ext:augment-identifier "tcp-match-ranges-rpc-add-flow";
107         uses tcp-match-ranges-attributes;
108     }
109     augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
110         ext:augment-identifier "tcp-match-ranges-rpc-remove-flow";
111         uses tcp-match-ranges-attributes;
112     }
113     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
114         ext:augment-identifier "tcp-match-ranges-rpc-update-flow-original";
115         uses tcp-match-ranges-attributes;
116     }
117     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
118         ext:augment-identifier "tcp-match-ranges-rpc-update-flow-updated";
119         uses tcp-match-ranges-attributes;
120     }
121
122 // DATA
123     augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
124         ext:augment-identifier "tcp-match-ranges-nodes-node-table-flow";
125         uses tcp-match-ranges-attributes;
126     }
127
128 // NOTIFICATIONS
129     augment "/sal-flow:switch-flow-removed/sal-flow:match" {
130         ext:augment-identifier "tcp-match-ranges-notif-switch-flow-removed";
131         uses tcp-match-ranges-attributes;
132     }
133     augment "/sal-packet:packet-received/sal-packet:match" {
134         ext:augment-identifier "tcp-match-ranges-notif-packet-in";
135         uses tcp-match-ranges-attributes;
136     }
137     augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
138         ext:augment-identifier "tcp-match-ranges-notif-update-flow-stats";
139         uses tcp-match-ranges-attributes;
140     }
141
142     grouping subscriber-id {
143         leaf subscriber-id {
144             type inet:ip-address;
145             description "Subscriber Id";
146         }
147     }
148     
149 //  MATCH augmentations for susbcriber-id
150 // RPCS
151     augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
152         ext:augment-identifier "subscriber-id-rpc-add-flow";
153         uses subscriber-id;
154     }
155     augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
156         ext:augment-identifier "subscriber-id-rpc-remove-flow";
157         uses subscriber-id;
158     }
159     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
160         ext:augment-identifier "subscriber-id-rpc-update-flow-original";
161         uses subscriber-id;
162     }
163     augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
164         ext:augment-identifier "subscriber-id-rpc-update-flow-updated";
165         uses subscriber-id;
166     }
167
168 // DATA
169     augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
170         ext:augment-identifier "subscriber-id-nodes-node-table-flow";
171         uses subscriber-id;
172     }
173
174 // NOTIFICATIONS
175     augment "/sal-flow:switch-flow-removed/sal-flow:match" {
176         ext:augment-identifier "subscriber-id-notif-switch-flow-removed";
177         uses subscriber-id;
178     }
179     augment "/sal-packet:packet-received/sal-packet:match" {
180         ext:augment-identifier "subscriber-id-notif-packet-in";
181         uses subscriber-id;
182     }
183     augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
184         ext:augment-identifier "subscriber-id-notif-update-flow-stats";
185         uses subscriber-id;
186     }
187     
188 }