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