tdl-xoa-driver 1.1.0__py3-none-any.whl → 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tdl_xoa_driver-1.1.0.dist-info → tdl_xoa_driver-1.3.0.dist-info}/METADATA +5 -123
- {tdl_xoa_driver-1.1.0.dist-info → tdl_xoa_driver-1.3.0.dist-info}/RECORD +26 -26
- {tdl_xoa_driver-1.1.0.dist-info → tdl_xoa_driver-1.3.0.dist-info}/WHEEL +1 -1
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +2 -0
- xoa_driver/functions/anlt.py +0 -30
- xoa_driver/functions/exceptions.py +7 -0
- xoa_driver/functions/headers.py +312 -11
- xoa_driver/functions/mgmt.py +82 -90
- xoa_driver/functions/tools.py +13 -1
- xoa_driver/internals/commands/c_commands.py +26 -0
- xoa_driver/internals/commands/enums.py +17 -29
- xoa_driver/internals/commands/m_commands.py +35 -7
- xoa_driver/internals/commands/p_commands.py +30 -3
- xoa_driver/internals/commands/pl1_commands.py +96 -71
- xoa_driver/internals/commands/pr_commands.py +0 -8
- xoa_driver/internals/commands/ps_commands.py +0 -2
- xoa_driver/internals/commands/pt_commands.py +0 -6
- xoa_driver/internals/hli_v1/modules/module_chimera.py +17 -12
- xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +17 -11
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +7 -0
- xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +14 -0
- xoa_driver/internals/hli_v1/testers/_base_tester.py +7 -0
- xoa_driver/internals/state_storage/modules_state.py +1 -1
- {tdl_xoa_driver-1.1.0.dist-info → tdl_xoa_driver-1.3.0.dist-info/licenses}/LICENSE +0 -0
- {tdl_xoa_driver-1.1.0.dist-info → tdl_xoa_driver-1.3.0.dist-info}/top_level.txt +0 -0
xoa_driver/functions/mgmt.py
CHANGED
|
@@ -11,6 +11,7 @@ from xoa_driver.testers import GenericAnyTester, L23Tester
|
|
|
11
11
|
from .exceptions import (
|
|
12
12
|
NotSupportMedia,
|
|
13
13
|
NotSupportPortSpeed,
|
|
14
|
+
NotSupportMediaPortSpeed,
|
|
14
15
|
)
|
|
15
16
|
from .tools import MODULE_EOL_INFO
|
|
16
17
|
from itertools import chain # type: ignore[Pylance false warning]
|
|
@@ -25,8 +26,6 @@ LinkTrainingSupported = FamilyL
|
|
|
25
26
|
# region Testers
|
|
26
27
|
async def reserve_tester(tester: GenericAnyTester, force: bool = True) -> None:
|
|
27
28
|
"""
|
|
28
|
-
.. versionadded:: 1.1
|
|
29
|
-
|
|
30
29
|
Reserve a tester regardless whether it is owned by others or not.
|
|
31
30
|
|
|
32
31
|
:param tester: The tester to reserve
|
|
@@ -39,25 +38,23 @@ async def reserve_tester(tester: GenericAnyTester, force: bool = True) -> None:
|
|
|
39
38
|
r = await tester.reservation.get()
|
|
40
39
|
if force and r.operation == enums.ReservedStatus.RESERVED_BY_OTHER:
|
|
41
40
|
await tester.reservation.set_relinquish()
|
|
42
|
-
await asyncio.gather(*(
|
|
41
|
+
await asyncio.gather(*(release_module(m, True) for m in tester.modules))
|
|
43
42
|
await tester.reservation.set_reserve()
|
|
44
43
|
elif r.operation == enums.ReservedStatus.RELEASED:
|
|
45
44
|
await tester.reservation.set_reserve()
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
async def
|
|
47
|
+
async def release_tester(
|
|
49
48
|
tester: GenericAnyTester,
|
|
50
|
-
|
|
49
|
+
should_release_modules_ports: bool = False,
|
|
51
50
|
) -> None:
|
|
52
51
|
"""
|
|
53
|
-
.. versionadded:: 1.1
|
|
54
|
-
|
|
55
52
|
Free a tester. If the tester is reserved by you, release the tester. If the tester is reserved by others, relinquish the tester. The tester should have no owner afterwards.
|
|
56
53
|
|
|
57
54
|
:param tester: The tester to free
|
|
58
55
|
:type tester: :class:`~xoa_driver.testers.GenericAnyTester`
|
|
59
|
-
:param
|
|
60
|
-
:type
|
|
56
|
+
:param should_release_modules_ports: should modules and ports also be freed, defaults to False
|
|
57
|
+
:type should_release_modules_ports: bool, optional
|
|
61
58
|
:return:
|
|
62
59
|
:rtype: None
|
|
63
60
|
"""
|
|
@@ -66,14 +63,12 @@ async def free_tester(
|
|
|
66
63
|
await tester.reservation.set_relinquish()
|
|
67
64
|
elif r.operation == enums.ReservedStatus.RESERVED_BY_YOU:
|
|
68
65
|
await tester.reservation.set_release()
|
|
69
|
-
if
|
|
70
|
-
await asyncio.gather(*(
|
|
66
|
+
if should_release_modules_ports:
|
|
67
|
+
await asyncio.gather(*(release_module(m, True) for m in tester.modules))
|
|
71
68
|
|
|
72
69
|
|
|
73
70
|
async def get_chassis_sys_uptime_sec(tester: L23Tester) -> int:
|
|
74
71
|
"""
|
|
75
|
-
.. versionadded:: 2.7.2
|
|
76
|
-
|
|
77
72
|
Get chassis system uptime in seconds
|
|
78
73
|
|
|
79
74
|
:param tester: The tester to free
|
|
@@ -96,8 +91,6 @@ async def get_chassis_sys_uptime_sec(tester: L23Tester) -> int:
|
|
|
96
91
|
|
|
97
92
|
def get_module(tester: GenericAnyTester, module_id: int) -> GenericAnyModule:
|
|
98
93
|
"""
|
|
99
|
-
.. versionadded:: 1.1
|
|
100
|
-
|
|
101
94
|
Get a module object of the tester.
|
|
102
95
|
|
|
103
96
|
:param tester: The tester object
|
|
@@ -113,8 +106,6 @@ def get_module(tester: GenericAnyTester, module_id: int) -> GenericAnyModule:
|
|
|
113
106
|
|
|
114
107
|
def get_modules(tester: GenericAnyTester) -> tuple[GenericAnyModule, ...]:
|
|
115
108
|
"""
|
|
116
|
-
.. versionadded:: 1.1
|
|
117
|
-
|
|
118
109
|
Get all modules of the tester
|
|
119
110
|
|
|
120
111
|
:param tester: The tester object
|
|
@@ -127,8 +118,6 @@ def get_modules(tester: GenericAnyTester) -> tuple[GenericAnyModule, ...]:
|
|
|
127
118
|
|
|
128
119
|
async def reserve_module(module: GenericAnyModule, force: bool = True) -> None:
|
|
129
120
|
"""
|
|
130
|
-
.. versionadded:: 1.1
|
|
131
|
-
|
|
132
121
|
Reserve a module regardless whether it is owned by others or not.
|
|
133
122
|
|
|
134
123
|
:param module: The module to reserve
|
|
@@ -140,24 +129,22 @@ async def reserve_module(module: GenericAnyModule, force: bool = True) -> None:
|
|
|
140
129
|
"""
|
|
141
130
|
r = await module.reservation.get()
|
|
142
131
|
if force and r.operation == enums.ReservedStatus.RESERVED_BY_OTHER:
|
|
143
|
-
await
|
|
132
|
+
await release_module(module, True)
|
|
144
133
|
await module.reservation.set_reserve()
|
|
145
134
|
elif r.operation == enums.ReservedStatus.RELEASED:
|
|
146
135
|
await module.reservation.set_reserve()
|
|
147
136
|
|
|
148
137
|
|
|
149
|
-
async def
|
|
150
|
-
module: GenericAnyModule,
|
|
138
|
+
async def release_module(
|
|
139
|
+
module: GenericAnyModule, should_release_ports: bool = False
|
|
151
140
|
) -> None:
|
|
152
141
|
"""
|
|
153
|
-
.. versionadded:: 1.2
|
|
154
|
-
|
|
155
142
|
Free a module. If the module is reserved by you, release the module. If the module is reserved by others, relinquish the module. The module should have no owner afterwards.
|
|
156
143
|
|
|
157
144
|
:param module: The module to free
|
|
158
145
|
:type module: :class:`~xoa_driver.modules.GenericAnyModule`
|
|
159
|
-
:param
|
|
160
|
-
:type
|
|
146
|
+
:param should_release_ports: should ports also be freed, defaults to False
|
|
147
|
+
:type should_release_ports: bool, optional
|
|
161
148
|
:return:
|
|
162
149
|
:rtype: None
|
|
163
150
|
"""
|
|
@@ -166,16 +153,14 @@ async def free_module(
|
|
|
166
153
|
await module.reservation.set_relinquish()
|
|
167
154
|
elif r.operation == enums.ReservedStatus.RESERVED_BY_YOU:
|
|
168
155
|
await module.reservation.set_release()
|
|
169
|
-
if
|
|
170
|
-
await
|
|
156
|
+
if should_release_ports:
|
|
157
|
+
await release_ports(*module.ports)
|
|
171
158
|
|
|
172
159
|
|
|
173
160
|
def get_module_supported_media(
|
|
174
161
|
module: GenericL23Module | ModuleChimera,
|
|
175
162
|
) -> list[dict[str, t.Any]]:
|
|
176
163
|
"""
|
|
177
|
-
.. versionadded:: 1.3
|
|
178
|
-
|
|
179
164
|
Get a list of supported media, port speed and count of the module.
|
|
180
165
|
|
|
181
166
|
:param module: The module object
|
|
@@ -187,7 +172,7 @@ def get_module_supported_media(
|
|
|
187
172
|
item = {}
|
|
188
173
|
|
|
189
174
|
for media_item in module.info.media_info_list: # type: ignore
|
|
190
|
-
for sub_item in media_item.
|
|
175
|
+
for sub_item in media_item.supported_configs:
|
|
191
176
|
item = dict()
|
|
192
177
|
item["media"] = media_item.cage_type
|
|
193
178
|
item["port_count"] = sub_item.port_count
|
|
@@ -203,8 +188,6 @@ async def set_module_media_config(
|
|
|
203
188
|
force: bool = True,
|
|
204
189
|
) -> None:
|
|
205
190
|
"""
|
|
206
|
-
.. versionadded:: 1.3
|
|
207
|
-
|
|
208
191
|
Set module's media configuration.
|
|
209
192
|
|
|
210
193
|
:param module: The module object
|
|
@@ -227,7 +210,8 @@ async def set_module_media_config(
|
|
|
227
210
|
# set the module media if the target media is found in supported media
|
|
228
211
|
for item in supported_media_list:
|
|
229
212
|
if item["media"] == media:
|
|
230
|
-
await module.media.set(media_config=media)
|
|
213
|
+
await module.config.media.set(media_config=media)
|
|
214
|
+
await release_module(module, False)
|
|
231
215
|
return None
|
|
232
216
|
|
|
233
217
|
# raise exception is the target media is not found in the supported media
|
|
@@ -241,8 +225,6 @@ async def set_module_port_config(
|
|
|
241
225
|
force: bool = True,
|
|
242
226
|
) -> None:
|
|
243
227
|
"""
|
|
244
|
-
.. versionadded:: 1.3
|
|
245
|
-
|
|
246
228
|
Set module's port-speed configuration
|
|
247
229
|
|
|
248
230
|
:param module: The module object
|
|
@@ -259,14 +241,13 @@ async def set_module_port_config(
|
|
|
259
241
|
"""
|
|
260
242
|
|
|
261
243
|
# reserve the module first
|
|
262
|
-
await free_module(module, True)
|
|
263
244
|
await reserve_module(module, force)
|
|
264
245
|
|
|
265
246
|
# get the supported media by the module
|
|
266
247
|
supported_media_list = get_module_supported_media(module)
|
|
267
248
|
|
|
268
249
|
# get the current media of the module
|
|
269
|
-
reply = await module.media.get()
|
|
250
|
+
reply = await module.config.media.get()
|
|
270
251
|
current_media = reply.media_config
|
|
271
252
|
|
|
272
253
|
# set the module port speed if we can find the port-speed in the corresponding media
|
|
@@ -279,16 +260,59 @@ async def set_module_port_config(
|
|
|
279
260
|
)
|
|
280
261
|
):
|
|
281
262
|
portspeed_list = [port_count] + port_count * [port_speed]
|
|
282
|
-
await module.
|
|
283
|
-
await
|
|
263
|
+
await module.config.port_speed.set(portspeed_list=portspeed_list)
|
|
264
|
+
await release_module(module, False)
|
|
284
265
|
return None
|
|
285
266
|
raise NotSupportPortSpeed(module)
|
|
286
267
|
|
|
287
268
|
|
|
288
|
-
async def
|
|
269
|
+
async def set_module_config(
|
|
270
|
+
module: t.Union[GenericL23Module, ModuleChimera],
|
|
271
|
+
media: enums.MediaConfigurationType,
|
|
272
|
+
port_count: int,
|
|
273
|
+
port_speed: int,
|
|
274
|
+
force: bool = True,
|
|
275
|
+
) -> None:
|
|
276
|
+
"""Change the module configuration to the target media, port count and port speed.
|
|
277
|
+
|
|
278
|
+
:param module: the module object
|
|
279
|
+
:type module: t.Union[GenericL23Module, ModuleChimera]
|
|
280
|
+
:param media: the target media for the module
|
|
281
|
+
:type media: enums.MediaConfigurationType
|
|
282
|
+
:param port_count: the target port count
|
|
283
|
+
:type port_count: int
|
|
284
|
+
:param port_speed: the target port speed in Mbps, e.g. 40000 for 40G
|
|
285
|
+
:type port_speed: int
|
|
286
|
+
:param force: should forcibly reserve the module, defaults to True
|
|
287
|
+
:type force: bool, optional
|
|
288
|
+
:raises NotSupportMediaPortSpeed: the provided media, port count and port speed configuration is not supported by the module
|
|
289
289
|
"""
|
|
290
|
-
.. versionadded:: 1.3
|
|
291
290
|
|
|
291
|
+
# reserve the module first
|
|
292
|
+
await reserve_module(module, force)
|
|
293
|
+
|
|
294
|
+
# get the supported media
|
|
295
|
+
supported_media_list = get_module_supported_media(module)
|
|
296
|
+
|
|
297
|
+
# set the module media if the target media is found in supported media
|
|
298
|
+
for item in supported_media_list:
|
|
299
|
+
if all(
|
|
300
|
+
(
|
|
301
|
+
item["media"] == media,
|
|
302
|
+
item["port_count"] == port_count,
|
|
303
|
+
item["port_speed"] == port_speed,
|
|
304
|
+
)
|
|
305
|
+
):
|
|
306
|
+
portspeed_list = [port_count] + port_count * [port_speed]
|
|
307
|
+
await module.config.media.set(media_config=media)
|
|
308
|
+
await module.config.port_speed.set(portspeed_list=portspeed_list)
|
|
309
|
+
await release_module(module, False)
|
|
310
|
+
return None
|
|
311
|
+
raise NotSupportMediaPortSpeed(module)
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
async def get_module_eol_date(module: GenericAnyModule) -> str:
|
|
315
|
+
"""
|
|
292
316
|
Get module's End-of-Life date
|
|
293
317
|
|
|
294
318
|
:param module: The module object
|
|
@@ -303,8 +327,6 @@ async def get_module_eol_date(module: GenericAnyModule) -> str:
|
|
|
303
327
|
|
|
304
328
|
async def get_module_eol_days(module: GenericAnyModule) -> int:
|
|
305
329
|
"""
|
|
306
|
-
.. versionadded:: 1.3
|
|
307
|
-
|
|
308
330
|
Get days until module's End-of-Life date
|
|
309
331
|
|
|
310
332
|
:param module: The module object
|
|
@@ -321,8 +343,6 @@ async def get_module_eol_days(module: GenericAnyModule) -> int:
|
|
|
321
343
|
|
|
322
344
|
async def get_module_cage_insertion_count(module: Z800FreyaModule, cage_index: int) -> int:
|
|
323
345
|
"""
|
|
324
|
-
.. versionadded:: 2.7.2
|
|
325
|
-
|
|
326
346
|
Get module cage insertion count
|
|
327
347
|
|
|
328
348
|
:param module: The Z800 Freya module object
|
|
@@ -352,8 +372,6 @@ async def get_module_cage_insertion_count(module: Z800FreyaModule, cage_index: i
|
|
|
352
372
|
|
|
353
373
|
def get_all_ports(tester: GenericAnyTester) -> tuple[GenericAnyPort, ...]:
|
|
354
374
|
"""
|
|
355
|
-
.. versionadded:: 1.1
|
|
356
|
-
|
|
357
375
|
Get all ports of the tester
|
|
358
376
|
|
|
359
377
|
:param tester: The tester object
|
|
@@ -367,8 +385,6 @@ def get_all_ports(tester: GenericAnyTester) -> tuple[GenericAnyPort, ...]:
|
|
|
367
385
|
|
|
368
386
|
def get_ports(tester: GenericAnyTester, module_id: int) -> tuple[GenericAnyPort, ...]:
|
|
369
387
|
"""
|
|
370
|
-
.. versionadded:: 1.1
|
|
371
|
-
|
|
372
388
|
Get all ports of the module
|
|
373
389
|
|
|
374
390
|
:param tester: The tester object
|
|
@@ -384,8 +400,6 @@ def get_ports(tester: GenericAnyTester, module_id: int) -> tuple[GenericAnyPort,
|
|
|
384
400
|
|
|
385
401
|
def get_port(tester: GenericAnyTester, module_id: int, port_id: int) -> GenericAnyPort:
|
|
386
402
|
"""
|
|
387
|
-
.. versionadded:: 1.1
|
|
388
|
-
|
|
389
403
|
Get a port of the module
|
|
390
404
|
|
|
391
405
|
:param tester: The tester object
|
|
@@ -402,10 +416,8 @@ def get_port(tester: GenericAnyTester, module_id: int, port_id: int) -> GenericA
|
|
|
402
416
|
return module.ports.obtain(port_id)
|
|
403
417
|
|
|
404
418
|
|
|
405
|
-
async def reserve_port(port: GenericAnyPort, force: bool = True) -> None:
|
|
419
|
+
async def reserve_port(port: GenericAnyPort, force: bool = True, reset: bool = False) -> None:
|
|
406
420
|
"""
|
|
407
|
-
.. versionadded:: 1.1
|
|
408
|
-
|
|
409
421
|
Reserve a port regardless whether it is owned by others or not.
|
|
410
422
|
|
|
411
423
|
:param port: The port to reserve
|
|
@@ -423,27 +435,12 @@ async def reserve_port(port: GenericAnyPort, force: bool = True) -> None:
|
|
|
423
435
|
)
|
|
424
436
|
elif r.status == enums.ReservedStatus.RELEASED:
|
|
425
437
|
await port.reservation.set_reserve()
|
|
438
|
+
if reset:
|
|
439
|
+
await port.reset.set()
|
|
426
440
|
|
|
427
441
|
|
|
428
|
-
async def
|
|
429
|
-
"""
|
|
430
|
-
.. versionadded:: 1.1
|
|
431
|
-
|
|
432
|
-
Reserve and reset a port
|
|
433
|
-
|
|
434
|
-
:param port: The port to reset
|
|
435
|
-
:type port: GenericAnyPort
|
|
436
|
-
:return:
|
|
437
|
-
:rtype: None
|
|
438
|
-
"""
|
|
439
|
-
await reserve_port(port, False)
|
|
440
|
-
await port.reset.set()
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
async def free_port(port: GenericAnyPort) -> None:
|
|
442
|
+
async def release_port(port: GenericAnyPort) -> None:
|
|
444
443
|
"""
|
|
445
|
-
.. versionadded:: 1.1
|
|
446
|
-
|
|
447
444
|
Free a port. If the port is reserved by you, release the port. If the port is reserved by others, relinquish the port. The port should have no owner afterwards.
|
|
448
445
|
|
|
449
446
|
:param port: The port to free
|
|
@@ -458,16 +455,14 @@ async def free_port(port: GenericAnyPort) -> None:
|
|
|
458
455
|
await port.reservation.set_release()
|
|
459
456
|
|
|
460
457
|
|
|
461
|
-
async def
|
|
458
|
+
async def release_ports(*ports: GenericAnyPort) -> None:
|
|
462
459
|
"""
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
Free all ports on a module.
|
|
460
|
+
Free a list of ports. If the port is reserved by you, release the port. If the port is reserved by others, relinquish the port. The port should have no owner afterwards.
|
|
466
461
|
|
|
467
|
-
:param
|
|
468
|
-
:type
|
|
462
|
+
:param ports: The ports to free
|
|
463
|
+
:type ports: GenericAnyPort
|
|
469
464
|
"""
|
|
470
|
-
await asyncio.gather(*(
|
|
465
|
+
await asyncio.gather(*(release_port(port=p) for p in ports))
|
|
471
466
|
|
|
472
467
|
|
|
473
468
|
|
|
@@ -477,12 +472,10 @@ async def free_ports(*ports: GenericAnyPort) -> None:
|
|
|
477
472
|
# region Streams
|
|
478
473
|
async def remove_streams(port: GenericAnyPort) -> None:
|
|
479
474
|
"""
|
|
480
|
-
|
|
475
|
+
Remove all streams on a port witout resetting the port.
|
|
481
476
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
:param module: The port object
|
|
485
|
-
:type module: GenericAnyPort
|
|
477
|
+
:param port: The port object
|
|
478
|
+
:type port: GenericAnyPort
|
|
486
479
|
"""
|
|
487
480
|
await port.streams.server_sync()
|
|
488
481
|
await asyncio.gather(*(s.delete() for s in port.streams))
|
|
@@ -491,10 +484,10 @@ async def remove_streams(port: GenericAnyPort) -> None:
|
|
|
491
484
|
# endregion
|
|
492
485
|
|
|
493
486
|
__all__ = (
|
|
494
|
-
"
|
|
495
|
-
"
|
|
496
|
-
"
|
|
497
|
-
"
|
|
487
|
+
"release_module",
|
|
488
|
+
"release_port",
|
|
489
|
+
"release_ports",
|
|
490
|
+
"release_tester",
|
|
498
491
|
"get_all_ports",
|
|
499
492
|
"get_module",
|
|
500
493
|
"get_module_eol_date",
|
|
@@ -506,7 +499,6 @@ __all__ = (
|
|
|
506
499
|
"reserve_module",
|
|
507
500
|
"reserve_port",
|
|
508
501
|
"reserve_tester",
|
|
509
|
-
"reset_port",
|
|
510
502
|
"set_module_media_config",
|
|
511
503
|
"set_module_port_config",
|
|
512
504
|
"remove_streams",
|
xoa_driver/functions/tools.py
CHANGED
|
@@ -253,4 +253,16 @@ def dictionize_anlt_log_ctrl_status(
|
|
|
253
253
|
"fsm_lt_stimuli": _fsm_lt_stimuli,
|
|
254
254
|
"fsm_lt_alg0": _fsm_lt_alg0,
|
|
255
255
|
"fsm_lt_algn1": _fsm_lt_algn1,
|
|
256
|
-
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
__all__ = (
|
|
259
|
+
"get_ctx",
|
|
260
|
+
"dictionize_autoneg_status",
|
|
261
|
+
"dictionize_lt_status",
|
|
262
|
+
"dictionize_txtap_get",
|
|
263
|
+
"dictionize_anlt_status",
|
|
264
|
+
"dictionize_lt_im_status",
|
|
265
|
+
"dictionize_lt_algorithm_status",
|
|
266
|
+
"MODULE_EOL_INFO",
|
|
267
|
+
"dictionize_anlt_log_ctrl_status",
|
|
268
|
+
)
|
|
@@ -2039,3 +2039,29 @@ class C_MODEL_NUMBER:
|
|
|
2039
2039
|
"""
|
|
2040
2040
|
|
|
2041
2041
|
return Token(self._connection, build_get_request(self))
|
|
2042
|
+
|
|
2043
|
+
|
|
2044
|
+
@register_command
|
|
2045
|
+
@dataclass
|
|
2046
|
+
class C_USED_TPLDID:
|
|
2047
|
+
"""
|
|
2048
|
+
Get the used TPLD IDs from the chassis.
|
|
2049
|
+
"""
|
|
2050
|
+
|
|
2051
|
+
code: typing.ClassVar[int] = 44
|
|
2052
|
+
pushed: typing.ClassVar[bool] = False
|
|
2053
|
+
|
|
2054
|
+
_connection: 'interfaces.IConnection'
|
|
2055
|
+
|
|
2056
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
2057
|
+
used_tpld_ids: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
2058
|
+
"""integer list, the used TPLD IDs from the chassis."""
|
|
2059
|
+
|
|
2060
|
+
def get(self) -> Token[GetDataAttr]:
|
|
2061
|
+
"""Get the used TPLD IDs from the chassis.
|
|
2062
|
+
|
|
2063
|
+
:return: the used TPLD IDs from the chassis.
|
|
2064
|
+
:rtype: C_USED_TPLDID.GetDataAttr
|
|
2065
|
+
"""
|
|
2066
|
+
|
|
2067
|
+
return Token(self._connection, build_get_request(self))
|
|
@@ -733,15 +733,11 @@ class PayloadType(IntEnum):
|
|
|
733
733
|
|
|
734
734
|
INC16 = 5
|
|
735
735
|
"""
|
|
736
|
-
.. versionadded:: 1.1
|
|
737
|
-
|
|
738
736
|
Incrementing with 0xFFFF (16-bit mode)
|
|
739
737
|
"""
|
|
740
738
|
|
|
741
739
|
DEC16 = 6
|
|
742
740
|
"""
|
|
743
|
-
.. versionadded:: 1.1
|
|
744
|
-
|
|
745
741
|
Decrementing with 0xFFFF (16-bit mode)
|
|
746
742
|
"""
|
|
747
743
|
|
|
@@ -1064,6 +1060,15 @@ class MediaConfigurationType(IntEnum):
|
|
|
1064
1060
|
OSFP_NRZ = 120
|
|
1065
1061
|
"""OSFP, 56G serdes, NRZ"""
|
|
1066
1062
|
|
|
1063
|
+
QSFP_DD_NRZ_ANLT = 121
|
|
1064
|
+
"""QSFP-DD, 25G serdes, L1/ANLT"""
|
|
1065
|
+
|
|
1066
|
+
OSFP_NRZ_ANLT = 122
|
|
1067
|
+
"""OSFP, 25G serdes, L1/ANLT"""
|
|
1068
|
+
|
|
1069
|
+
QSFP28_NRZ_ANLT = 123
|
|
1070
|
+
"""QSFP28, 25G serdes, L1/ANLT"""
|
|
1071
|
+
|
|
1067
1072
|
UNKNOWN = 255
|
|
1068
1073
|
|
|
1069
1074
|
|
|
@@ -2278,8 +2283,6 @@ class LinkTrainingFailureType(IntEnum):
|
|
|
2278
2283
|
|
|
2279
2284
|
class Layer1ConfigType(IntEnum):
|
|
2280
2285
|
"""
|
|
2281
|
-
.. versionadded:: 1.1
|
|
2282
|
-
|
|
2283
2286
|
Enums for PL1_CFG_TMP's type.
|
|
2284
2287
|
"""
|
|
2285
2288
|
|
|
@@ -2314,8 +2317,6 @@ class Layer1ConfigType(IntEnum):
|
|
|
2314
2317
|
class Layer1LogType(IntEnum):
|
|
2315
2318
|
"""
|
|
2316
2319
|
|
|
2317
|
-
.. versionadded:: 1.1
|
|
2318
|
-
|
|
2319
2320
|
.. warning::
|
|
2320
2321
|
|
|
2321
2322
|
Still in beta mode. Subjected to changes
|
|
@@ -2332,10 +2333,7 @@ class Layer1LogType(IntEnum):
|
|
|
2332
2333
|
|
|
2333
2334
|
class LinkTrainAlgorithm(IntEnum):
|
|
2334
2335
|
"""
|
|
2335
|
-
.. versionadded:: 1.2
|
|
2336
|
-
|
|
2337
2336
|
Link Training Algorithm
|
|
2338
|
-
|
|
2339
2337
|
"""
|
|
2340
2338
|
|
|
2341
2339
|
INTERACTIVE = 0
|
|
@@ -2350,8 +2348,6 @@ class LinkTrainAlgorithm(IntEnum):
|
|
|
2350
2348
|
|
|
2351
2349
|
class LinkTrainCmd(IntEnum):
|
|
2352
2350
|
"""
|
|
2353
|
-
.. versionadded:: 1.1
|
|
2354
|
-
|
|
2355
2351
|
Link Training commands
|
|
2356
2352
|
|
|
2357
2353
|
"""
|
|
@@ -2380,8 +2376,6 @@ class LinkTrainCmd(IntEnum):
|
|
|
2380
2376
|
|
|
2381
2377
|
class LinkTrainPresets(IntEnum):
|
|
2382
2378
|
"""
|
|
2383
|
-
.. versionadded:: 1.1
|
|
2384
|
-
|
|
2385
2379
|
Link Training presets
|
|
2386
2380
|
|
|
2387
2381
|
"""
|
|
@@ -2407,8 +2401,6 @@ class LinkTrainPresets(IntEnum):
|
|
|
2407
2401
|
|
|
2408
2402
|
class LinkTrainCoeffs(IntEnum):
|
|
2409
2403
|
"""
|
|
2410
|
-
.. versionadded:: 1.1
|
|
2411
|
-
|
|
2412
2404
|
|
|
2413
2405
|
Link Training coefficients
|
|
2414
2406
|
|
|
@@ -2435,8 +2427,6 @@ class LinkTrainCoeffs(IntEnum):
|
|
|
2435
2427
|
|
|
2436
2428
|
class LinkTrainEncoding(IntEnum):
|
|
2437
2429
|
"""
|
|
2438
|
-
.. versionadded:: 1.1
|
|
2439
|
-
|
|
2440
2430
|
Link Training Encoding
|
|
2441
2431
|
|
|
2442
2432
|
"""
|
|
@@ -2456,8 +2446,6 @@ class LinkTrainEncoding(IntEnum):
|
|
|
2456
2446
|
|
|
2457
2447
|
class LinkTrainCmdResults(IntEnum):
|
|
2458
2448
|
"""
|
|
2459
|
-
.. versionadded:: 1.1
|
|
2460
|
-
|
|
2461
2449
|
Link Training Command Results
|
|
2462
2450
|
|
|
2463
2451
|
"""
|
|
@@ -2495,8 +2483,6 @@ class LinkTrainCmdResults(IntEnum):
|
|
|
2495
2483
|
|
|
2496
2484
|
class LinkTrainCmdFlags(IntEnum):
|
|
2497
2485
|
"""
|
|
2498
|
-
.. versionadded:: 1.1
|
|
2499
|
-
|
|
2500
2486
|
Link Training Command Flags
|
|
2501
2487
|
|
|
2502
2488
|
"""
|
|
@@ -2522,8 +2508,6 @@ class LinkTrainCmdFlags(IntEnum):
|
|
|
2522
2508
|
|
|
2523
2509
|
class LinkTrainAnnounce(IntEnum):
|
|
2524
2510
|
"""
|
|
2525
|
-
.. versionadded:: 1.1
|
|
2526
|
-
|
|
2527
2511
|
Link Training Announce
|
|
2528
2512
|
|
|
2529
2513
|
"""
|
|
@@ -2534,8 +2518,6 @@ class LinkTrainAnnounce(IntEnum):
|
|
|
2534
2518
|
|
|
2535
2519
|
class AnLtLogControl(IntEnum):
|
|
2536
2520
|
"""
|
|
2537
|
-
.. versionadded:: 1.3
|
|
2538
|
-
|
|
2539
2521
|
ANLT log control bits
|
|
2540
2522
|
|
|
2541
2523
|
"""
|
|
@@ -3198,6 +3180,12 @@ class ModuleModelName(IntEnum):
|
|
|
3198
3180
|
Z_800_Q_FREYA = 10
|
|
3199
3181
|
Z_800_O_FREYA = 11
|
|
3200
3182
|
E_100_Q_CHIMERA = 12
|
|
3183
|
+
|
|
3184
|
+
class ModuleConfigStatus(IntEnum):
|
|
3185
|
+
UNKNOWN = 0
|
|
3186
|
+
SUCCESS = 1
|
|
3187
|
+
PROGRESSING = 2
|
|
3188
|
+
FAILED = 3
|
|
3201
3189
|
|
|
3202
3190
|
# endregion
|
|
3203
3191
|
|
|
@@ -3264,8 +3252,8 @@ class MACSecRekeyMode(IntEnum):
|
|
|
3264
3252
|
PN_EXHAUSTION = 0
|
|
3265
3253
|
"""Switch to the next SAK when PN is exhausted."""
|
|
3266
3254
|
|
|
3267
|
-
|
|
3268
|
-
"""Switch to the next SAK when the given number
|
|
3255
|
+
PACKET_NUMBER = 1
|
|
3256
|
+
"""Switch to the next SAK when the given packet number is transmitted."""
|
|
3269
3257
|
|
|
3270
3258
|
|
|
3271
3259
|
class MACSecEncryptionMode(IntEnum):
|
|
@@ -45,7 +45,8 @@ from .enums import (
|
|
|
45
45
|
ImpairmentLatencyMode,
|
|
46
46
|
PPMSweepStatus,
|
|
47
47
|
PPMSweepMode,
|
|
48
|
-
ModuleModelName
|
|
48
|
+
ModuleModelName,
|
|
49
|
+
ModuleConfigStatus,
|
|
49
50
|
)
|
|
50
51
|
|
|
51
52
|
|
|
@@ -1605,8 +1606,6 @@ class M_TXCLOCKFILTER_NEW:
|
|
|
1605
1606
|
@dataclass
|
|
1606
1607
|
class M_CLOCKPPBSWEEP:
|
|
1607
1608
|
"""
|
|
1608
|
-
.. versionadded:: 1.1
|
|
1609
|
-
|
|
1610
1609
|
Start and stop deviation sweep the local clock of the test module, which drives the TX rate of the test ports.
|
|
1611
1610
|
|
|
1612
1611
|
Note: The sweep is independent of the :class:`M_CLOCKPPB` parameter, i.e. the sweep uses the deviation set by :class:`M_CLOCKPPB` as its zero point.
|
|
@@ -1685,8 +1684,6 @@ class M_CLOCKPPBSWEEP:
|
|
|
1685
1684
|
@dataclass
|
|
1686
1685
|
class M_CLOCKSWEEPSTATUS:
|
|
1687
1686
|
"""
|
|
1688
|
-
.. versionadded:: 1.1
|
|
1689
|
-
|
|
1690
1687
|
Return the current status of the :class:`M_CLOCKPPBSWEEP` function.
|
|
1691
1688
|
|
|
1692
1689
|
"""
|
|
@@ -1863,13 +1860,44 @@ class M_MODEL_NAME:
|
|
|
1863
1860
|
|
|
1864
1861
|
class GetDataAttr(ResponseBodyStruct):
|
|
1865
1862
|
name: ModuleModelName = field(XmpInt())
|
|
1866
|
-
"""
|
|
1863
|
+
"""Module Model Name, model name of the Xena module."""
|
|
1867
1864
|
|
|
1868
1865
|
def get(self) -> Token[GetDataAttr]:
|
|
1869
1866
|
"""Get the Xena chassis model name.
|
|
1870
1867
|
|
|
1871
1868
|
:return: the model name of the Xena tester
|
|
1872
|
-
:rtype:
|
|
1869
|
+
:rtype: M_MODEL_NAME.GetDataAttr
|
|
1873
1870
|
"""
|
|
1874
1871
|
|
|
1875
1872
|
return Token(self._connection, build_get_request(self, module=self._module))
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
@register_command
|
|
1876
|
+
@dataclass
|
|
1877
|
+
class M_RECONFIG_STATUS:
|
|
1878
|
+
"""
|
|
1879
|
+
Show the test module configuration status when the user has configured the test module to a different configuration than the one it is currently running.
|
|
1880
|
+
"""
|
|
1881
|
+
|
|
1882
|
+
code: typing.ClassVar[int] = 399
|
|
1883
|
+
pushed: typing.ClassVar[bool] = False
|
|
1884
|
+
|
|
1885
|
+
_connection: 'interfaces.IConnection'
|
|
1886
|
+
_module: int
|
|
1887
|
+
|
|
1888
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
1889
|
+
status: ModuleConfigStatus = field(XmpByte())
|
|
1890
|
+
"""Module configuration status."""
|
|
1891
|
+
|
|
1892
|
+
progress: int = field(XmpInt())
|
|
1893
|
+
"""Progress in units of 0.1%, i.e. valid range 0-1000. Increments are module-specific, the value may in some cases jump directly from 0 to 1000, or in other cases progress more smoothly.
|
|
1894
|
+
"""
|
|
1895
|
+
|
|
1896
|
+
def get(self) -> Token[GetDataAttr]:
|
|
1897
|
+
"""Show the test module configuration status when the user has configured the test module to a different configuration than the one it is currently running.
|
|
1898
|
+
|
|
1899
|
+
:return: the model name of the Xena tester
|
|
1900
|
+
:rtype: M_RECONFIG_STATUS.GetDataAttr
|
|
1901
|
+
"""
|
|
1902
|
+
|
|
1903
|
+
return Token(self._connection, build_get_request(self, module=self._module))
|