tdl-xoa-driver 1.2.0__py3-none-any.whl → 1.4.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.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/METADATA +5 -5
- tdl_xoa_driver-1.4.0.dist-info/RECORD +218 -0
- {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/WHEEL +1 -1
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +2 -0
- xoa_driver/functions/anlt.py +2 -2
- xoa_driver/functions/exceptions.py +7 -0
- xoa_driver/functions/mgmt.py +62 -25
- xoa_driver/hlfuncs.py +1 -1
- xoa_driver/internals/commands/enums.py +10 -1
- xoa_driver/internals/commands/m_commands.py +35 -3
- xoa_driver/internals/commands/p_commands.py +12 -10
- xoa_driver/internals/commands/pt_commands.py +21 -1
- xoa_driver/internals/commands/px_commands.py +1686 -6
- xoa_driver/internals/core/transporter/_request_id_counter.py +1 -1
- xoa_driver/internals/core/transporter/protocol/payload/__init__.py +3 -1
- xoa_driver/internals/core/transporter/protocol/payload/field.py +41 -0
- xoa_driver/internals/core/transporter/protocol/payload/types.py +19 -0
- xoa_driver/internals/{hli_v1 → hli}/indices/filter/base_filter.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/length_term.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/base_macsecsc.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/indices/match_term.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/port_dataset.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/streams/base_stream.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/module_chimera.py +20 -15
- xoa_driver/internals/{hli_v1 → hli}/modules/module_l47.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_combi.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_d.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_e.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_f.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_g.py +17 -2
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_h.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_i.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_j.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_k.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l1.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_m.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_n.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/module_l23_base.py +18 -12
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23.py +3 -3
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23_genuine.py +4 -4
- xoa_driver/internals/hli/ports/port_l23/bases/port_transceiver.py +247 -0
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_transmission_statistics.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_chimera.py +1 -1
- xoa_driver/internals/{hli_v2 → hli}/ports/port_l23/family_g.py +5 -0
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/port_l23ve.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/main.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/testers/l23_tester.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/testers/l47_tester.py +2 -2
- xoa_driver/internals/state_storage/modules_state.py +1 -1
- xoa_driver/misc.py +12 -17
- xoa_driver/modules.py +18 -22
- xoa_driver/ports.py +20 -20
- xoa_driver/testers.py +4 -8
- tdl_xoa_driver-1.2.0.dist-info/RECORD +0 -325
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +0 -117
- xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +0 -77
- xoa_driver/internals/hli_v2/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/base_index.py +0 -39
- xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/connection_group/cg.py +0 -115
- xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +0 -59
- xoa_driver/internals/hli_v2/indices/connection_group/l2.py +0 -71
- xoa_driver/internals/hli_v2/indices/connection_group/l3.py +0 -96
- xoa_driver/internals/hli_v2/indices/connection_group/raw.py +0 -148
- xoa_driver/internals/hli_v2/indices/connection_group/replay.py +0 -89
- xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +0 -261
- xoa_driver/internals/hli_v2/indices/connection_group/tls.py +0 -166
- xoa_driver/internals/hli_v2/indices/connection_group/udp.py +0 -112
- xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +0 -25
- xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/filter/base_filter.py +0 -50
- xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +0 -17
- xoa_driver/internals/hli_v2/indices/length_term.py +0 -44
- xoa_driver/internals/hli_v2/indices/match_term.py +0 -49
- xoa_driver/internals/hli_v2/indices/port_dataset.py +0 -53
- xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/streams/base_stream.py +0 -234
- xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +0 -32
- xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/__interfaces.py +0 -21
- xoa_driver/internals/hli_v2/modules/base_module.py +0 -125
- xoa_driver/internals/hli_v2/modules/module_chimera.py +0 -358
- xoa_driver/internals/hli_v2/modules/module_l23ve.py +0 -58
- xoa_driver/internals/hli_v2/modules/module_l47.py +0 -230
- xoa_driver/internals/hli_v2/modules/module_l47ve.py +0 -8
- xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +0 -73
- xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +0 -75
- xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +0 -85
- xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +0 -144
- xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +0 -84
- xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +0 -40
- xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +0 -39
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +0 -55
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +0 -797
- xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +0 -40
- xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +0 -339
- xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/base_port.py +0 -105
- xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +0 -64
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +0 -441
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +0 -172
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +0 -156
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +0 -117
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +0 -59
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +0 -15
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +0 -340
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +0 -99
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +0 -36
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +0 -116
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +0 -102
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +0 -113
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +0 -420
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +0 -36
- xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +0 -49
- xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +0 -96
- xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +0 -144
- xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +0 -60
- xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +0 -66
- xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +0 -53
- xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +0 -58
- xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +0 -67
- xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +0 -149
- xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +0 -28
- xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +0 -342
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -50
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +0 -65
- xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +0 -81
- xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l47/counters.py +0 -146
- xoa_driver/internals/hli_v2/ports/port_l47/main.py +0 -137
- xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +0 -20
- xoa_driver/internals/hli_v2/revisions.py +0 -11
- xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/_base_tester.py +0 -207
- xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +0 -16
- xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +0 -34
- xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +0 -50
- xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +0 -26
- xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +0 -38
- xoa_driver/internals/hli_v2/testers/l23_tester.py +0 -159
- xoa_driver/internals/hli_v2/testers/l23ve_tester.py +0 -98
- xoa_driver/internals/hli_v2/testers/l47_tester.py +0 -95
- xoa_driver/internals/hli_v2/testers/l47ve_tester.py +0 -50
- xoa_driver/v2/__init__.py +0 -11
- xoa_driver/v2/misc.py +0 -77
- xoa_driver/v2/modules.py +0 -308
- xoa_driver/v2/ports.py +0 -232
- xoa_driver/v2/testers.py +0 -24
- {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/top_level.txt +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/base_index.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/cg.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/histogram.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l2.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l3.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/raw.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/replay.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tcp.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tls.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/udp.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/user_state.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/filter/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/filter/genuine_filter.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/genuine_macsecsc.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/streams/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/streams/genuine_stream.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/__interfaces.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/base_module.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/module_l23ve.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/module_l47ve.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/base_port.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_capture.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_reception_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/_utils.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/general.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/shadow.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/working.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_custom_distribution.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_distribution.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_emulation.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/reception_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/transmission_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_combi.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_d.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_e.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_f.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_h.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_i.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_j.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_k.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l1.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_m.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/fault_jkl.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/freya_l1.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ghijkl.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_l.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/counters.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/packet_engine.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/revisions.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/_base_tester.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/health.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/rest_api.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/time_keeper.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/upload_file.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/management_interface.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/l23ve_tester.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/l47ve_tester.py +0 -0
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import functools
|
|
3
|
-
import typing
|
|
4
|
-
from typing import Self
|
|
5
|
-
from xoa_driver.internals.commands import (
|
|
6
|
-
M_STATUS,
|
|
7
|
-
M_UPGRADE,
|
|
8
|
-
M_UPGRADEPROGRESS,
|
|
9
|
-
M_CFPTYPE,
|
|
10
|
-
M_COMMENT,
|
|
11
|
-
M_CAPABILITIES,
|
|
12
|
-
M_CLOCKPPB,
|
|
13
|
-
M_TXCLOCKSOURCE_NEW,
|
|
14
|
-
M_TXCLOCKSTATUS_NEW,
|
|
15
|
-
M_EMULBYPASS,
|
|
16
|
-
M_LATENCYMODE,
|
|
17
|
-
M_REVISION,
|
|
18
|
-
M_MEDIA,
|
|
19
|
-
M_MEDIASUPPORT,
|
|
20
|
-
M_TIMESYNC,
|
|
21
|
-
M_CLOCKSYNCSTATUS,
|
|
22
|
-
M_NAME,
|
|
23
|
-
M_CFPCONFIGEXT,
|
|
24
|
-
M_UPGRADEPAR,
|
|
25
|
-
M_VERSIONSTR,
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
from xoa_driver.internals.hli_v2 import revisions
|
|
29
|
-
from xoa_driver.internals.utils.managers import ports_manager as pm
|
|
30
|
-
from xoa_driver.internals.utils import attributes as utils
|
|
31
|
-
from xoa_driver.internals.state_storage import modules_state
|
|
32
|
-
from xoa_driver.v2 import ports
|
|
33
|
-
from xoa_driver.internals.hli_v2.modules.modules_l23.module_l23_base import MediaModule, CfpModule
|
|
34
|
-
from . import base_module as bm
|
|
35
|
-
|
|
36
|
-
if typing.TYPE_CHECKING:
|
|
37
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
38
|
-
from . import __interfaces as m_itf
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class ChTXClock:
|
|
42
|
-
"""
|
|
43
|
-
Advanced timing feature (Chimera).
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
47
|
-
self.source = M_TXCLOCKSOURCE_NEW(conn, module_id)
|
|
48
|
-
"""
|
|
49
|
-
The source that drives the TX clock rate of the ports on the test module.
|
|
50
|
-
Representation of M_TXCLOCKSOURCE_NEW
|
|
51
|
-
"""
|
|
52
|
-
self.status = M_TXCLOCKSTATUS_NEW(conn, module_id)
|
|
53
|
-
"""
|
|
54
|
-
TX clock status of the test module.
|
|
55
|
-
Representation of M_TXCLOCKSTATUS_NEW
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class ChCFP:
|
|
60
|
-
"""
|
|
61
|
-
CFP test module (Chimera).
|
|
62
|
-
"""
|
|
63
|
-
|
|
64
|
-
def __init__(self, conn: "itf.IConnection", module: 'ModuleChimera') -> None:
|
|
65
|
-
self.type = M_CFPTYPE(conn, module.module_id)
|
|
66
|
-
"""
|
|
67
|
-
The transceiver's CFP type currently inserted.
|
|
68
|
-
Representation of M_CFPTYPE
|
|
69
|
-
"""
|
|
70
|
-
self.config = CfpModule(conn, module)
|
|
71
|
-
"""
|
|
72
|
-
The CFP configuration of the test module.
|
|
73
|
-
Representation of CfpModule
|
|
74
|
-
"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class ChUpgrade:
|
|
78
|
-
"""
|
|
79
|
-
Upgrade test module (Chimera).
|
|
80
|
-
"""
|
|
81
|
-
|
|
82
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
83
|
-
self.start = M_UPGRADE(conn, module_id)
|
|
84
|
-
"""
|
|
85
|
-
Start the upgrade progress of the test module.
|
|
86
|
-
Representation of M_UPGRADE
|
|
87
|
-
"""
|
|
88
|
-
self.progress = M_UPGRADEPROGRESS(conn, module_id)
|
|
89
|
-
"""
|
|
90
|
-
Upgrade progress status of the test module.
|
|
91
|
-
Representation of M_UPGRADEPROGRESS
|
|
92
|
-
"""
|
|
93
|
-
self.start_parallel = M_UPGRADEPAR(conn, module_id)
|
|
94
|
-
"""
|
|
95
|
-
Start the parallel upgrade progress of the test module.
|
|
96
|
-
|
|
97
|
-
:type: M_UPGRADEPAR
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
class ChTiming:
|
|
102
|
-
"""Test module timing and clock configuration"""
|
|
103
|
-
|
|
104
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
105
|
-
|
|
106
|
-
self.source = M_TIMESYNC(conn, module_id)
|
|
107
|
-
"""Timing source of the test module.
|
|
108
|
-
|
|
109
|
-
:type: M_TIMESYNC
|
|
110
|
-
"""
|
|
111
|
-
|
|
112
|
-
self.clock_local_adjust = M_CLOCKPPB(conn, module_id)
|
|
113
|
-
"""Time adjustment controlling of the local clock of the test module, which drives the TX rate of the test ports.
|
|
114
|
-
|
|
115
|
-
:type: M_CLOCKPPB
|
|
116
|
-
"""
|
|
117
|
-
|
|
118
|
-
self.clock_sync_status = M_CLOCKSYNCSTATUS(conn, module_id)
|
|
119
|
-
"""Test module's clock sync status.
|
|
120
|
-
|
|
121
|
-
:type: M_CLOCKSYNCSTATUS
|
|
122
|
-
"""
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
class ChAdvancedTiming:
|
|
126
|
-
"""Advanced Timing config and control"""
|
|
127
|
-
|
|
128
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
129
|
-
self.clock = ChTXClock(conn, module_id)
|
|
130
|
-
"""Advanced timing clock config and status
|
|
131
|
-
"""
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class ModuleChimera(bm.BaseModule["modules_state.ModuleLocalState"]):
|
|
135
|
-
"""
|
|
136
|
-
Representation of a Chimera module on physical tester.
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
140
|
-
super().__init__(conn, init_data)
|
|
141
|
-
|
|
142
|
-
self._local_states = modules_state.ModuleLocalState()
|
|
143
|
-
|
|
144
|
-
self.tx_clock = ChTXClock(conn, self.module_id)
|
|
145
|
-
"""
|
|
146
|
-
TX clock config (Chimera).
|
|
147
|
-
|
|
148
|
-
:type: ChTXClock
|
|
149
|
-
"""
|
|
150
|
-
|
|
151
|
-
self.timing = ChTiming(conn, self.module_id)
|
|
152
|
-
"""
|
|
153
|
-
Timing config (Chimera).
|
|
154
|
-
|
|
155
|
-
:type: ChTiming
|
|
156
|
-
"""
|
|
157
|
-
|
|
158
|
-
self.cfp = ChCFP(conn, self)
|
|
159
|
-
"""
|
|
160
|
-
CFP test module (Chimera).
|
|
161
|
-
|
|
162
|
-
:type: ChCFP
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
self.upgrade = ChUpgrade(conn, self.module_id)
|
|
166
|
-
"""
|
|
167
|
-
Upgrade test module (Chimera).
|
|
168
|
-
|
|
169
|
-
:type: ChUpgrade
|
|
170
|
-
"""
|
|
171
|
-
|
|
172
|
-
self.capabilities = M_CAPABILITIES(conn, self.module_id)
|
|
173
|
-
"""
|
|
174
|
-
Test module's capabilities.
|
|
175
|
-
|
|
176
|
-
:type: M_CAPABILITIES
|
|
177
|
-
"""
|
|
178
|
-
|
|
179
|
-
self.comment = M_COMMENT(conn, self.module_id)
|
|
180
|
-
"""
|
|
181
|
-
Test module's description.
|
|
182
|
-
|
|
183
|
-
:type: M_COMMENT
|
|
184
|
-
"""
|
|
185
|
-
|
|
186
|
-
self.status = M_STATUS(conn, self.module_id)
|
|
187
|
-
"""
|
|
188
|
-
Test module's status.
|
|
189
|
-
|
|
190
|
-
:type: M_STATUS
|
|
191
|
-
"""
|
|
192
|
-
|
|
193
|
-
self.clock_ppb = M_CLOCKPPB(conn, self.module_id)
|
|
194
|
-
"""
|
|
195
|
-
Test module's local clock adjustment.
|
|
196
|
-
|
|
197
|
-
:type: M_CLOCKPPB
|
|
198
|
-
"""
|
|
199
|
-
|
|
200
|
-
self.emulator_bypass_mode = M_EMULBYPASS(conn, self.module_id)
|
|
201
|
-
"""
|
|
202
|
-
Bypass mode of the Chimera module.
|
|
203
|
-
|
|
204
|
-
:type: M_EMULBYPASS
|
|
205
|
-
"""
|
|
206
|
-
|
|
207
|
-
self.latency_mode = M_LATENCYMODE(conn, self.module_id)
|
|
208
|
-
"""
|
|
209
|
-
Latency mode of the Chimera module.
|
|
210
|
-
|
|
211
|
-
:type: M_LATENCYMODE
|
|
212
|
-
"""
|
|
213
|
-
|
|
214
|
-
self.revision = M_REVISION(conn, self.module_id)
|
|
215
|
-
"""Test module's model P/N name.
|
|
216
|
-
|
|
217
|
-
:type: M_REVISION
|
|
218
|
-
"""
|
|
219
|
-
|
|
220
|
-
self.version_str = M_VERSIONSTR(conn, self.module_id)
|
|
221
|
-
"""Module version number in the new format
|
|
222
|
-
|
|
223
|
-
:type: M_VERSIONSTR
|
|
224
|
-
"""
|
|
225
|
-
|
|
226
|
-
self.media = MediaModule(conn, self)
|
|
227
|
-
"""Test module's media type.
|
|
228
|
-
|
|
229
|
-
:type: MediaModule
|
|
230
|
-
"""
|
|
231
|
-
|
|
232
|
-
self.available_speeds = M_MEDIASUPPORT(conn, self.module_id)
|
|
233
|
-
"""Test module's available speeds.
|
|
234
|
-
|
|
235
|
-
:type: M_MEDIASUPPORT
|
|
236
|
-
"""
|
|
237
|
-
|
|
238
|
-
self.name = M_NAME(conn, self.module_id)
|
|
239
|
-
"""Test module's name.
|
|
240
|
-
|
|
241
|
-
:type: M_NAME
|
|
242
|
-
"""
|
|
243
|
-
|
|
244
|
-
self.ports: pm.PortsManager["ports.PortChimera"] = pm.PortsManager(
|
|
245
|
-
conn=conn,
|
|
246
|
-
ports_type=ports.PortChimera,
|
|
247
|
-
module_id=self.module_id,
|
|
248
|
-
ports_count=self.ports_count
|
|
249
|
-
)
|
|
250
|
-
"""
|
|
251
|
-
Port index manager of the Chimera module.
|
|
252
|
-
"""
|
|
253
|
-
|
|
254
|
-
@property
|
|
255
|
-
def info(self) -> modules_state.ModuleLocalState:
|
|
256
|
-
return self._local_states
|
|
257
|
-
|
|
258
|
-
async def _setup(self) -> Self:
|
|
259
|
-
await asyncio.gather(
|
|
260
|
-
self._local_states.initiate(self),
|
|
261
|
-
self.ports.fill()
|
|
262
|
-
)
|
|
263
|
-
self._local_states.register_subscriptions(self)
|
|
264
|
-
return self
|
|
265
|
-
|
|
266
|
-
on_cfp_type_change = functools.partialmethod(utils.on_event, M_CFPTYPE)
|
|
267
|
-
"""
|
|
268
|
-
Register a callback function to the event that the module's CFP type changes.
|
|
269
|
-
"""
|
|
270
|
-
|
|
271
|
-
on_cfp_config_change = functools.partialmethod(utils.on_event, M_CFPCONFIGEXT)
|
|
272
|
-
"""
|
|
273
|
-
Register a callback function to the event that the module's CFP configuration changes.
|
|
274
|
-
"""
|
|
275
|
-
|
|
276
|
-
on_status_change = functools.partialmethod(utils.on_event, M_STATUS)
|
|
277
|
-
"""
|
|
278
|
-
Register a callback function to the event that the module's model changes.
|
|
279
|
-
"""
|
|
280
|
-
|
|
281
|
-
on_latency_mode_change = functools.partialmethod(utils.on_event, M_LATENCYMODE)
|
|
282
|
-
"""
|
|
283
|
-
Register a callback function to the event that the module's latency mode changes.
|
|
284
|
-
"""
|
|
285
|
-
|
|
286
|
-
on_media_change = functools.partialmethod(utils.on_event, M_MEDIA)
|
|
287
|
-
"""
|
|
288
|
-
Register a callback to the event that the module's media and available speeds change.
|
|
289
|
-
"""
|
|
290
|
-
|
|
291
|
-
on_media_support_change = functools.partialmethod(utils.on_event, M_MEDIASUPPORT)
|
|
292
|
-
"""
|
|
293
|
-
Register a callback to the event that the module's supported media changes.
|
|
294
|
-
"""
|
|
295
|
-
|
|
296
|
-
on_timing_source_change = functools.partialmethod(utils.on_event, M_TIMESYNC)
|
|
297
|
-
"""
|
|
298
|
-
Register a callback to the event that the module's timesync mode changes.
|
|
299
|
-
"""
|
|
300
|
-
|
|
301
|
-
on_timing_clock_local_adjust_change = functools.partialmethod(utils.on_event, M_CLOCKPPB)
|
|
302
|
-
"""
|
|
303
|
-
Register a callback to the event that the module's clock adjustment ppb changes.
|
|
304
|
-
"""
|
|
305
|
-
|
|
306
|
-
on_adv_timing_clock_tx_status_change = functools.partialmethod(utils.on_event, M_TXCLOCKSTATUS_NEW)
|
|
307
|
-
"""Register a callback to the event that the module's TX clock status changes."""
|
|
308
|
-
|
|
309
|
-
on_adv_timing_clock_tx_source_change = functools.partialmethod(utils.on_event, M_TXCLOCKSOURCE_NEW)
|
|
310
|
-
"""Register a callback to the event that the module's clock that drives the port TX rates changes."""
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
@typing.final
|
|
314
|
-
@revisions.register_chimera_module(rev="Chimera-100G-5S-2P")
|
|
315
|
-
class MChi100G5S2P(ModuleChimera):
|
|
316
|
-
"""Chimera module Chi-100G-5S-2P"""
|
|
317
|
-
|
|
318
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
319
|
-
super().__init__(conn, init_data)
|
|
320
|
-
self.ports: pm.PortsManager[ports.PChi100G5S2P] = pm.PortsManager(
|
|
321
|
-
conn=conn,
|
|
322
|
-
ports_type=ports.PChi100G5S2P,
|
|
323
|
-
module_id=self.module_id,
|
|
324
|
-
ports_count=self.ports_count
|
|
325
|
-
)
|
|
326
|
-
"""Port index manager of Chi-100G-5S-2P"""
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
@typing.final
|
|
330
|
-
@revisions.register_chimera_module(rev="Chimera-100G-5S-2P[b]")
|
|
331
|
-
class MChi100G5S2P_b(ModuleChimera):
|
|
332
|
-
"""Chimera module Chi-100G-5S-2P[b]"""
|
|
333
|
-
|
|
334
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
335
|
-
super().__init__(conn, init_data)
|
|
336
|
-
self.ports: pm.PortsManager[ports.PChi100G5S2P_b] = pm.PortsManager(
|
|
337
|
-
conn=conn,
|
|
338
|
-
ports_type=ports.PChi100G5S2P_b,
|
|
339
|
-
module_id=self.module_id,
|
|
340
|
-
ports_count=self.ports_count
|
|
341
|
-
)
|
|
342
|
-
"""Port index manager of Chi-100G-5S-2P[b]"""
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
@typing.final
|
|
346
|
-
@revisions.register_chimera_module(rev="Chimera-40G-2S-2P")
|
|
347
|
-
class MChi40G2S2P(ModuleChimera):
|
|
348
|
-
"""Chimera module Chi-40G-2S-2P"""
|
|
349
|
-
|
|
350
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
351
|
-
super().__init__(conn, init_data)
|
|
352
|
-
self.ports: pm.PortsManager[ports.PChi40G2S2P] = pm.PortsManager(
|
|
353
|
-
conn=conn,
|
|
354
|
-
ports_type=ports.PChi40G2S2P,
|
|
355
|
-
module_id=self.module_id,
|
|
356
|
-
ports_count=self.ports_count
|
|
357
|
-
)
|
|
358
|
-
"""Port index manager of Chi-40G-2S-2P"""
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import typing
|
|
3
|
-
from typing import Self
|
|
4
|
-
from xoa_driver.internals.commands import (
|
|
5
|
-
M_COMMENT,
|
|
6
|
-
M_CAPABILITIES,
|
|
7
|
-
M_MULTIUSER
|
|
8
|
-
)
|
|
9
|
-
from xoa_driver.v2 import ports
|
|
10
|
-
from xoa_driver.internals.utils.managers import ports_manager as pm
|
|
11
|
-
from xoa_driver.internals.state_storage import modules_state
|
|
12
|
-
from . import base_module as bm
|
|
13
|
-
if typing.TYPE_CHECKING:
|
|
14
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
15
|
-
from . import __interfaces as m_itf
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class ModuleL23VE(bm.BaseModule["modules_state.ModuleLocalState"]):
|
|
19
|
-
"""
|
|
20
|
-
Representation of a L23 test module on virtual tester.
|
|
21
|
-
"""
|
|
22
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
23
|
-
super().__init__(conn, init_data)
|
|
24
|
-
|
|
25
|
-
self._local_states = modules_state.ModuleLocalState()
|
|
26
|
-
|
|
27
|
-
self.comment = M_COMMENT(conn, self.module_id)
|
|
28
|
-
"""Test module's description.
|
|
29
|
-
Representation of M_COMMENT
|
|
30
|
-
"""
|
|
31
|
-
self.capabilities = M_CAPABILITIES(conn, self.module_id)
|
|
32
|
-
"""Test module's capabilities.
|
|
33
|
-
Representation of M_CAPABILITIES
|
|
34
|
-
"""
|
|
35
|
-
self.multiuser = M_MULTIUSER(conn, self.module_id)
|
|
36
|
-
"""If multiple users are allowed to control the same test module.
|
|
37
|
-
Representation of M_MULTIUSER
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
self.ports: pm.PortsManager[ports.PortL23VE] = pm.PortsManager(
|
|
41
|
-
conn=conn,
|
|
42
|
-
ports_type=ports.PortL23VE,
|
|
43
|
-
module_id=self.module_id,
|
|
44
|
-
ports_count=self.ports_count
|
|
45
|
-
)
|
|
46
|
-
"""L23 VE Port index manager of this test module."""
|
|
47
|
-
|
|
48
|
-
@property
|
|
49
|
-
def info(self) -> modules_state.ModuleLocalState:
|
|
50
|
-
return self._local_states
|
|
51
|
-
|
|
52
|
-
async def _setup(self) -> Self:
|
|
53
|
-
await asyncio.gather(
|
|
54
|
-
self._local_states.initiate(self),
|
|
55
|
-
self.ports.fill()
|
|
56
|
-
)
|
|
57
|
-
self._local_states.register_subscriptions(self)
|
|
58
|
-
return self
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import functools
|
|
3
|
-
import typing
|
|
4
|
-
from typing import Self
|
|
5
|
-
from xoa_driver.internals.commands import (
|
|
6
|
-
M_LICENSE_DEMO_INFO,
|
|
7
|
-
M_LICENSE_MAINTENANCE_INFO,
|
|
8
|
-
M_LICENSE_CWB_DETECTED,
|
|
9
|
-
M_LICENSE_UPDATE,
|
|
10
|
-
M_LICENSE_UPDATE_STATUS,
|
|
11
|
-
M_LICENSE_LIST_BSON,
|
|
12
|
-
M_LICENSE_ONLINE,
|
|
13
|
-
# M4_INT, #TODO: need to implement
|
|
14
|
-
# M4_STRING, #TODO: need to implement
|
|
15
|
-
# M4_HEX, #TODO: need to implement
|
|
16
|
-
M4_SYSTEMID,
|
|
17
|
-
M4_VERSIONNO,
|
|
18
|
-
M4_SYSTEM_STATUS,
|
|
19
|
-
M4_COMPATIBLE_CLIENT_VERSION,
|
|
20
|
-
M4_TIME,
|
|
21
|
-
M4_SYSTEM_TIME,
|
|
22
|
-
M4_MEM_INFO,
|
|
23
|
-
M4_CAPTURE_SIZE,
|
|
24
|
-
M4_LICENSE_INFO,
|
|
25
|
-
M4_REPLAY_PARSE_START,
|
|
26
|
-
M4_REPLAY_PARSE_STOP,
|
|
27
|
-
M4_REPLAY_PARSE_STATE,
|
|
28
|
-
M4_REPLAY_PARSER_PARAMS,
|
|
29
|
-
M4_REPLAY_FILE_LIST_BSON,
|
|
30
|
-
M4_REPLAY_FILE_LIST,
|
|
31
|
-
M4_CAPTURE_FILE_LIST_BSON,
|
|
32
|
-
M4_CAPTURE_FILE_LIST,
|
|
33
|
-
# M4_REPLAY_FILE_INFO_BSON, #TODO: need to implement
|
|
34
|
-
M4_REPLAY_FILE_DELETE,
|
|
35
|
-
M4_CAPTURE_FILE_DELETE,
|
|
36
|
-
M4E_MODE,
|
|
37
|
-
M4E_RESERVE,
|
|
38
|
-
M4_TLS_CIPHER_SUITES,
|
|
39
|
-
)
|
|
40
|
-
from xoa_driver.internals.hli_v2 import revisions
|
|
41
|
-
from xoa_driver.internals.utils import attributes as utils
|
|
42
|
-
from xoa_driver.internals.utils.managers import ports_manager as pm
|
|
43
|
-
from xoa_driver.internals.state_storage import modules_state
|
|
44
|
-
from xoa_driver.v2 import ports
|
|
45
|
-
from . import base_module as bm
|
|
46
|
-
if typing.TYPE_CHECKING:
|
|
47
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
48
|
-
from . import __interfaces as m_itf
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class License:
|
|
52
|
-
"""License management for Vulcan"""
|
|
53
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
54
|
-
self.demo_info = M_LICENSE_DEMO_INFO(conn, module_id)
|
|
55
|
-
"""Representation of M_LICENSE_DEMO_INFO
|
|
56
|
-
"""
|
|
57
|
-
self.management_info = M_LICENSE_MAINTENANCE_INFO(conn, module_id)
|
|
58
|
-
"""Representation of M_LICENSE_MAINTENANCE_INFO
|
|
59
|
-
"""
|
|
60
|
-
self.clock_windback = M_LICENSE_CWB_DETECTED(conn, module_id)
|
|
61
|
-
"""Representation of M_LICENSE_CWB_DETECTED
|
|
62
|
-
"""
|
|
63
|
-
self.update = M_LICENSE_UPDATE(conn, module_id)
|
|
64
|
-
"""Representation of M_LICENSE_UPDATE
|
|
65
|
-
"""
|
|
66
|
-
self.update_status = M_LICENSE_UPDATE_STATUS(conn, module_id)
|
|
67
|
-
"""Representation of M_LICENSE_UPDATE_STATUS
|
|
68
|
-
"""
|
|
69
|
-
self.list_bson = M_LICENSE_LIST_BSON(conn, module_id)
|
|
70
|
-
"""Representation of M_LICENSE_LIST_BSON
|
|
71
|
-
"""
|
|
72
|
-
self.online_mode = M_LICENSE_ONLINE(conn, module_id)
|
|
73
|
-
"""Representation of M_LICENSE_ONLINE
|
|
74
|
-
"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class CaptureParse:
|
|
78
|
-
"""Parse a captured pcap file"""
|
|
79
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
80
|
-
self.start = M4_REPLAY_PARSE_START(conn, module_id)
|
|
81
|
-
"""Representation of M4_REPLAY_PARSE_START
|
|
82
|
-
"""
|
|
83
|
-
self.stop = M4_REPLAY_PARSE_STOP(conn, module_id)
|
|
84
|
-
"""Representation of M4_REPLAY_PARSE_STOP
|
|
85
|
-
"""
|
|
86
|
-
self.state = M4_REPLAY_PARSE_STATE(conn, module_id)
|
|
87
|
-
"""Representation of M4_REPLAY_PARSE_STATE
|
|
88
|
-
"""
|
|
89
|
-
self.parser_params = M4_REPLAY_PARSER_PARAMS(conn, module_id)
|
|
90
|
-
"""Representation of M4_REPLAY_PARSER_PARAMS
|
|
91
|
-
"""
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
class ReplayFile:
|
|
95
|
-
"""The pcap files to replay"""
|
|
96
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
97
|
-
self.list_bson = M4_REPLAY_FILE_LIST_BSON(conn, module_id)
|
|
98
|
-
"""Representation of M4_REPLAY_FILE_LIST_BSON
|
|
99
|
-
"""
|
|
100
|
-
self.list = M4_REPLAY_FILE_LIST(conn, module_id)
|
|
101
|
-
"""Representation of M4_REPLAY_FILE_LIST
|
|
102
|
-
"""
|
|
103
|
-
# self.info_bson = M4_REPLAY_FILE_INFO_BSON(conn, module_id) # TODO: need to implement
|
|
104
|
-
self.delete = M4_REPLAY_FILE_DELETE(conn, module_id)
|
|
105
|
-
"""Representation of M4_REPLAY_FILE_DELETE
|
|
106
|
-
"""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
class Replay:
|
|
110
|
-
"""PCAP replay"""
|
|
111
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
112
|
-
self.file = ReplayFile(conn, module_id)
|
|
113
|
-
"""The pcap file to replay."""
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class Capture:
|
|
117
|
-
"""Captured pcap file"""
|
|
118
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
119
|
-
self.size = M4_CAPTURE_SIZE(conn, module_id)
|
|
120
|
-
"""Representation of M4_CAPTURE_SIZE
|
|
121
|
-
"""
|
|
122
|
-
self.file_list_bson = M4_CAPTURE_FILE_LIST_BSON(conn, module_id)
|
|
123
|
-
"""Representation of M4_CAPTURE_FILE_LIST_BSON
|
|
124
|
-
"""
|
|
125
|
-
self.file_list = M4_CAPTURE_FILE_LIST(conn, module_id)
|
|
126
|
-
"""Representation of M4_CAPTURE_FILE_LIST
|
|
127
|
-
"""
|
|
128
|
-
self.file_delete = M4_CAPTURE_FILE_DELETE(conn, module_id)
|
|
129
|
-
"""Representation of M4_CAPTURE_FILE_DELETE
|
|
130
|
-
"""
|
|
131
|
-
self.parse = CaptureParse(conn, module_id)
|
|
132
|
-
"""Parse a captured pcap file."""
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
class PacketEngine:
|
|
136
|
-
"""Packet engine"""
|
|
137
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
138
|
-
self.license_info = M4_LICENSE_INFO(conn, module_id)
|
|
139
|
-
"""Representation of M4_LICENSE_INFO
|
|
140
|
-
"""
|
|
141
|
-
self.reserve = M4E_RESERVE(conn, module_id)
|
|
142
|
-
"""Representation of M4E_RESERVE
|
|
143
|
-
"""
|
|
144
|
-
self.mode = M4E_MODE(conn, module_id)
|
|
145
|
-
"""Representation of M4E_MODE
|
|
146
|
-
"""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
class ModuleSystem:
|
|
150
|
-
"""L47 module info"""
|
|
151
|
-
def __init__(self, conn: "itf.IConnection", module_id: int) -> None:
|
|
152
|
-
self.id = M4_SYSTEMID(conn, module_id)
|
|
153
|
-
"""Representation of M4_SYSTEMID
|
|
154
|
-
"""
|
|
155
|
-
self.status = M4_SYSTEM_STATUS(conn, module_id)
|
|
156
|
-
"""Representation of M4_SYSTEM_STATUS
|
|
157
|
-
"""
|
|
158
|
-
self.time = M4_SYSTEM_TIME(conn, module_id)
|
|
159
|
-
"""Representation of M4_SYSTEM_TIME
|
|
160
|
-
"""
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
@revisions.register_vulcan_module(rev="Xena L47 Module")
|
|
164
|
-
class ModuleL47(bm.BaseModule["modules_state.ModuleLocalState"]):
|
|
165
|
-
"""
|
|
166
|
-
Representation of a L47 test module on a physical tester.
|
|
167
|
-
"""
|
|
168
|
-
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
|
|
169
|
-
super().__init__(conn, init_data)
|
|
170
|
-
|
|
171
|
-
self._local_states = modules_state.ModuleLocalState()
|
|
172
|
-
|
|
173
|
-
self.version_number = M4_VERSIONNO(conn, self.module_id)
|
|
174
|
-
"""Representation of M4_VERSIONNO
|
|
175
|
-
"""
|
|
176
|
-
self.compatible_client_version = M4_COMPATIBLE_CLIENT_VERSION(conn, self.module_id)
|
|
177
|
-
"""Representation of M4_COMPATIBLE_CLIENT_VERSION
|
|
178
|
-
"""
|
|
179
|
-
self.time = M4_TIME(conn, self.module_id)
|
|
180
|
-
"""Representation of M4_TIME
|
|
181
|
-
"""
|
|
182
|
-
self.tls_cipher = M4_TLS_CIPHER_SUITES(conn, self.module_id)
|
|
183
|
-
"""Representation of M4_TLS_CIPHER_SUITES
|
|
184
|
-
"""
|
|
185
|
-
self.memory_info = M4_MEM_INFO(conn, self.module_id) # Not sure if suppose to be here, maybe under ModuleSystem
|
|
186
|
-
"""Representation of M4_MEM_INFO
|
|
187
|
-
"""
|
|
188
|
-
|
|
189
|
-
self.module_system = ModuleSystem(conn, self.module_id)
|
|
190
|
-
"""L47 module info."""
|
|
191
|
-
self.license = License(conn, self.module_id)
|
|
192
|
-
"""L47 license management."""
|
|
193
|
-
self.replay = Replay(conn, self.module_id)
|
|
194
|
-
"""L47 pcap replay."""
|
|
195
|
-
self.capture = Capture(conn, self.module_id)
|
|
196
|
-
"""L47 capture to pcap files."""
|
|
197
|
-
self.packet_engine = PacketEngine(conn, self.module_id)
|
|
198
|
-
"""L47 packet engine."""
|
|
199
|
-
|
|
200
|
-
self.ports: pm.PortsManager[ports.PortL47] = pm.PortsManager(
|
|
201
|
-
conn=conn,
|
|
202
|
-
ports_type=ports.PortL47,
|
|
203
|
-
module_id=self.module_id,
|
|
204
|
-
ports_count=self.ports_count
|
|
205
|
-
)
|
|
206
|
-
"""L47 Port index manager of this test module."""
|
|
207
|
-
|
|
208
|
-
@property
|
|
209
|
-
def info(self) -> modules_state.ModuleLocalState:
|
|
210
|
-
return self._local_states
|
|
211
|
-
|
|
212
|
-
async def _setup(self) -> Self:
|
|
213
|
-
await asyncio.gather(
|
|
214
|
-
self._local_states.initiate(self),
|
|
215
|
-
self.ports.fill()
|
|
216
|
-
)
|
|
217
|
-
self._local_states.register_subscriptions(self)
|
|
218
|
-
return self
|
|
219
|
-
|
|
220
|
-
on_license_demo_info_change = functools.partialmethod(utils.on_event, M_LICENSE_DEMO_INFO)
|
|
221
|
-
"""Register a callback to the event that the module's demo license info changes."""
|
|
222
|
-
|
|
223
|
-
on_license_maintenance_info_change = functools.partialmethod(utils.on_event, M_LICENSE_MAINTENANCE_INFO)
|
|
224
|
-
"""Register a callback to the event that the module's maintenance license info changes."""
|
|
225
|
-
|
|
226
|
-
on_replay_parse_state_change = functools.partialmethod(utils.on_event, M4_REPLAY_PARSE_STATE)
|
|
227
|
-
"""Register a callback to the event that the module's parsing state of a captured pcap file changes."""
|
|
228
|
-
|
|
229
|
-
on_license_info_change = functools.partialmethod(utils.on_event, M4_LICENSE_INFO)
|
|
230
|
-
"""Register a callback to the event that the module's L47 license info changes."""
|
|
File without changes
|