]>
Commit | Line | Data |
---|---|---|
8c0aa613 MA |
1 | # -*- Mode: Python -*- |
2 | ||
d3a48372 MAL |
3 | ## |
4 | # = Rocker switch device | |
5 | ## | |
6 | ||
fafa4d50 | 7 | ## |
4d5c8bc4 | 8 | # @RockerSwitch: |
fafa4d50 SF |
9 | # |
10 | # Rocker switch information. | |
11 | # | |
12 | # @name: switch name | |
13 | # | |
14 | # @id: switch ID | |
15 | # | |
16 | # @ports: number of front-panel ports | |
17 | # | |
18 | # Since: 2.4 | |
19 | ## | |
20 | { 'struct': 'RockerSwitch', | |
21 | 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } } | |
22 | ||
23 | ## | |
24 | # @query-rocker: | |
25 | # | |
26 | # Return rocker switch information. | |
27 | # | |
28 | # Returns: @Rocker information | |
29 | # | |
30 | # Since: 2.4 | |
a35c33f0 MAL |
31 | # |
32 | # Example: | |
33 | # | |
34 | # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } } | |
35 | # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}} | |
36 | # | |
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 | # ]} | |
109 | # | |
fafa4d50 SF |
110 | ## |
111 | { 'command': 'query-rocker-ports', | |
112 | 'data': { 'name': 'str' }, | |
113 | 'returns': ['RockerPort'] } | |
114 | ||
115 | ## | |
116 | # @RockerOfDpaFlowKey: | |
117 | # | |
118 | # Rocker switch OF-DPA flow key | |
119 | # | |
120 | # @priority: key priority, 0 being lowest priority | |
121 | # | |
122 | # @tbl-id: flow table ID | |
123 | # | |
1d8bda12 | 124 | # @in-pport: physical input port |
fafa4d50 | 125 | # |
1d8bda12 | 126 | # @tunnel-id: tunnel ID |
fafa4d50 | 127 | # |
1d8bda12 | 128 | # @vlan-id: VLAN ID |
fafa4d50 | 129 | # |
1d8bda12 | 130 | # @eth-type: Ethernet header type |
fafa4d50 | 131 | # |
1d8bda12 | 132 | # @eth-src: Ethernet header source MAC address |
fafa4d50 | 133 | # |
1d8bda12 | 134 | # @eth-dst: Ethernet header destination MAC address |
fafa4d50 | 135 | # |
1d8bda12 | 136 | # @ip-proto: IP Header protocol field |
fafa4d50 | 137 | # |
1d8bda12 | 138 | # @ip-tos: IP header TOS field |
fafa4d50 | 139 | # |
1d8bda12 | 140 | # @ip-dst: IP header destination address |
fafa4d50 | 141 | # |
8c0aa613 MA |
142 | # Note: optional members may or may not appear in the flow key |
143 | # depending if they're relevant to the flow key. | |
fafa4d50 SF |
144 | # |
145 | # Since: 2.4 | |
146 | ## | |
147 | { 'struct': 'RockerOfDpaFlowKey', | |
148 | 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32', | |
149 | '*tunnel-id': 'uint32', '*vlan-id': 'uint16', | |
150 | '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str', | |
151 | '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } } | |
152 | ||
153 | ## | |
154 | # @RockerOfDpaFlowMask: | |
155 | # | |
156 | # Rocker switch OF-DPA flow mask | |
157 | # | |
1d8bda12 | 158 | # @in-pport: physical input port |
fafa4d50 | 159 | # |
1d8bda12 | 160 | # @tunnel-id: tunnel ID |
fafa4d50 | 161 | # |
1d8bda12 | 162 | # @vlan-id: VLAN ID |
fafa4d50 | 163 | # |
1d8bda12 | 164 | # @eth-src: Ethernet header source MAC address |
fafa4d50 | 165 | # |
1d8bda12 | 166 | # @eth-dst: Ethernet header destination MAC address |
fafa4d50 | 167 | # |
1d8bda12 | 168 | # @ip-proto: IP Header protocol field |
fafa4d50 | 169 | # |
1d8bda12 | 170 | # @ip-tos: IP header TOS field |
fafa4d50 | 171 | # |
8c0aa613 MA |
172 | # Note: optional members may or may not appear in the flow mask |
173 | # depending if they're relevant to the flow mask. | |
fafa4d50 SF |
174 | # |
175 | # Since: 2.4 | |
176 | ## | |
177 | { 'struct': 'RockerOfDpaFlowMask', | |
178 | 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32', | |
179 | '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str', | |
180 | '*ip-proto': 'uint8', '*ip-tos': 'uint8' } } | |
181 | ||
182 | ## | |
183 | # @RockerOfDpaFlowAction: | |
184 | # | |
185 | # Rocker switch OF-DPA flow action | |
186 | # | |
1d8bda12 | 187 | # @goto-tbl: next table ID |
fafa4d50 | 188 | # |
1d8bda12 | 189 | # @group-id: group ID |
fafa4d50 | 190 | # |
1d8bda12 | 191 | # @tunnel-lport: tunnel logical port ID |
fafa4d50 | 192 | # |
1d8bda12 | 193 | # @vlan-id: VLAN ID |
fafa4d50 | 194 | # |
1d8bda12 | 195 | # @new-vlan-id: new VLAN ID |
fafa4d50 | 196 | # |
1d8bda12 | 197 | # @out-pport: physical output port |
fafa4d50 | 198 | # |
8c0aa613 MA |
199 | # Note: optional members may or may not appear in the flow action |
200 | # depending if they're relevant to the flow action. | |
fafa4d50 SF |
201 | # |
202 | # Since: 2.4 | |
203 | ## | |
204 | { 'struct': 'RockerOfDpaFlowAction', | |
205 | 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32', | |
206 | '*tunnel-lport': 'uint32', '*vlan-id': 'uint16', | |
207 | '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } } | |
208 | ||
209 | ## | |
210 | # @RockerOfDpaFlow: | |
211 | # | |
212 | # Rocker switch OF-DPA flow | |
213 | # | |
214 | # @cookie: flow unique cookie ID | |
215 | # | |
216 | # @hits: count of matches (hits) on flow | |
217 | # | |
218 | # @key: flow key | |
219 | # | |
220 | # @mask: flow mask | |
221 | # | |
222 | # @action: flow action | |
223 | # | |
224 | # Since: 2.4 | |
225 | ## | |
226 | { 'struct': 'RockerOfDpaFlow', | |
227 | 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey', | |
228 | 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } } | |
229 | ||
230 | ## | |
231 | # @query-rocker-of-dpa-flows: | |
232 | # | |
233 | # Return rocker OF-DPA flow information. | |
234 | # | |
235 | # @name: switch name | |
236 | # | |
1d8bda12 | 237 | # @tbl-id: flow table ID. If tbl-id is not specified, returns |
fafa4d50 SF |
238 | # flow information for all tables. |
239 | # | |
435fcb29 | 240 | # Returns: rocker OF-DPA flow information |
fafa4d50 SF |
241 | # |
242 | # Since: 2.4 | |
435fcb29 MAL |
243 | # |
244 | # Example: | |
245 | # | |
246 | # -> { "execute": "query-rocker-of-dpa-flows", | |
247 | # "arguments": { "name": "sw1" } } | |
248 | # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0}, | |
249 | # "hits": 138, | |
250 | # "cookie": 0, | |
251 | # "action": {"goto-tbl": 10}, | |
252 | # "mask": {"in-pport": 4294901760} | |
253 | # }, | |
254 | # {...more...}, | |
255 | # ]} | |
256 | # | |
fafa4d50 SF |
257 | ## |
258 | { 'command': 'query-rocker-of-dpa-flows', | |
259 | 'data': { 'name': 'str', '*tbl-id': 'uint32' }, | |
260 | 'returns': ['RockerOfDpaFlow'] } | |
261 | ||
262 | ## | |
263 | # @RockerOfDpaGroup: | |
264 | # | |
265 | # Rocker switch OF-DPA group | |
266 | # | |
267 | # @id: group unique ID | |
268 | # | |
269 | # @type: group type | |
270 | # | |
1d8bda12 | 271 | # @vlan-id: VLAN ID |
fafa4d50 | 272 | # |
1d8bda12 | 273 | # @pport: physical port number |
fafa4d50 | 274 | # |
1d8bda12 | 275 | # @index: group index, unique with group type |
fafa4d50 | 276 | # |
1d8bda12 | 277 | # @out-pport: output physical port number |
fafa4d50 | 278 | # |
1d8bda12 | 279 | # @group-id: next group ID |
fafa4d50 | 280 | # |
1d8bda12 | 281 | # @set-vlan-id: VLAN ID to set |
fafa4d50 | 282 | # |
1d8bda12 | 283 | # @pop-vlan: pop VLAN headr from packet |
fafa4d50 | 284 | # |
1d8bda12 | 285 | # @group-ids: list of next group IDs |
fafa4d50 | 286 | # |
1d8bda12 | 287 | # @set-eth-src: set source MAC address in Ethernet header |
fafa4d50 | 288 | # |
1d8bda12 | 289 | # @set-eth-dst: set destination MAC address in Ethernet header |
fafa4d50 | 290 | # |
1d8bda12 | 291 | # @ttl-check: perform TTL check |
fafa4d50 | 292 | # |
8c0aa613 MA |
293 | # Note: optional members may or may not appear in the group depending |
294 | # if they're relevant to the group type. | |
fafa4d50 SF |
295 | # |
296 | # Since: 2.4 | |
297 | ## | |
298 | { 'struct': 'RockerOfDpaGroup', | |
299 | 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16', | |
300 | '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32', | |
301 | '*group-id': 'uint32', '*set-vlan-id': 'uint16', | |
302 | '*pop-vlan': 'uint8', '*group-ids': ['uint32'], | |
303 | '*set-eth-src': 'str', '*set-eth-dst': 'str', | |
304 | '*ttl-check': 'uint8' } } | |
305 | ||
306 | ## | |
307 | # @query-rocker-of-dpa-groups: | |
308 | # | |
309 | # Return rocker OF-DPA group information. | |
310 | # | |
311 | # @name: switch name | |
312 | # | |
1d8bda12 | 313 | # @type: group type. If type is not specified, returns |
fafa4d50 SF |
314 | # group information for all group types. |
315 | # | |
9389a4e3 | 316 | # Returns: rocker OF-DPA group information |
fafa4d50 SF |
317 | # |
318 | # Since: 2.4 | |
9389a4e3 MAL |
319 | # |
320 | # Example: | |
321 | # | |
322 | # -> { "execute": "query-rocker-of-dpa-groups", | |
323 | # "arguments": { "name": "sw1" } } | |
324 | # <- { "return": [ {"type": 0, "out-pport": 2, | |
325 | # "pport": 2, "vlan-id": 3841, | |
326 | # "pop-vlan": 1, "id": 251723778}, | |
327 | # {"type": 0, "out-pport": 0, | |
328 | # "pport": 0, "vlan-id": 3841, | |
329 | # "pop-vlan": 1, "id": 251723776}, | |
330 | # {"type": 0, "out-pport": 1, | |
331 | # "pport": 1, "vlan-id": 3840, | |
332 | # "pop-vlan": 1, "id": 251658241}, | |
333 | # {"type": 0, "out-pport": 0, | |
334 | # "pport": 0, "vlan-id": 3840, | |
335 | # "pop-vlan": 1, "id": 251658240} | |
336 | # ]} | |
337 | # | |
fafa4d50 SF |
338 | ## |
339 | { 'command': 'query-rocker-of-dpa-groups', | |
340 | 'data': { 'name': 'str', '*type': 'uint8' }, | |
341 | 'returns': ['RockerOfDpaGroup'] } |