blob: 026b7267c3e54e6f405c31e9a21dcba80df700cb [file] [log] [blame]
Jian Li2907ad22016-05-12 23:08:54 -07001{
2 "type": "object",
3 "title": "flows",
4 "required": [
5 "flows"
6 ],
7 "properties": {
8 "flows": {
9 "type": "array",
10 "xml": {
11 "name": "flows",
12 "wrapped": true
13 },
14 "items": {
15 "type": "object",
16 "title": "flow",
17 "required": [
18 "id",
19 "tableId",
20 "appId",
21 "groupId",
22 "priority",
23 "timeout",
24 "isPermanent",
25 "deviceId"
26 ],
27 "properties": {
28 "id": {
29 "type": "string",
30 "example": "12103425214920339"
31 },
32 "tableId": {
33 "type": "integer",
34 "format": "int32",
35 "example": 3
36 },
37 "appId": {
38 "type": "string",
39 "example": "org.onosproject.core"
40 },
41 "groupId": {
42 "type": "integer",
43 "format": "int64",
44 "example": 0
45 },
46 "priority": {
47 "type": "integer",
48 "format": "int32",
49 "example": 40000
50 },
51 "timeout": {
52 "type": "integer",
53 "format": "int32",
54 "example": 0
55 },
56 "isPermanent": {
57 "type": "boolean",
58 "example": true
59 },
60 "deviceId": {
61 "type": "string",
62 "example": "of:0000000000000003"
63 },
64 "treatment": {
65 "type": "object",
66 "title": "treatment",
67 "required": [
68 "instructions",
69 "deferred"
70 ],
71 "properties": {
72 "instructions": {
73 "type": "array",
74 "title": "treatment",
75 "required": [
76 "properties",
77 "port"
78 ],
79 "items": {
80 "type": "object",
81 "title": "instruction",
82 "required": [
83 "type",
84 "port"
85 ],
86 "properties": {
87 "type": {
88 "type": "string",
89 "example": "OUTPUT"
90 },
91 "port": {
92 "type": "string",
93 "example": "CONTROLLER"
94 }
95 }
96 }
97 },
98 "deferred": {
99 "type": "array",
100 "xml": {
101 "name": "deferred",
102 "wrapped": true
103 },
104 "items": {
105 "type": "string"
106 }
107 }
108 }
109 },
110 "selector": {
111 "type": "object",
112 "title": "selector",
113 "required": [
114 "criteria"
115 ],
116 "properties": {
117 "criteria": {
118 "type": "array",
119 "xml": {
120 "name": "criteria",
121 "wrapped": true
122 },
123 "items": {
124 "type": "object",
125 "title": "criteria",
126 "properties": {
127 "type": {
128 "type": "string",
129 "description": "Ethernet field name",
130 "example": "ETH_TYPE"
131 },
132 "ethType": {
133 "type": "int64",
134 "format": "int64",
135 "example": "0x88cc",
136 "description": "Ethernet frame type"
137 },
138 "mac": {
139 "type": "string",
140 "example": "00:00:11:00:00:01"
141 },
142 "port": {
143 "type": "int64",
144 "format": "int64",
145 "example": 1,
146 "description": "Match port"
147 },
148 "metadata": {
149 "type": "Hex16",
150 "format": "Hex16",
151 "example": "0xabcdL",
152 "description": "Metadata passed between tables"
153 },
154 "vlanId": {
155 "type": "uint16",
156 "format": "uint16",
157 "example": "0x1000"
158 },
159 "priority": {
160 "type": "int64",
161 "format": "int64",
162 "example": 1,
163 "description": "VLAN priority."
164 },
165 "ipDscp": {
166 "type": "byte",
167 "format": "byte",
168 "description": "IP DSCP (6 bits in ToS field)"
169 },
170 "ipEcn": {
171 "type": "byte",
172 "format": "byte",
173 "description": "IP ECN (2 bits in ToS field)."
174 },
175 "protocol": {
176 "type": "uint16",
177 "format": "uint16",
178 "example": 1,
179 "description": "IP protocol"
180 },
181 "ip": {
182 "type": "string",
183 "example": "10.1.1.0/24",
184 "description": "IP source address"
185 },
186 "tcpPort": {
187 "type": "integer",
188 "format": "uint16",
189 "example": 1,
190 "description": "TCP source address"
191 },
192 "udpPort": {
193 "type": "uint16",
194 "format": "uint16",
195 "example": 1,
196 "description": "UDP source address"
197 },
198 "sctpPort": {
199 "type": "uint16",
200 "format": "uint16",
201 "example": 1,
202 "description": "SCTP source address"
203 },
204 "icmpType": {
205 "type": "uint16",
206 "format": "uint16",
207 "example": 1,
208 "description": "Internet Control Message Protocol for IPV4 code (RFC0792)"
209 },
210 "icmpCode": {
211 "type": "uint16",
212 "format": "uint16",
213 "example": 1,
214 "description": "Internet Control Message Protocol for IPV4 code (RFC0792)"
215 },
216 "flowLabel": {
217 "type": "Hex16",
218 "format": "Hex16",
219 "example": "0xffffe",
220 "description": "IPv6 Flow Label (RFC 6437)"
221 },
222 "icmpv6Type": {
223 "type": "uint16",
224 "format": "uint16",
225 "example": 1,
226 "description": "Internet Control Message Protocol for IPV6 type (RFC2463)"
227 },
228 "icmpv6Code": {
229 "type": "uint16",
230 "format": "uint16",
231 "example": 1,
232 "description": "Internet Control Message Protocol for IPV6 code (RFC2463)"
233 },
234 "targetAddress": {
235 "type": "String",
236 "example": "10.1.1.0/24",
237 "description": "IPv6 Neighbor discovery target address"
238 },
239 "label": {
240 "type": "int32",
241 "format": "int32",
242 "example": 1,
243 "description": "MPLS label"
244 },
245 "exthdrFlags": {
246 "type": "int64",
247 "format": "int64",
248 "example": 1,
249 "description": "IPv6 extension header pseudo-field"
250 },
251 "lambda": {
252 "type": "int64",
253 "format": "int64",
254 "example": 1,
255 "description": "wavelength abstraction"
256 },
257 "gridType": {
258 "type": "String",
259 "example": "DWDM",
260 "description": "Type of wavelength grid"
261 },
262 "channelSpacing": {
263 "type": "int64",
264 "format": "int64",
265 "example": 100,
266 "description": "Optical channel spacing"
267 },
268 "spacingMultiplier": {
269 "type": "integer",
270 "format": "int64",
271 "example": 4,
272 "description": "Optical channel spacing multiplier"
273 },
274 "slotGranularity": {
275 "type": "int64",
276 "format": "int64",
277 "example": 8
278 },
279 "ochSignalId": {
280 "type": "integer",
281 "format": "int64",
282 "example": 1,
283 "description": "Optical channel signal ID"
284 },
285 "tunnelId": {
286 "type": "int64",
287 "format": "int64",
288 "example": 5,
289 "description": "Tunnel ID"
290 },
291 "ochSignalType": {
292 "type": "int64",
293 "format": "int64",
294 "example": 1,
295 "description": "Optical channel signal type"
296 },
297 "oduSignalId": {
298 "type": "int64",
299 "format": "int64",
300 "example": 1,
301 "description": "ODU (Optical channel Data Unit) signal ID."
302 },
303 "tributaryPortNumber": {
304 "type": "int64",
305 "format": "int64",
306 "example": 11,
307 "description": "OPU (Optical channel Payload Unit) port number."
308 },
309 "tributarySlotLen": {
310 "type": "int64",
311 "format": "int64",
312 "example": 80,
313 "description": "OPU (Optical channel Payload Unit) slot length."
314 },
315 "tributarySlotBitmap": {
316 "type": "array",
317 "title": "tributarySlotBitmap",
318 "description": "OPU (Optical channel Payload Unit) slot bitmap.",
319 "required": [
320 "byte",
321 "port"
322 ],
323 "items": {
324 "type": "byte",
325 "title": "byte",
326 "example": 1
327 }
328 },
329 "oduSignalType": {
330 "type": "int64",
331 "format": "int64",
332 "example": 4,
333 "description": "ODU (Optical channel Data Unit) signal type."
334 }
335 }
336 }
337 }
338 }
339 }
340 }
341 }
342 }
343 }
344}