2 # = Rocker switch device
8 # Rocker switch information.
14 # @ports: number of front-panel ports
18 { 'struct': 'RockerSwitch',
19 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
24 # Return rocker switch information.
26 # Returns: @Rocker information
32 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
33 # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
36 { 'command': 'query-rocker',
37 'data': { 'name': 'str' },
38 'returns': 'RockerSwitch' }
43 # An eumeration of port duplex states.
51 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
56 # An eumeration of port autoneg states.
58 # @off: autoneg is off
64 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
69 # Rocker switch port information.
73 # @enabled: port is enabled for I/O
75 # @link-up: physical link is UP on port
77 # @speed: port link speed in Mbps
79 # @duplex: port link duplex
81 # @autoneg: port link autoneg
85 { 'struct': 'RockerPort',
86 'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
87 'speed': 'uint32', 'duplex': 'RockerPortDuplex',
88 'autoneg': 'RockerPortAutoneg' } }
91 # @query-rocker-ports:
93 # Return rocker switch port information.
95 # Returns: a list of @RockerPort information
101 # -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
102 # <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
103 # "autoneg": "off", "link-up": true, "speed": 10000},
104 # {"duplex": "full", "enabled": true, "name": "sw1.2",
105 # "autoneg": "off", "link-up": true, "speed": 10000}
109 { 'command': 'query-rocker-ports',
110 'data': { 'name': 'str' },
111 'returns': ['RockerPort'] }
114 # @RockerOfDpaFlowKey:
116 # Rocker switch OF-DPA flow key
118 # @priority: key priority, 0 being lowest priority
120 # @tbl-id: flow table ID
122 # @in-pport: #optional physical input port
124 # @tunnel-id: #optional tunnel ID
126 # @vlan-id: #optional VLAN ID
128 # @eth-type: #optional Ethernet header type
130 # @eth-src: #optional Ethernet header source MAC address
132 # @eth-dst: #optional Ethernet header destination MAC address
134 # @ip-proto: #optional IP Header protocol field
136 # @ip-tos: #optional IP header TOS field
138 # @ip-dst: #optional IP header destination address
140 # Note: fields are marked #optional to indicate that they may or may not
141 # appear in the flow key depending if they're relevant to the flow key.
145 { 'struct': 'RockerOfDpaFlowKey',
146 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
147 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
148 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
149 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
152 # @RockerOfDpaFlowMask:
154 # Rocker switch OF-DPA flow mask
156 # @in-pport: #optional physical input port
158 # @tunnel-id: #optional tunnel ID
160 # @vlan-id: #optional VLAN ID
162 # @eth-src: #optional Ethernet header source MAC address
164 # @eth-dst: #optional Ethernet header destination MAC address
166 # @ip-proto: #optional IP Header protocol field
168 # @ip-tos: #optional IP header TOS field
170 # Note: fields are marked #optional to indicate that they may or may not
171 # appear in the flow mask depending if they're relevant to the flow mask.
175 { 'struct': 'RockerOfDpaFlowMask',
176 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
177 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
178 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
181 # @RockerOfDpaFlowAction:
183 # Rocker switch OF-DPA flow action
185 # @goto-tbl: #optional next table ID
187 # @group-id: #optional group ID
189 # @tunnel-lport: #optional tunnel logical port ID
191 # @vlan-id: #optional VLAN ID
193 # @new-vlan-id: #optional new VLAN ID
195 # @out-pport: #optional physical output port
197 # Note: fields are marked #optional to indicate that they may or may not
198 # appear in the flow action depending if they're relevant to the flow action.
202 { 'struct': 'RockerOfDpaFlowAction',
203 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
204 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
205 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
210 # Rocker switch OF-DPA flow
212 # @cookie: flow unique cookie ID
214 # @hits: count of matches (hits) on flow
220 # @action: flow action
224 { 'struct': 'RockerOfDpaFlow',
225 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
226 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
229 # @query-rocker-of-dpa-flows:
231 # Return rocker OF-DPA flow information.
235 # @tbl-id: #optional flow table ID. If tbl-id is not specified, returns
236 # flow information for all tables.
238 # Returns: rocker OF-DPA flow information
244 # -> { "execute": "query-rocker-of-dpa-flows",
245 # "arguments": { "name": "sw1" } }
246 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
249 # "action": {"goto-tbl": 10},
250 # "mask": {"in-pport": 4294901760}
256 { 'command': 'query-rocker-of-dpa-flows',
257 'data': { 'name': 'str', '*tbl-id': 'uint32' },
258 'returns': ['RockerOfDpaFlow'] }
263 # Rocker switch OF-DPA group
265 # @id: group unique ID
269 # @vlan-id: #optional VLAN ID
271 # @pport: #optional physical port number
273 # @index: #optional group index, unique with group type
275 # @out-pport: #optional output physical port number
277 # @group-id: #optional next group ID
279 # @set-vlan-id: #optional VLAN ID to set
281 # @pop-vlan: #optional pop VLAN headr from packet
283 # @group-ids: #optional list of next group IDs
285 # @set-eth-src: #optional set source MAC address in Ethernet header
287 # @set-eth-dst: #optional set destination MAC address in Ethernet header
289 # @ttl-check: #optional perform TTL check
291 # Note: fields are marked #optional to indicate that they may or may not
292 # appear in the group depending if they're relevant to the group type.
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' } }
305 # @query-rocker-of-dpa-groups:
307 # Return rocker OF-DPA group information.
311 # @type: #optional group type. If type is not specified, returns
312 # group information for all group types.
314 # Returns: rocker OF-DPA group information
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}
337 { 'command': 'query-rocker-of-dpa-groups',
338 'data': { 'name': 'str', '*type': 'uint8' },
339 'returns': ['RockerOfDpaGroup'] }