tdl-xoa-driver 1.4.0__py3-none-any.whl → 1.5.0b1__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.4.0.dist-info → tdl_xoa_driver-1.5.0b1.dist-info}/METADATA +2 -2
- {tdl_xoa_driver-1.4.0.dist-info → tdl_xoa_driver-1.5.0b1.dist-info}/RECORD +45 -33
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +2 -0
- xoa_driver/exceptions.py +2 -0
- xoa_driver/functions/anlt.py +2 -0
- xoa_driver/functions/anlt_ll_debug.py +2 -0
- xoa_driver/functions/cli/__init__.py +21 -0
- xoa_driver/functions/cli/_cli_manager.py +541 -0
- xoa_driver/functions/cli/_config_block.py +334 -0
- xoa_driver/functions/cli/_socket_driver.py +111 -0
- xoa_driver/functions/cli/port_config.py +107 -0
- xoa_driver/functions/cli/test_case_config.py +172 -0
- xoa_driver/functions/cmis/__init__.py +8 -0
- xoa_driver/functions/cmis/_constants.py +25 -0
- xoa_driver/functions/cmis/_replies.py +600 -0
- xoa_driver/functions/cmis/_utils.py +49 -0
- xoa_driver/functions/cmis/cdb.py +1266 -0
- xoa_driver/functions/exceptions.py +2 -0
- xoa_driver/functions/headers.py +2 -0
- xoa_driver/functions/mgmt.py +42 -19
- xoa_driver/functions/tools.py +9 -3
- xoa_driver/hlfuncs.py +6 -2
- xoa_driver/internals/commands/c_commands.py +6 -10
- xoa_driver/internals/commands/enums.py +25 -1
- xoa_driver/internals/commands/pr_commands.py +17 -16
- xoa_driver/internals/commands/px_commands.py +54 -54
- xoa_driver/internals/core/transporter/logger/__state_on_user.py +1 -1
- xoa_driver/internals/exceptions/modules.py +4 -3
- xoa_driver/internals/hli/modules/modules_l23/family_edun.py +82 -0
- xoa_driver/internals/hli/modules/modules_l23/family_g.py +1 -1
- xoa_driver/internals/hli/modules/modules_l23/family_l1.py +19 -0
- xoa_driver/internals/hli/ports/port_l23/family_edun.py +82 -0
- xoa_driver/internals/hli/ports/port_l23/family_l1.py +6 -0
- xoa_driver/internals/state_storage/modules_state.py +20 -0
- xoa_driver/internals/state_storage/testers_state.py +10 -0
- xoa_driver/lli.py +1 -0
- xoa_driver/misc.py +1 -0
- xoa_driver/modules.py +22 -0
- xoa_driver/ports.py +22 -0
- xoa_driver/testers.py +2 -0
- xoa_driver/utils.py +2 -0
- xoa_driver/functions/cli.py +0 -581
- {tdl_xoa_driver-1.4.0.dist-info → tdl_xoa_driver-1.5.0b1.dist-info}/WHEEL +0 -0
- {tdl_xoa_driver-1.4.0.dist-info → tdl_xoa_driver-1.5.0b1.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.4.0.dist-info → tdl_xoa_driver-1.5.0b1.dist-info}/top_level.txt +0 -0
|
@@ -365,10 +365,10 @@ class PX_CDB_ABORT_PROCESSING:
|
|
|
365
365
|
.. code-block:: json
|
|
366
366
|
|
|
367
367
|
{
|
|
368
|
-
"cdb_status":
|
|
368
|
+
"cdb_status": 0
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
* ``cdb_status``:
|
|
371
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
372
372
|
|
|
373
373
|
"""
|
|
374
374
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -413,10 +413,10 @@ class PX_CDB_CHANGE_PASSWORD:
|
|
|
413
413
|
.. code-block:: json
|
|
414
414
|
|
|
415
415
|
{
|
|
416
|
-
"cdb_status":
|
|
416
|
+
"cdb_status": 0
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
* ``cdb_status``:
|
|
419
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
420
420
|
|
|
421
421
|
"""
|
|
422
422
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -443,10 +443,10 @@ class PX_CDB_CHANGE_PASSWORD:
|
|
|
443
443
|
.. code-block:: json
|
|
444
444
|
|
|
445
445
|
{
|
|
446
|
-
"new_password":
|
|
446
|
+
"new_password": [54,55,56,57]
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
* ``new_password``:
|
|
449
|
+
* ``new_password``: array of four integers, new password to be entered.
|
|
450
450
|
|
|
451
451
|
"""
|
|
452
452
|
|
|
@@ -473,10 +473,10 @@ class PX_CDB_ENTER_PASSWORD:
|
|
|
473
473
|
.. code-block:: json
|
|
474
474
|
|
|
475
475
|
{
|
|
476
|
-
"cdb_status":
|
|
476
|
+
"cdb_status": 0
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
* ``cdb_status``:
|
|
479
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
480
480
|
|
|
481
481
|
"""
|
|
482
482
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -486,10 +486,10 @@ class PX_CDB_ENTER_PASSWORD:
|
|
|
486
486
|
.. code-block:: json
|
|
487
487
|
|
|
488
488
|
{
|
|
489
|
-
"password":
|
|
489
|
+
"password": [54,55,56,57]
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
* ``password``:
|
|
492
|
+
* ``password``: array of four integers, password to be entered.
|
|
493
493
|
|
|
494
494
|
"""
|
|
495
495
|
|
|
@@ -512,10 +512,10 @@ class PX_CDB_ENTER_PASSWORD:
|
|
|
512
512
|
.. code-block:: json
|
|
513
513
|
|
|
514
514
|
{
|
|
515
|
-
"password":
|
|
515
|
+
"password": [54,55,56,57]
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
* ``password``:
|
|
518
|
+
* ``password``: array of four integers, password to be entered.
|
|
519
519
|
|
|
520
520
|
"""
|
|
521
521
|
|
|
@@ -542,12 +542,12 @@ class PX_CDB_QUERY_STATUS:
|
|
|
542
542
|
.. code-block:: json
|
|
543
543
|
|
|
544
544
|
{
|
|
545
|
-
"cdb_status":
|
|
546
|
-
"status":
|
|
545
|
+
"cdb_status": 0,
|
|
546
|
+
"status": 0
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
-
* ``cdb_status``:
|
|
550
|
-
* ``status``:
|
|
549
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
550
|
+
* ``status``: integer
|
|
551
551
|
|
|
552
552
|
* 0000 0000b: Module Boot Up.
|
|
553
553
|
* 0000 0001b: Host Password Accepted.
|
|
@@ -618,11 +618,11 @@ class PX_CDB_EXTERNAL_FEATURES:
|
|
|
618
618
|
.. code-block:: json
|
|
619
619
|
|
|
620
620
|
{
|
|
621
|
-
"cdb_status":
|
|
621
|
+
"cdb_status": 0,
|
|
622
622
|
"supplement_support": "0x00"
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
* ``cdb_status``:
|
|
625
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
626
626
|
* ``supplement_support``: hex string, Bit 0 = 0/1: CMIS-VCS not supported/supported
|
|
627
627
|
|
|
628
628
|
"""
|
|
@@ -669,7 +669,7 @@ class PX_CDB_FW_MGMT_FEATURES:
|
|
|
669
669
|
.. code-block:: json
|
|
670
670
|
|
|
671
671
|
{
|
|
672
|
-
"cdb_status":
|
|
672
|
+
"cdb_status": 0,
|
|
673
673
|
"feature_support_mask": "0x00",
|
|
674
674
|
"start_cmd_payload_size": 2,
|
|
675
675
|
"erased_byte": "0x00",
|
|
@@ -684,7 +684,7 @@ class PX_CDB_FW_MGMT_FEATURES:
|
|
|
684
684
|
"max_duration_copy": 123
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
* ``cdb_status``:
|
|
687
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
688
688
|
* ``feature_support_mask``: hex string, indicates support of Firmware Management features.
|
|
689
689
|
* ``start_cmd_payload_size``: integer, This defines the number of bytes that the host must extract from the beginning of the vendor-delivered binary firmware image file and send to the module in CMD 0101h (Start).
|
|
690
690
|
* ``erased_byte``: hex string, This is the value representing an erased byte. The purpose of advertising this byte is to optionally reduce download time by allowing the host to skip sending blocks of the image containing ErasedByte values only.
|
|
@@ -742,7 +742,7 @@ class PX_CDB_GET_APP_ATTRIBUTES:
|
|
|
742
742
|
.. code-block:: json
|
|
743
743
|
|
|
744
744
|
{
|
|
745
|
-
"cdb_status":
|
|
745
|
+
"cdb_status": 0,
|
|
746
746
|
"application_number": 123,
|
|
747
747
|
"max_module_power": 123,
|
|
748
748
|
"prog_output_power_min": 123,
|
|
@@ -755,7 +755,7 @@ class PX_CDB_GET_APP_ATTRIBUTES:
|
|
|
755
755
|
"rx_power_low_warning_threshold": 123
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
-
* ``cdb_status``:
|
|
758
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
759
759
|
* ``application_number``: integer, U16 Application number. 15-8: reserved (0). 7-4: NADBlockIndex (0-15) or 0. 3-0: AppSelCode (1-15).
|
|
760
760
|
* ``max_module_power``: integer, U16: Worst case module power dissipation when this Application is instantiated homogeneously as often as possible in parallel (when applicable) with worst case configuration options. Unit: 0.25 W.
|
|
761
761
|
* ``prog_output_power_min``: integer, S16: Minimum Programmable Output Power, Unit: 0.01 dBm.
|
|
@@ -830,7 +830,7 @@ class PX_CDB_GET_IF_CODE_DESCR:
|
|
|
830
830
|
.. code-block:: json
|
|
831
831
|
|
|
832
832
|
{
|
|
833
|
-
"cdb_status":
|
|
833
|
+
"cdb_status": 0,
|
|
834
834
|
"interface_id": "0x01",
|
|
835
835
|
"interface_location": "0x00",
|
|
836
836
|
"interfacre_name": "10G Ethernet",
|
|
@@ -842,7 +842,7 @@ class PX_CDB_GET_IF_CODE_DESCR:
|
|
|
842
842
|
"bits_per_symbol": 2
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
* ``cdb_status``:
|
|
845
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
846
846
|
* ``interface_id``: hex string, U16: HostInterfaceID or MediaInterfaceID. 15-8: reserved (0). 7-0: InterfaceID
|
|
847
847
|
* ``interface_location``: integer, 0: media side. 1: host side.
|
|
848
848
|
* ``interfacre_name``: string, 16-byte long ACII string. Name of the interface.
|
|
@@ -920,12 +920,12 @@ class PX_CDB_MODULE_FEATURES:
|
|
|
920
920
|
.. code-block:: json
|
|
921
921
|
|
|
922
922
|
{
|
|
923
|
-
"cdb_status":
|
|
923
|
+
"cdb_status": 0,
|
|
924
924
|
"cmd_support_mask": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
925
925
|
"max_completion_time": 1000
|
|
926
926
|
}
|
|
927
927
|
|
|
928
|
-
* ``cdb_status``:
|
|
928
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
929
929
|
* ``cmd_support_mask``: :hex string, indicates support of CDB commands 0000h-00FFh. This array of 32 bytes indicates support of CDB commands CMD <i>, with identifiers 0 ≤ <i> ≤ 255, as follows: CMD <i> is supported when bit<j>=<i>mod 8 of byte<k> = 138+floor(<i>/8) is set.
|
|
930
930
|
* ``max_completion_time``: integer, U16 Maximum CDB command execution time in ms, of all supported CDB commands.
|
|
931
931
|
|
|
@@ -972,7 +972,7 @@ class PX_CDB_SEC_FEAT_CAPABILITIES:
|
|
|
972
972
|
.. code-block:: json
|
|
973
973
|
|
|
974
974
|
{
|
|
975
|
-
"cdb_status":
|
|
975
|
+
"cdb_status": 0,
|
|
976
976
|
"cmd_support_mask": "0xFF",
|
|
977
977
|
"num_certificates": 0,
|
|
978
978
|
"cert_chain_supported": 0,
|
|
@@ -988,7 +988,7 @@ class PX_CDB_SEC_FEAT_CAPABILITIES:
|
|
|
988
988
|
"signature_pad_scheme": 0
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
-
* ``cdb_status``:
|
|
991
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
992
992
|
* ``cmd_support_mask``: hex string, indicates support of CDB commands 0400-04FFh.
|
|
993
993
|
* ``num_certificates``: integer, number of public certificates the host may obtain from the module. The device must contain a single leaf certificate and it may optionally contain one or more intermediate certificates optionally followed by a root certificate. For X.509 certificates, intermediate certificates are not self-signed, and the root cert is self-signed. ``num_certificates <= 4``.
|
|
994
994
|
* ``cert_chain_supported``: integer, 0: Certificate chain is not supported. Module contains leaf certificate instance i = 0 only. 1: Module supports certificate chain and host must specify the instance when downloading a certificate. Instance i = 0 is the start of the chain, i.e. the leaf certificate, and any instance i+1 is another certificate used to sign the certificate instance i, where ``i < num_certificates <= 4``
|
|
@@ -1047,10 +1047,10 @@ class PX_CDB_ABORT_FW_DOWNLOAD:
|
|
|
1047
1047
|
.. code-block:: json
|
|
1048
1048
|
|
|
1049
1049
|
{
|
|
1050
|
-
"cdb_status":
|
|
1050
|
+
"cdb_status": 0
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
|
-
* ``cdb_status``:
|
|
1053
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1054
1054
|
|
|
1055
1055
|
"""
|
|
1056
1056
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1095,10 +1095,10 @@ class PX_CDB_COMMIT_FW_IMAGE:
|
|
|
1095
1095
|
.. code-block:: json
|
|
1096
1096
|
|
|
1097
1097
|
{
|
|
1098
|
-
"cdb_status":
|
|
1098
|
+
"cdb_status": 0
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
* ``cdb_status``:
|
|
1101
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1102
1102
|
|
|
1103
1103
|
"""
|
|
1104
1104
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1143,10 +1143,10 @@ class PX_CDB_COMPLETE_FW_DOWNLOAD:
|
|
|
1143
1143
|
.. code-block:: json
|
|
1144
1144
|
|
|
1145
1145
|
{
|
|
1146
|
-
"cdb_status":
|
|
1146
|
+
"cdb_status": 0
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
|
-
* ``cdb_status``:
|
|
1149
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1150
1150
|
|
|
1151
1151
|
"""
|
|
1152
1152
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1191,12 +1191,12 @@ class PX_CDB_COPY_FW_IMAGE:
|
|
|
1191
1191
|
.. code-block:: json
|
|
1192
1192
|
|
|
1193
1193
|
{
|
|
1194
|
-
"cdb_status":
|
|
1194
|
+
"cdb_status": 0,
|
|
1195
1195
|
"copy_direction": "0xAB",
|
|
1196
1196
|
"copy_status": "0x00"
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
|
-
* ``cdb_status``:
|
|
1199
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1200
1200
|
* ``copy_direction``: hex string, copy direction.
|
|
1201
1201
|
|
|
1202
1202
|
* ``0xAB``, Copy Image A into Image B
|
|
@@ -1264,7 +1264,7 @@ class PX_CDB_GET_FW_INFO:
|
|
|
1264
1264
|
.. code-block:: json
|
|
1265
1265
|
|
|
1266
1266
|
{
|
|
1267
|
-
"cdb_status":
|
|
1267
|
+
"cdb_status": 0,
|
|
1268
1268
|
"firmware_status": 0,
|
|
1269
1269
|
"image_information": 0,
|
|
1270
1270
|
"image_a_major": 0,
|
|
@@ -1281,7 +1281,7 @@ class PX_CDB_GET_FW_INFO:
|
|
|
1281
1281
|
"factory_boot_extra_string": "abcdef"
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
-
* ``cdb_status``:
|
|
1284
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1285
1285
|
* ``firmware_status``: integer, Firmware Status.
|
|
1286
1286
|
|
|
1287
1287
|
Bitmask to indicate FW Status.
|
|
@@ -1369,11 +1369,11 @@ class PX_CDB_READ_FW_BLOCK_EPL:
|
|
|
1369
1369
|
.. code-block:: json
|
|
1370
1370
|
|
|
1371
1371
|
{
|
|
1372
|
-
"cdb_status":
|
|
1372
|
+
"cdb_status": 0,
|
|
1373
1373
|
"image_data": "0x00010203040506070809"
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
1376
|
-
* ``cdb_status``:
|
|
1376
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1377
1377
|
* ``image_data``: hex string, Up to 2048 bytes.
|
|
1378
1378
|
|
|
1379
1379
|
"""
|
|
@@ -1436,12 +1436,12 @@ class PX_CDB_READ_FW_BLOCK_LPL:
|
|
|
1436
1436
|
.. code-block:: json
|
|
1437
1437
|
|
|
1438
1438
|
{
|
|
1439
|
-
"cdb_status":
|
|
1439
|
+
"cdb_status": 0,
|
|
1440
1440
|
"base_address_block": "0x0000000C",
|
|
1441
1441
|
"image_data": "0x00010203040506070809"
|
|
1442
1442
|
}
|
|
1443
1443
|
|
|
1444
|
-
* ``cdb_status``:
|
|
1444
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1445
1445
|
* ``base_address_block``: hex string, Base address of the data block within the firmware image.
|
|
1446
1446
|
* ``image_data``: : hex string, Up to 2048 bytes.
|
|
1447
1447
|
|
|
@@ -1504,10 +1504,10 @@ class PX_CDB_RUN_FW_IMAGE:
|
|
|
1504
1504
|
.. code-block:: json
|
|
1505
1505
|
|
|
1506
1506
|
{
|
|
1507
|
-
"cdb_status":
|
|
1507
|
+
"cdb_status": 0
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
1510
|
-
* ``cdb_status``:
|
|
1510
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1511
1511
|
|
|
1512
1512
|
"""
|
|
1513
1513
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1588,10 +1588,10 @@ class PX_CDB_START_FW_DOWNLOAD:
|
|
|
1588
1588
|
.. code-block:: json
|
|
1589
1589
|
|
|
1590
1590
|
{
|
|
1591
|
-
"cdb_status":
|
|
1591
|
+
"cdb_status": 0
|
|
1592
1592
|
}
|
|
1593
1593
|
|
|
1594
|
-
* ``cdb_status``:
|
|
1594
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1595
1595
|
|
|
1596
1596
|
"""
|
|
1597
1597
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1660,10 +1660,10 @@ class PX_CDB_WRITE_FW_BLOCK_EPL:
|
|
|
1660
1660
|
.. code-block:: json
|
|
1661
1661
|
|
|
1662
1662
|
{
|
|
1663
|
-
"cdb_status":
|
|
1663
|
+
"cdb_status": 0
|
|
1664
1664
|
}
|
|
1665
1665
|
|
|
1666
|
-
* ``cdb_status``:
|
|
1666
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1667
1667
|
|
|
1668
1668
|
"""
|
|
1669
1669
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1721,10 +1721,10 @@ class PX_CDB_WRITE_FW_BLOCK_LPL:
|
|
|
1721
1721
|
.. code-block:: json
|
|
1722
1722
|
|
|
1723
1723
|
{
|
|
1724
|
-
"cdb_status":
|
|
1724
|
+
"cdb_status": 0
|
|
1725
1725
|
}
|
|
1726
1726
|
|
|
1727
|
-
* ``cdb_status``:
|
|
1727
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1728
1728
|
|
|
1729
1729
|
"""
|
|
1730
1730
|
class SetDataAttr(RequestBodyStruct):
|
|
@@ -1828,7 +1828,7 @@ class PX_CUST_CMD:
|
|
|
1828
1828
|
{
|
|
1829
1829
|
"reply_status": {
|
|
1830
1830
|
"cdb_cmd_complete_flag": "0x00",
|
|
1831
|
-
"cdb_status":
|
|
1831
|
+
"cdb_status": 0,
|
|
1832
1832
|
},
|
|
1833
1833
|
"reply_header": {
|
|
1834
1834
|
"rpl_length": 9,
|
|
@@ -1842,7 +1842,7 @@ class PX_CUST_CMD:
|
|
|
1842
1842
|
* ``reply_status``: dict, JSON formatted string containing the following fields:
|
|
1843
1843
|
|
|
1844
1844
|
* ``cdb_cmd_complete_flag``: hex string, indicates whether the CDB command is complete.
|
|
1845
|
-
* ``cdb_status``:
|
|
1845
|
+
* ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1846
1846
|
|
|
1847
1847
|
* ``reply_header``: dict, JSON formatted string containing the following fields:
|
|
1848
1848
|
|
|
@@ -1887,7 +1887,7 @@ class PX_CUST_CMD:
|
|
|
1887
1887
|
# {
|
|
1888
1888
|
# "reply_status": {
|
|
1889
1889
|
# "cdb_cmd_complete_flag": "0x00",
|
|
1890
|
-
# "cdb_status":
|
|
1890
|
+
# "cdb_status": 0,
|
|
1891
1891
|
# },
|
|
1892
1892
|
# "reply_header": {
|
|
1893
1893
|
# "rpl_length": 9,
|
|
@@ -1901,7 +1901,7 @@ class PX_CUST_CMD:
|
|
|
1901
1901
|
# * ``reply_status``: dict, JSON formatted string containing the following fields:
|
|
1902
1902
|
|
|
1903
1903
|
# * ``cdb_cmd_complete_flag``: hex string, indicates whether the CDB command is complete.
|
|
1904
|
-
# * ``cdb_status``:
|
|
1904
|
+
# * ``cdb_status``: integer, provides the status of the most recently triggered CDB command.
|
|
1905
1905
|
|
|
1906
1906
|
# * ``reply_header``: dict, JSON formatted string containing the following fields:
|
|
1907
1907
|
|
|
@@ -19,7 +19,7 @@ SYMBOL_RESPONSE = f"{YELLOW} <- {RESET}"
|
|
|
19
19
|
|
|
20
20
|
class StateOnUser:
|
|
21
21
|
@staticmethod
|
|
22
|
-
def setup(connid: str, logger: "CustomLogger") -> "CustomLogger
|
|
22
|
+
def setup(connid: str, logger: "CustomLogger") -> "CustomLogger | None":
|
|
23
23
|
return logger
|
|
24
24
|
|
|
25
25
|
@staticmethod
|
|
@@ -2,12 +2,13 @@ from typing import Set
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class WrongModuleError(Exception):
|
|
5
|
-
"""Module
|
|
5
|
+
"""Module cannot be assigned to the connected tester object."""
|
|
6
6
|
def __init__(self, module_revision: str, allowed_revisions: Set[str]) -> None:
|
|
7
7
|
self.module_revision = module_revision
|
|
8
8
|
self.allowed_revisions = allowed_revisions
|
|
9
9
|
self.msg = (
|
|
10
|
-
f"Module of revision <{self.module_revision}>
|
|
11
|
-
f"
|
|
10
|
+
f"Module of revision <{self.module_revision}> detected.\n"
|
|
11
|
+
f"This module is not supported by the tester object in the current tdl-xoa-driver.\n"
|
|
12
|
+
f"Supported module revisions are: {allowed_revisions}"
|
|
12
13
|
)
|
|
13
14
|
super().__init__(self.msg)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
from xoa_driver import ports
|
|
3
|
+
from xoa_driver.internals.hli import revisions
|
|
4
|
+
from xoa_driver.internals.utils.managers import ports_manager as pm
|
|
5
|
+
|
|
6
|
+
if typing.TYPE_CHECKING:
|
|
7
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
8
|
+
from .. import __interfaces as m_itf
|
|
9
|
+
|
|
10
|
+
from .module_l23_base import ModuleL23
|
|
11
|
+
from xoa_driver.internals.commands import (
|
|
12
|
+
M_CLOCKPPBSWEEP,
|
|
13
|
+
M_CLOCKSWEEPSTATUS,
|
|
14
|
+
M_HEALTH,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class MClockSweep:
|
|
19
|
+
"""Test module local clock sweep"""
|
|
20
|
+
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
21
|
+
self.config = M_CLOCKPPBSWEEP(conn, module_id)
|
|
22
|
+
"""Configure and control the module local clock sweep.
|
|
23
|
+
Representation of M_CLOCKPPBSWEEP
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
self.status = M_CLOCKSWEEPSTATUS(conn, module_id)
|
|
27
|
+
"""Status of the module local clock sweep.
|
|
28
|
+
Representation of M_CLOCKSWEEPSTATUS
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
class MHealth:
|
|
32
|
+
"""Test module health"""
|
|
33
|
+
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
34
|
+
self.all = M_HEALTH(conn, module_id, [])
|
|
35
|
+
"""All module health information"""
|
|
36
|
+
self.info = M_HEALTH(conn, module_id, [0])
|
|
37
|
+
"""Module identification information"""
|
|
38
|
+
self.cage_insertion = M_HEALTH(conn, module_id, [1])
|
|
39
|
+
"""Module cage insertion counter"""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ModuleFamilyEdun(ModuleL23):
|
|
43
|
+
"""Test module Edun family"""
|
|
44
|
+
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
45
|
+
super().__init__(conn, init_data)
|
|
46
|
+
|
|
47
|
+
self.clock_sweep = MClockSweep(conn, self.module_id)
|
|
48
|
+
"""Clock ppm sweep control"""
|
|
49
|
+
|
|
50
|
+
self.health = MHealth(conn, self.module_id)
|
|
51
|
+
"""Module health information"""
|
|
52
|
+
|
|
53
|
+
# region Edun
|
|
54
|
+
|
|
55
|
+
@typing.final
|
|
56
|
+
@revisions.register_valkyrie_module(rev="Edun-800G-3S-1P-SMPX[a]")
|
|
57
|
+
class MEdun800G3S1PSMPX_a(ModuleFamilyEdun):
|
|
58
|
+
"""Test module Edun-800G-3S-1P-SMPX[a]"""
|
|
59
|
+
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
60
|
+
super().__init__(conn, init_data)
|
|
61
|
+
self.ports: pm.PortsManager[ports.PEdun800G3S1PSMPX_a] = pm.PortsManager(
|
|
62
|
+
conn=conn,
|
|
63
|
+
ports_type=ports.PEdun800G3S1PSMPX_a,
|
|
64
|
+
module_id=self.module_id,
|
|
65
|
+
ports_count=self.ports_count
|
|
66
|
+
)
|
|
67
|
+
"""Port Index Manager of Edun-800G-3S-1P-SMPX[a]"""
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@typing.final
|
|
71
|
+
@revisions.register_valkyrie_module(rev="Edun-1600G-4S-1P-OSFP[a]")
|
|
72
|
+
class MEdun1600G4S1POSFP_a(ModuleFamilyEdun):
|
|
73
|
+
"""Test module Edun-1600G-4S-1P-OSFP[a]"""
|
|
74
|
+
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
75
|
+
super().__init__(conn, init_data)
|
|
76
|
+
self.ports: pm.PortsManager[ports.PEdun1600G4S1POSFP_a] = pm.PortsManager(
|
|
77
|
+
conn=conn,
|
|
78
|
+
ports_type=ports.PEdun1600G4S1POSFP_a,
|
|
79
|
+
module_id=self.module_id,
|
|
80
|
+
ports_count=self.ports_count
|
|
81
|
+
)
|
|
82
|
+
"""Port Index Manager of Edun-1600G-4S-1P-OSFP[a]"""
|
|
@@ -86,7 +86,7 @@ class MLoki100G3S1PB_b(ModuleL23):
|
|
|
86
86
|
|
|
87
87
|
@typing.final
|
|
88
88
|
@revisions.register_valkyrie_module(rev="Loki-100G-5S-4P[a]")
|
|
89
|
-
class
|
|
89
|
+
class MLoki100G5S4P_a(ModuleL23):
|
|
90
90
|
"""Test module Loki-100G-5S-4P[a]"""
|
|
91
91
|
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
92
92
|
super().__init__(conn, init_data)
|
|
@@ -797,4 +797,23 @@ class MFreya800G4S1POSFP_f_g2(ModuleFamilyL1):
|
|
|
797
797
|
|
|
798
798
|
|
|
799
799
|
|
|
800
|
+
#endregion
|
|
801
|
+
|
|
802
|
+
#region Freya 4S 2P
|
|
803
|
+
|
|
804
|
+
@typing.final
|
|
805
|
+
@revisions.register_valkyrie_module(rev="Freya-800G-4S-2P[a]")
|
|
806
|
+
class MFreya800G4S2P_a(ModuleFamilyL1):
|
|
807
|
+
"""Test module Freya-800G-4S-2P[a]"""
|
|
808
|
+
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
809
|
+
super().__init__(conn, init_data)
|
|
810
|
+
self.ports: pm.PortsManager[ports.PFreya800G4S2P_a] = pm.PortsManager(
|
|
811
|
+
conn=conn,
|
|
812
|
+
ports_type=ports.PFreya800G4S2P_a,
|
|
813
|
+
module_id=self.module_id,
|
|
814
|
+
ports_count=self.ports_count
|
|
815
|
+
)
|
|
816
|
+
"""Port Index Manager of Freya-800G-4S-2P[a]"""
|
|
817
|
+
|
|
818
|
+
|
|
800
819
|
#endregion
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
import functools
|
|
3
|
+
from typing import TYPE_CHECKING, Tuple
|
|
4
|
+
from typing import Self
|
|
5
|
+
from xoa_driver.internals.commands import (
|
|
6
|
+
P_DYNAMIC,
|
|
7
|
+
)
|
|
8
|
+
from xoa_driver import enums
|
|
9
|
+
from xoa_driver.internals.utils import attributes as utils
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
12
|
+
|
|
13
|
+
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
14
|
+
from .pcs_pma_ijkl_chimera import PcsPma as PcsPma1
|
|
15
|
+
from .pcs_pma_ghijkl import (
|
|
16
|
+
PcsPma as PcsPma2,
|
|
17
|
+
SerDes,
|
|
18
|
+
)
|
|
19
|
+
from .pcs_pma_l import PcsPma as PcsPma3
|
|
20
|
+
from .freya_l1 import Layer1
|
|
21
|
+
|
|
22
|
+
class PcsPma(PcsPma1, PcsPma2, PcsPma3):
|
|
23
|
+
"""Edun PCS/PMA
|
|
24
|
+
"""
|
|
25
|
+
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
26
|
+
PcsPma1.__init__(self, conn, port)
|
|
27
|
+
PcsPma2.__init__(self, conn, port)
|
|
28
|
+
PcsPma3.__init__(self, conn, port)
|
|
29
|
+
|
|
30
|
+
class L1(Layer1):
|
|
31
|
+
"""Edun L1
|
|
32
|
+
"""
|
|
33
|
+
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
34
|
+
Layer1.__init__(self, conn, port)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class FamilyEdun(BasePortL23Genuine):
|
|
38
|
+
pcs_pma: PcsPma
|
|
39
|
+
"""PCS/PMA layer
|
|
40
|
+
|
|
41
|
+
:type: PcsPma
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
serdes: Tuple[SerDes, ...]
|
|
45
|
+
"""SerDes index
|
|
46
|
+
|
|
47
|
+
:type: Tuple[SerDes, ...]
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
|
+
super().__init__(conn, module_id, port_id)
|
|
52
|
+
self.dynamic = P_DYNAMIC(conn, module_id, port_id)
|
|
53
|
+
"""L23 port's dynamic traffic change.
|
|
54
|
+
|
|
55
|
+
:type: P_DYNAMIC
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# self.fault = Fault(conn, module_id, port_id)
|
|
59
|
+
|
|
60
|
+
async def _setup(self) -> Self:
|
|
61
|
+
await super()._setup()
|
|
62
|
+
self.pcs_pma = PcsPma(self._conn, self)
|
|
63
|
+
self.serdes = tuple(
|
|
64
|
+
SerDes(self._conn, *self.kind, serdes_xindex=serdes_xindex)
|
|
65
|
+
for serdes_xindex in range(self.info.capabilities.serdes_count)
|
|
66
|
+
)
|
|
67
|
+
self.l1 = L1(self._conn, self)
|
|
68
|
+
return self
|
|
69
|
+
|
|
70
|
+
on_dynamic_change = functools.partialmethod(utils.on_event, P_DYNAMIC)
|
|
71
|
+
"""Register a callback to the event that the port's dynamic traffic setting changes."""
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class PEdun800G3S1PSMPX_a(FamilyEdun):
|
|
75
|
+
"""L23 port on Edun-800G-3S-1P-SMPX[a] module.
|
|
76
|
+
"""
|
|
77
|
+
...
|
|
78
|
+
|
|
79
|
+
class PEdun1600G4S1POSFP_a(FamilyEdun):
|
|
80
|
+
"""L23 port on Edun-1600G-4S-1P-OSFP[a] module.
|
|
81
|
+
"""
|
|
82
|
+
...
|
|
@@ -130,6 +130,12 @@ class PFreya800G4S1P_f(FamilyFreya):
|
|
|
130
130
|
...
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
class PFreya800G4S2P_a(FamilyFreya):
|
|
134
|
+
"""L23 port on Freya-800G-4S-2P[a] module.
|
|
135
|
+
"""
|
|
136
|
+
...
|
|
137
|
+
|
|
138
|
+
|
|
133
139
|
class PFreya800G4S1POSFP_a(FamilyFreya):
|
|
134
140
|
"""L23 port on Freya-800G-4S-1P-OSFP[a] module.
|
|
135
141
|
"""
|
|
@@ -23,26 +23,46 @@ class ModuleLocalState:
|
|
|
23
23
|
"reservation",
|
|
24
24
|
"reserved_by",
|
|
25
25
|
"model",
|
|
26
|
+
"model_name",
|
|
27
|
+
"serial_number",
|
|
28
|
+
"version_string",
|
|
29
|
+
"revision",
|
|
26
30
|
)
|
|
27
31
|
|
|
28
32
|
def __init__(self) -> None:
|
|
29
33
|
self.reservation: enums.ReservedStatus = enums.ReservedStatus.RELEASED
|
|
30
34
|
self.reserved_by: str = ""
|
|
31
35
|
self.model: str = ""
|
|
36
|
+
self.model_name: str = ""
|
|
37
|
+
self.serial_number: str = ""
|
|
38
|
+
self.version_string: str = ""
|
|
39
|
+
self.revision: str = ""
|
|
32
40
|
|
|
33
41
|
async def initiate(self, module) -> None:
|
|
34
42
|
(
|
|
35
43
|
reservation_r,
|
|
36
44
|
reserved_by_r,
|
|
37
45
|
model_r,
|
|
46
|
+
model_name_r,
|
|
47
|
+
serial_number_r,
|
|
48
|
+
version_string_r,
|
|
49
|
+
revision_r,
|
|
38
50
|
) = await funcs.apply(
|
|
39
51
|
module.reservation.get(),
|
|
40
52
|
module.reserved_by.get(),
|
|
41
53
|
module.model.get(),
|
|
54
|
+
module.model_name.get(),
|
|
55
|
+
module.serial_number.get(),
|
|
56
|
+
module.version_str.get(),
|
|
57
|
+
module.revision.get(),
|
|
42
58
|
)
|
|
43
59
|
self.reservation = enums.ReservedStatus(reservation_r.operation)
|
|
44
60
|
self.reserved_by = reserved_by_r.username
|
|
45
61
|
self.model = model_r.model
|
|
62
|
+
self.model_name = enums.ModuleModelName(model_name_r.name).name
|
|
63
|
+
self.serial_number = serial_number_r.serial_number
|
|
64
|
+
self.version_string = version_string_r.version_str
|
|
65
|
+
self.revision = revision_r.revision
|
|
46
66
|
|
|
47
67
|
def register_subscriptions(self, module) -> None:
|
|
48
68
|
module._conn.subscribe(M_RESERVEDBY, utils.Update(self, "reserved_by", "username", module._check_identity))
|