]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/rocker.json
Make 'uri' optional for migrate QAPI
[mirror_qemu.git] / qapi / rocker.json
CommitLineData
8c0aa613 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
8c0aa613 3
d3a48372
MAL
4##
5# = Rocker switch device
6##
7
fafa4d50 8##
4d5c8bc4 9# @RockerSwitch:
fafa4d50
SF
10#
11# Rocker switch information.
12#
13# @name: switch name
14#
15# @id: switch ID
16#
17# @ports: number of front-panel ports
18#
19# Since: 2.4
20##
21{ 'struct': 'RockerSwitch',
22 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
23
24##
25# @query-rocker:
26#
27# Return rocker switch information.
28#
29# Returns: @Rocker information
30#
31# Since: 2.4
a35c33f0
MAL
32#
33# Example:
34#
35# -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
36# <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
fafa4d50
SF
37##
38{ 'command': 'query-rocker',
39 'data': { 'name': 'str' },
40 'returns': 'RockerSwitch' }
41
42##
43# @RockerPortDuplex:
44#
45# An eumeration of port duplex states.
46#
47# @half: half duplex
48#
49# @full: full duplex
50#
51# Since: 2.4
52##
53{ 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
54
55##
56# @RockerPortAutoneg:
57#
58# An eumeration of port autoneg states.
59#
60# @off: autoneg is off
61#
62# @on: autoneg is on
63#
64# Since: 2.4
65##
66{ 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
67
68##
69# @RockerPort:
70#
71# Rocker switch port information.
72#
73# @name: port name
74#
75# @enabled: port is enabled for I/O
76#
77# @link-up: physical link is UP on port
78#
79# @speed: port link speed in Mbps
80#
81# @duplex: port link duplex
82#
83# @autoneg: port link autoneg
84#
85# Since: 2.4
86##
87{ 'struct': 'RockerPort',
88 'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
89 'speed': 'uint32', 'duplex': 'RockerPortDuplex',
90 'autoneg': 'RockerPortAutoneg' } }
91
92##
93# @query-rocker-ports:
94#
7e20b169 95# Return rocker switch port information.
fafa4d50 96#
7e20b169 97# Returns: a list of @RockerPort information
fafa4d50
SF
98#
99# Since: 2.4
7e20b169
MAL
100#
101# Example:
102#
103# -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
104# <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
105# "autoneg": "off", "link-up": true, "speed": 10000},
106# {"duplex": "full", "enabled": true, "name": "sw1.2",
107# "autoneg": "off", "link-up": true, "speed": 10000}
108# ]}
fafa4d50
SF
109##
110{ 'command': 'query-rocker-ports',
111 'data': { 'name': 'str' },
112 'returns': ['RockerPort'] }
113
114##
115# @RockerOfDpaFlowKey:
116#
117# Rocker switch OF-DPA flow key
118#
119# @priority: key priority, 0 being lowest priority
120#
121# @tbl-id: flow table ID
122#
1d8bda12 123# @in-pport: physical input port
fafa4d50 124#
1d8bda12 125# @tunnel-id: tunnel ID
fafa4d50 126#
1d8bda12 127# @vlan-id: VLAN ID
fafa4d50 128#
1d8bda12 129# @eth-type: Ethernet header type
fafa4d50 130#
1d8bda12 131# @eth-src: Ethernet header source MAC address
fafa4d50 132#
1d8bda12 133# @eth-dst: Ethernet header destination MAC address
fafa4d50 134#
1d8bda12 135# @ip-proto: IP Header protocol field
fafa4d50 136#
1d8bda12 137# @ip-tos: IP header TOS field
fafa4d50 138#
1d8bda12 139# @ip-dst: IP header destination address
fafa4d50 140#
8c0aa613 141# Note: optional members may or may not appear in the flow key
a937b6aa 142# depending if they're relevant to the flow key.
fafa4d50
SF
143#
144# Since: 2.4
145##
146{ 'struct': 'RockerOfDpaFlowKey',
147 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
148 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
149 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
150 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
151
152##
153# @RockerOfDpaFlowMask:
154#
155# Rocker switch OF-DPA flow mask
156#
1d8bda12 157# @in-pport: physical input port
fafa4d50 158#
1d8bda12 159# @tunnel-id: tunnel ID
fafa4d50 160#
1d8bda12 161# @vlan-id: VLAN ID
fafa4d50 162#
1d8bda12 163# @eth-src: Ethernet header source MAC address
fafa4d50 164#
1d8bda12 165# @eth-dst: Ethernet header destination MAC address
fafa4d50 166#
1d8bda12 167# @ip-proto: IP Header protocol field
fafa4d50 168#
1d8bda12 169# @ip-tos: IP header TOS field
fafa4d50 170#
8c0aa613 171# Note: optional members may or may not appear in the flow mask
a937b6aa 172# depending if they're relevant to the flow mask.
fafa4d50
SF
173#
174# Since: 2.4
175##
176{ 'struct': 'RockerOfDpaFlowMask',
177 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
178 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
179 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
180
181##
182# @RockerOfDpaFlowAction:
183#
184# Rocker switch OF-DPA flow action
185#
1d8bda12 186# @goto-tbl: next table ID
fafa4d50 187#
1d8bda12 188# @group-id: group ID
fafa4d50 189#
1d8bda12 190# @tunnel-lport: tunnel logical port ID
fafa4d50 191#
1d8bda12 192# @vlan-id: VLAN ID
fafa4d50 193#
1d8bda12 194# @new-vlan-id: new VLAN ID
fafa4d50 195#
1d8bda12 196# @out-pport: physical output port
fafa4d50 197#
8c0aa613 198# Note: optional members may or may not appear in the flow action
a937b6aa 199# depending if they're relevant to the flow action.
fafa4d50
SF
200#
201# Since: 2.4
202##
203{ 'struct': 'RockerOfDpaFlowAction',
204 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
205 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
206 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
207
208##
209# @RockerOfDpaFlow:
210#
211# Rocker switch OF-DPA flow
212#
213# @cookie: flow unique cookie ID
214#
215# @hits: count of matches (hits) on flow
216#
217# @key: flow key
218#
219# @mask: flow mask
220#
221# @action: flow action
222#
223# Since: 2.4
224##
225{ 'struct': 'RockerOfDpaFlow',
226 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
227 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
228
229##
230# @query-rocker-of-dpa-flows:
231#
232# Return rocker OF-DPA flow information.
233#
234# @name: switch name
235#
a937b6aa
MA
236# @tbl-id: flow table ID. If tbl-id is not specified, returns flow
237# information for all tables.
fafa4d50 238#
435fcb29 239# Returns: rocker OF-DPA flow information
fafa4d50
SF
240#
241# Since: 2.4
435fcb29
MAL
242#
243# Example:
244#
245# -> { "execute": "query-rocker-of-dpa-flows",
246# "arguments": { "name": "sw1" } }
247# <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
248# "hits": 138,
249# "cookie": 0,
250# "action": {"goto-tbl": 10},
251# "mask": {"in-pport": 4294901760}
252# },
253# {...more...},
254# ]}
fafa4d50
SF
255##
256{ 'command': 'query-rocker-of-dpa-flows',
257 'data': { 'name': 'str', '*tbl-id': 'uint32' },
258 'returns': ['RockerOfDpaFlow'] }
259
260##
261# @RockerOfDpaGroup:
262#
263# Rocker switch OF-DPA group
264#
265# @id: group unique ID
266#
267# @type: group type
268#
1d8bda12 269# @vlan-id: VLAN ID
fafa4d50 270#
1d8bda12 271# @pport: physical port number
fafa4d50 272#
1d8bda12 273# @index: group index, unique with group type
fafa4d50 274#
1d8bda12 275# @out-pport: output physical port number
fafa4d50 276#
1d8bda12 277# @group-id: next group ID
fafa4d50 278#
1d8bda12 279# @set-vlan-id: VLAN ID to set
fafa4d50 280#
1d8bda12 281# @pop-vlan: pop VLAN headr from packet
fafa4d50 282#
1d8bda12 283# @group-ids: list of next group IDs
fafa4d50 284#
1d8bda12 285# @set-eth-src: set source MAC address in Ethernet header
fafa4d50 286#
1d8bda12 287# @set-eth-dst: set destination MAC address in Ethernet header
fafa4d50 288#
1d8bda12 289# @ttl-check: perform TTL check
fafa4d50 290#
8c0aa613 291# Note: optional members may or may not appear in the group depending
a937b6aa 292# if they're relevant to the group type.
fafa4d50
SF
293#
294# Since: 2.4
295##
296{ 'struct': 'RockerOfDpaGroup',
297 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16',
298 '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
299 '*group-id': 'uint32', '*set-vlan-id': 'uint16',
300 '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
301 '*set-eth-src': 'str', '*set-eth-dst': 'str',
302 '*ttl-check': 'uint8' } }
303
304##
305# @query-rocker-of-dpa-groups:
306#
307# Return rocker OF-DPA group information.
308#
309# @name: switch name
310#
a937b6aa
MA
311# @type: group type. If type is not specified, returns group
312# information for all group types.
fafa4d50 313#
9389a4e3 314# Returns: rocker OF-DPA group information
fafa4d50
SF
315#
316# Since: 2.4
9389a4e3
MAL
317#
318# Example:
319#
320# -> { "execute": "query-rocker-of-dpa-groups",
321# "arguments": { "name": "sw1" } }
322# <- { "return": [ {"type": 0, "out-pport": 2,
323# "pport": 2, "vlan-id": 3841,
324# "pop-vlan": 1, "id": 251723778},
325# {"type": 0, "out-pport": 0,
326# "pport": 0, "vlan-id": 3841,
327# "pop-vlan": 1, "id": 251723776},
328# {"type": 0, "out-pport": 1,
329# "pport": 1, "vlan-id": 3840,
330# "pop-vlan": 1, "id": 251658241},
331# {"type": 0, "out-pport": 0,
332# "pport": 0, "vlan-id": 3840,
333# "pop-vlan": 1, "id": 251658240}
334# ]}
fafa4d50
SF
335##
336{ 'command': 'query-rocker-of-dpa-groups',
337 'data': { 'name': 'str', '*type': 'uint8' },
338 'returns': ['RockerOfDpaGroup'] }