tdl-xoa-driver 1.0.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.0.0.dist-info/LICENSE +202 -0
- tdl_xoa_driver-1.0.0.dist-info/METADATA +177 -0
- tdl_xoa_driver-1.0.0.dist-info/RECORD +325 -0
- tdl_xoa_driver-1.0.0.dist-info/WHEEL +5 -0
- tdl_xoa_driver-1.0.0.dist-info/top_level.txt +1 -0
- xoa_driver/__init__.py +2 -0
- xoa_driver/enums.py +399 -0
- xoa_driver/exceptions.py +77 -0
- xoa_driver/functions/__init__.py +0 -0
- xoa_driver/functions/anlt.py +744 -0
- xoa_driver/functions/anlt_ll_debug.py +429 -0
- xoa_driver/functions/cli.py +581 -0
- xoa_driver/functions/exceptions.py +72 -0
- xoa_driver/functions/headers.py +608 -0
- xoa_driver/functions/mgmt.py +515 -0
- xoa_driver/functions/tools.py +256 -0
- xoa_driver/hlfuncs.py +18 -0
- xoa_driver/internals/__init__.py +0 -0
- xoa_driver/internals/commands/__init__.py +31 -0
- xoa_driver/internals/commands/c_commands.py +2041 -0
- xoa_driver/internals/commands/enums.py +3289 -0
- xoa_driver/internals/commands/m4_commands.py +700 -0
- xoa_driver/internals/commands/m4e_commands.py +107 -0
- xoa_driver/internals/commands/m_commands.py +1875 -0
- xoa_driver/internals/commands/p4_commands.py +2221 -0
- xoa_driver/internals/commands/p4e_commands.py +160 -0
- xoa_driver/internals/commands/p4g_commands.py +7253 -0
- xoa_driver/internals/commands/p_commands.py +6000 -0
- xoa_driver/internals/commands/pc_commands.py +335 -0
- xoa_driver/internals/commands/pd_commands.py +355 -0
- xoa_driver/internals/commands/pe_commands.py +1018 -0
- xoa_driver/internals/commands/pec_commands.py +265 -0
- xoa_driver/internals/commands/ped_commands.py +1034 -0
- xoa_driver/internals/commands/pef_commands.py +2216 -0
- xoa_driver/internals/commands/pf_commands.py +379 -0
- xoa_driver/internals/commands/pl1_commands.py +1588 -0
- xoa_driver/internals/commands/pl_commands.py +178 -0
- xoa_driver/internals/commands/pm_commands.py +256 -0
- xoa_driver/internals/commands/pp_commands.py +2341 -0
- xoa_driver/internals/commands/pr_commands.py +812 -0
- xoa_driver/internals/commands/ps_commands.py +2311 -0
- xoa_driver/internals/commands/pt_commands.py +370 -0
- xoa_driver/internals/commands/px_commands.py +303 -0
- xoa_driver/internals/commands/subtypes.py +86 -0
- xoa_driver/internals/core/__init__.py +0 -0
- xoa_driver/internals/core/builders.py +39 -0
- xoa_driver/internals/core/exceptions.py +69 -0
- xoa_driver/internals/core/funcs.py +81 -0
- xoa_driver/internals/core/funcs.pyi +1072 -0
- xoa_driver/internals/core/interfaces.py +47 -0
- xoa_driver/internals/core/token.py +44 -0
- xoa_driver/internals/core/transporter/__init__.py +0 -0
- xoa_driver/internals/core/transporter/_processor.py +83 -0
- xoa_driver/internals/core/transporter/_publisher.py +101 -0
- xoa_driver/internals/core/transporter/_request_id_counter.py +28 -0
- xoa_driver/internals/core/transporter/_stream.py +99 -0
- xoa_driver/internals/core/transporter/_typings.py +43 -0
- xoa_driver/internals/core/transporter/exceptions.py +44 -0
- xoa_driver/internals/core/transporter/handler.py +127 -0
- xoa_driver/internals/core/transporter/logger/__init__.py +10 -0
- xoa_driver/internals/core/transporter/logger/__logger.py +94 -0
- xoa_driver/internals/core/transporter/logger/__state_off.py +32 -0
- xoa_driver/internals/core/transporter/logger/__state_on_default.py +70 -0
- xoa_driver/internals/core/transporter/logger/__state_on_loguru.py +51 -0
- xoa_driver/internals/core/transporter/logger/__state_on_user.py +48 -0
- xoa_driver/internals/core/transporter/protocol/__init__.py +0 -0
- xoa_driver/internals/core/transporter/protocol/_constants.py +77 -0
- xoa_driver/internals/core/transporter/protocol/_utils.py +59 -0
- xoa_driver/internals/core/transporter/protocol/exceptions.py +271 -0
- xoa_driver/internals/core/transporter/protocol/payload/__init__.py +70 -0
- xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +283 -0
- xoa_driver/internals/core/transporter/protocol/payload/descriptor.py +119 -0
- xoa_driver/internals/core/transporter/protocol/payload/exceptions.py +20 -0
- xoa_driver/internals/core/transporter/protocol/payload/field.py +296 -0
- xoa_driver/internals/core/transporter/protocol/payload/types.py +173 -0
- xoa_driver/internals/core/transporter/protocol/payload/utils.py +53 -0
- xoa_driver/internals/core/transporter/protocol/struct_header.py +123 -0
- xoa_driver/internals/core/transporter/protocol/struct_request.py +65 -0
- xoa_driver/internals/core/transporter/protocol/struct_response.py +89 -0
- xoa_driver/internals/core/transporter/registry.py +43 -0
- xoa_driver/internals/exceptions/__init__.py +9 -0
- xoa_driver/internals/exceptions/modules.py +13 -0
- xoa_driver/internals/exceptions/testers.py +21 -0
- xoa_driver/internals/hli_v1/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/base_index.py +39 -0
- xoa_driver/internals/hli_v1/indices/connection_group/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/connection_group/cg.py +186 -0
- xoa_driver/internals/hli_v1/indices/connection_group/histogram.py +78 -0
- xoa_driver/internals/hli_v1/indices/connection_group/l2.py +94 -0
- xoa_driver/internals/hli_v1/indices/connection_group/l3.py +130 -0
- xoa_driver/internals/hli_v1/indices/connection_group/raw.py +200 -0
- xoa_driver/internals/hli_v1/indices/connection_group/replay.py +109 -0
- xoa_driver/internals/hli_v1/indices/connection_group/tcp.py +314 -0
- xoa_driver/internals/hli_v1/indices/connection_group/tls.py +198 -0
- xoa_driver/internals/hli_v1/indices/connection_group/udp.py +133 -0
- xoa_driver/internals/hli_v1/indices/connection_group/user_state.py +28 -0
- xoa_driver/internals/hli_v1/indices/filter/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/filter/base_filter.py +65 -0
- xoa_driver/internals/hli_v1/indices/filter/genuine_filter.py +20 -0
- xoa_driver/internals/hli_v1/indices/length_term.py +49 -0
- xoa_driver/internals/hli_v1/indices/macsecscs/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/macsecscs/base_macsecsc.py +224 -0
- xoa_driver/internals/hli_v1/indices/macsecscs/genuine_macsecsc.py +72 -0
- xoa_driver/internals/hli_v1/indices/match_term.py +64 -0
- xoa_driver/internals/hli_v1/indices/port_dataset.py +72 -0
- xoa_driver/internals/hli_v1/indices/streams/__init__.py +0 -0
- xoa_driver/internals/hli_v1/indices/streams/base_stream.py +405 -0
- xoa_driver/internals/hli_v1/indices/streams/genuine_stream.py +64 -0
- xoa_driver/internals/hli_v1/modules/__init__.py +0 -0
- xoa_driver/internals/hli_v1/modules/__interfaces.py +21 -0
- xoa_driver/internals/hli_v1/modules/base_module.py +138 -0
- xoa_driver/internals/hli_v1/modules/module_chimera.py +366 -0
- xoa_driver/internals/hli_v1/modules/module_l23ve.py +73 -0
- xoa_driver/internals/hli_v1/modules/module_l47.py +397 -0
- xoa_driver/internals/hli_v1/modules/module_l47ve.py +9 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_combi.py +83 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_d.py +75 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_e.py +85 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_f.py +145 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_g.py +84 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_h.py +40 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_i.py +25 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_j.py +25 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_k.py +39 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_l.py +55 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py +800 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_m.py +25 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/family_n.py +40 -0
- xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +383 -0
- xoa_driver/internals/hli_v1/ports/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/base_port.py +125 -0
- xoa_driver/internals/hli_v1/ports/port_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_capture.py +70 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +527 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23_genuine.py +229 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_reception_statistics.py +231 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +117 -0
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transmission_statistics.py +131 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/general.py +396 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/shadow.py +104 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/working.py +36 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_custom_distribution.py +125 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_distribution.py +174 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_chimera.py +119 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_emulation.py +244 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/reception_statistics.py +24 -0
- xoa_driver/internals/hli_v1/ports/port_l23/chimera/transmission_statistics.py +24 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_combi.py +37 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_d.py +51 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_e.py +107 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_f.py +151 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +77 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_h.py +67 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_i.py +84 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_j.py +68 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_k.py +73 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_l.py +82 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py +166 -0
- xoa_driver/internals/hli_v1/ports/port_l23/family_m.py +29 -0
- xoa_driver/internals/hli_v1/ports/port_l23/fault_jkl.py +24 -0
- xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +722 -0
- xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ghijkl.py +369 -0
- xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ijkl_chimera.py +60 -0
- xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_l.py +78 -0
- xoa_driver/internals/hli_v1/ports/port_l23/port_l23ve.py +101 -0
- xoa_driver/internals/hli_v1/ports/port_l47/__init__.py +0 -0
- xoa_driver/internals/hli_v1/ports/port_l47/counters.py +174 -0
- xoa_driver/internals/hli_v1/ports/port_l47/main.py +228 -0
- xoa_driver/internals/hli_v1/ports/port_l47/packet_engine.py +31 -0
- xoa_driver/internals/hli_v1/revisions.py +11 -0
- xoa_driver/internals/hli_v1/testers/__init__.py +0 -0
- xoa_driver/internals/hli_v1/testers/_base_tester.py +259 -0
- xoa_driver/internals/hli_v1/testers/genuine/__init__.py +0 -0
- xoa_driver/internals/hli_v1/testers/genuine/l_23/__init__.py +0 -0
- xoa_driver/internals/hli_v1/testers/genuine/l_23/health.py +16 -0
- xoa_driver/internals/hli_v1/testers/genuine/l_23/rest_api.py +38 -0
- xoa_driver/internals/hli_v1/testers/genuine/l_23/time_keeper.py +57 -0
- xoa_driver/internals/hli_v1/testers/genuine/l_23/upload_file.py +29 -0
- xoa_driver/internals/hli_v1/testers/genuine/management_interface.py +42 -0
- xoa_driver/internals/hli_v1/testers/l23_tester.py +196 -0
- xoa_driver/internals/hli_v1/testers/l23ve_tester.py +114 -0
- xoa_driver/internals/hli_v1/testers/l47_tester.py +106 -0
- xoa_driver/internals/hli_v1/testers/l47ve_tester.py +54 -0
- 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 +39 -0
- xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/connection_group/cg.py +115 -0
- xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +59 -0
- xoa_driver/internals/hli_v2/indices/connection_group/l2.py +71 -0
- xoa_driver/internals/hli_v2/indices/connection_group/l3.py +96 -0
- xoa_driver/internals/hli_v2/indices/connection_group/raw.py +148 -0
- xoa_driver/internals/hli_v2/indices/connection_group/replay.py +89 -0
- xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +261 -0
- xoa_driver/internals/hli_v2/indices/connection_group/tls.py +166 -0
- xoa_driver/internals/hli_v2/indices/connection_group/udp.py +112 -0
- xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +25 -0
- xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/filter/base_filter.py +50 -0
- xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +17 -0
- xoa_driver/internals/hli_v2/indices/length_term.py +44 -0
- xoa_driver/internals/hli_v2/indices/match_term.py +49 -0
- xoa_driver/internals/hli_v2/indices/port_dataset.py +53 -0
- xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/streams/base_stream.py +234 -0
- xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +32 -0
- xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/__interfaces.py +21 -0
- xoa_driver/internals/hli_v2/modules/base_module.py +125 -0
- xoa_driver/internals/hli_v2/modules/module_chimera.py +358 -0
- xoa_driver/internals/hli_v2/modules/module_l23ve.py +58 -0
- xoa_driver/internals/hli_v2/modules/module_l47.py +230 -0
- xoa_driver/internals/hli_v2/modules/module_l47ve.py +8 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +73 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +75 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +85 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +144 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +84 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +40 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +25 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +25 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +39 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +55 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +797 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +25 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +40 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +339 -0
- xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/base_port.py +105 -0
- 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 +64 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +441 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +172 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +156 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +117 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +59 -0
- 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 +15 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +340 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +99 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +36 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +116 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +102 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +113 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +420 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +22 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +22 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +36 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +49 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +96 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +144 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_g.py +77 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +60 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +66 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +53 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +58 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +67 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +149 -0
- xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +28 -0
- xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +22 -0
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +342 -0
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +50 -0
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +65 -0
- xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +81 -0
- xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l47/counters.py +146 -0
- xoa_driver/internals/hli_v2/ports/port_l47/main.py +137 -0
- xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +20 -0
- xoa_driver/internals/hli_v2/revisions.py +11 -0
- xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/_base_tester.py +207 -0
- 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 +16 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +34 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +50 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +26 -0
- xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +38 -0
- xoa_driver/internals/hli_v2/testers/l23_tester.py +159 -0
- xoa_driver/internals/hli_v2/testers/l23ve_tester.py +98 -0
- xoa_driver/internals/hli_v2/testers/l47_tester.py +95 -0
- xoa_driver/internals/hli_v2/testers/l47ve_tester.py +50 -0
- xoa_driver/internals/state_storage/__init__.py +0 -0
- xoa_driver/internals/state_storage/_speed_detector.py +121 -0
- xoa_driver/internals/state_storage/modules_state.py +128 -0
- xoa_driver/internals/state_storage/ports_state.py +154 -0
- xoa_driver/internals/state_storage/testers_state.py +104 -0
- xoa_driver/internals/utils/__init__.py +0 -0
- xoa_driver/internals/utils/attributes.py +33 -0
- xoa_driver/internals/utils/cap_id.py +63 -0
- xoa_driver/internals/utils/con_traffic_light.py +88 -0
- xoa_driver/internals/utils/indices/__init__.py +0 -0
- xoa_driver/internals/utils/indices/_interfaces.py +26 -0
- xoa_driver/internals/utils/indices/header_modifier_manager.py +56 -0
- xoa_driver/internals/utils/indices/index_manager.py +95 -0
- xoa_driver/internals/utils/indices/observer.py +17 -0
- xoa_driver/internals/utils/kind.py +19 -0
- xoa_driver/internals/utils/managers/__init__.py +0 -0
- xoa_driver/internals/utils/managers/abc.py +44 -0
- xoa_driver/internals/utils/managers/exceptions.py +22 -0
- xoa_driver/internals/utils/managers/modules_manager.py +118 -0
- xoa_driver/internals/utils/managers/ports_manager.py +116 -0
- xoa_driver/internals/utils/rev_tool.py +21 -0
- xoa_driver/internals/utils/session.py +117 -0
- xoa_driver/internals/warn.py +32 -0
- xoa_driver/lli.py +15 -0
- xoa_driver/misc.py +57 -0
- xoa_driver/modules.py +448 -0
- xoa_driver/ports.py +332 -0
- xoa_driver/testers.py +37 -0
- xoa_driver/utils.py +12 -0
- xoa_driver/v2/__init__.py +11 -0
- xoa_driver/v2/misc.py +77 -0
- xoa_driver/v2/modules.py +308 -0
- xoa_driver/v2/ports.py +232 -0
- xoa_driver/v2/testers.py +24 -0
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_HEALTH,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Health:
|
|
8
|
+
"""File uploading functions of the Valkyrie tester."""
|
|
9
|
+
|
|
10
|
+
def __init__(self, conn: "itf.IConnection") -> None:
|
|
11
|
+
self.all = C_HEALTH(conn, [])
|
|
12
|
+
"""All chassis health information"""
|
|
13
|
+
self.info = C_HEALTH(conn, [0])
|
|
14
|
+
"""Chassis identification information"""
|
|
15
|
+
self.uptime = C_HEALTH(conn, [1])
|
|
16
|
+
"""Chassis system uptime"""
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_RESTPORT,
|
|
4
|
+
C_RESTENABLE,
|
|
5
|
+
C_RESTSTATUS,
|
|
6
|
+
C_RESTCONTROL,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RestApiServer:
|
|
11
|
+
"""
|
|
12
|
+
Rest API server for the Valkyrie tester
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, conn: "itf.IConnection") -> None:
|
|
16
|
+
self.port = C_RESTPORT(conn)
|
|
17
|
+
"""TCP port for the REST server.
|
|
18
|
+
|
|
19
|
+
:type: C_RESTPORT
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
self.enable = C_RESTENABLE(conn)
|
|
23
|
+
"""Enable the REST server.
|
|
24
|
+
|
|
25
|
+
:type: C_RESTENABLE
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
self.status = C_RESTSTATUS(conn)
|
|
29
|
+
"""Status of the REST server.
|
|
30
|
+
|
|
31
|
+
:type: C_RESTSTATUS
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
self.control = C_RESTCONTROL(conn)
|
|
35
|
+
"""Control the REST server.
|
|
36
|
+
|
|
37
|
+
:type: C_RESTCONTROL
|
|
38
|
+
"""
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_TKLICFILE,
|
|
4
|
+
C_TKLICSTATE,
|
|
5
|
+
C_TKSTATUS,
|
|
6
|
+
C_TKSTATUSEXT,
|
|
7
|
+
C_TKSVCSTATE,
|
|
8
|
+
C_TKGPSSTATE,
|
|
9
|
+
C_TKCONFIG,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TimeKeeper:
|
|
14
|
+
"""TimeKeeper of Valkyrie."""
|
|
15
|
+
|
|
16
|
+
def __init__(self, conn: "itf.IConnection") -> None:
|
|
17
|
+
self.license_file = C_TKLICFILE(conn)
|
|
18
|
+
"""TimeKeeper license file content.
|
|
19
|
+
|
|
20
|
+
:type: C_TKLICFILE
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
self.license_state = C_TKLICSTATE(conn)
|
|
24
|
+
"""State of TimeKeeper license file content.
|
|
25
|
+
|
|
26
|
+
:type: C_TKLICSTATE
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
self.status = C_TKSTATUS(conn)
|
|
30
|
+
"""Version and status of TimeKeeper.
|
|
31
|
+
|
|
32
|
+
:type: C_TKSTATUS
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
self.status_extended = C_TKSTATUSEXT(conn)
|
|
36
|
+
"""Version and status of TimeKeeper (extended).
|
|
37
|
+
|
|
38
|
+
:type: C_TKSTATUSEXT
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
self.svc_state = C_TKSVCSTATE(conn)
|
|
42
|
+
"""TimeKeeper service state.
|
|
43
|
+
|
|
44
|
+
:type: C_TKSVCSTATE
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
self.gps_state = C_TKGPSSTATE(conn)
|
|
48
|
+
"""TimeKeeper GPS state.
|
|
49
|
+
|
|
50
|
+
:type: C_TKGPSSTATE
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
self.config_file = C_TKCONFIG(conn)
|
|
54
|
+
"""TimeKeeper configuration file content.
|
|
55
|
+
|
|
56
|
+
:type: C_TKCONFIG
|
|
57
|
+
"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_FILESTART,
|
|
4
|
+
C_FILEDATA,
|
|
5
|
+
C_FILEFINISH
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UploadFile:
|
|
10
|
+
"""File uploading functions of the Valkyrie tester."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, conn: "itf.IConnection") -> None:
|
|
13
|
+
self.start = C_FILESTART(conn)
|
|
14
|
+
"""Start uploading file.
|
|
15
|
+
|
|
16
|
+
:type: C_FILESTART
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
self.data = C_FILEDATA(conn)
|
|
20
|
+
"""Uploading a file fragment.
|
|
21
|
+
|
|
22
|
+
:type: C_FILEDATA
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
self.finish = C_FILEFINISH(conn)
|
|
26
|
+
"""Finish uploading file.
|
|
27
|
+
|
|
28
|
+
:type: C_FILEFINISH
|
|
29
|
+
"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_IPADDRESS,
|
|
4
|
+
C_DHCP,
|
|
5
|
+
C_MACADDRESS,
|
|
6
|
+
C_HOSTNAME,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ManagementInterface:
|
|
11
|
+
"""
|
|
12
|
+
Tester management interface address configuration.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, conn: "itf.IConnection") -> None:
|
|
16
|
+
self.ip_address = C_IPADDRESS(conn)
|
|
17
|
+
"""
|
|
18
|
+
Chassis management port IP address configuration.
|
|
19
|
+
|
|
20
|
+
:type: C_IPADDRESS
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
self.dhcp = C_DHCP(conn)
|
|
24
|
+
"""
|
|
25
|
+
Chassis management port IP address configuration with DHCP.
|
|
26
|
+
|
|
27
|
+
:type: C_DHCP
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
self.macaddress = C_MACADDRESS(conn)
|
|
31
|
+
"""
|
|
32
|
+
Chassis management port MAC address.
|
|
33
|
+
|
|
34
|
+
:type: C_MACADDRESS
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
self.hostname = C_HOSTNAME(conn)
|
|
38
|
+
"""
|
|
39
|
+
Chassis hostname.
|
|
40
|
+
|
|
41
|
+
:type: C_HOSTNAME
|
|
42
|
+
"""
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import (
|
|
3
|
+
Union,
|
|
4
|
+
TYPE_CHECKING,
|
|
5
|
+
Type,
|
|
6
|
+
)
|
|
7
|
+
from xoa_driver.internals.commands import (
|
|
8
|
+
C_PORTCOUNTS,
|
|
9
|
+
C_MULTIUSER,
|
|
10
|
+
C_TRAFFIC,
|
|
11
|
+
C_TRAFFICSYNC,
|
|
12
|
+
C_VERSIONNO_MINOR,
|
|
13
|
+
C_BUILDSTRING,
|
|
14
|
+
C_VERSIONSTR,
|
|
15
|
+
)
|
|
16
|
+
from xoa_driver.internals.utils.managers import modules_manager as mm
|
|
17
|
+
from ._base_tester import BaseTester
|
|
18
|
+
from .genuine import management_interface as mi
|
|
19
|
+
from .genuine.l_23 import (
|
|
20
|
+
upload_file,
|
|
21
|
+
time_keeper,
|
|
22
|
+
rest_api,
|
|
23
|
+
health,
|
|
24
|
+
)
|
|
25
|
+
if TYPE_CHECKING:
|
|
26
|
+
from xoa_driver import modules
|
|
27
|
+
|
|
28
|
+
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
29
|
+
from xoa_driver.internals.state_storage import testers_state
|
|
30
|
+
from xoa_driver.internals.hli_v1 import revisions
|
|
31
|
+
from xoa_driver.internals import exceptions
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
TypeL23Manager = mm.ModulesManager[
|
|
35
|
+
Union[
|
|
36
|
+
"modules.GenericL23Module",
|
|
37
|
+
"modules.ModuleChimera",
|
|
38
|
+
]
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def get_module_type(revision: str) -> Type:
|
|
43
|
+
module_type = dict(
|
|
44
|
+
**revisions.VALKYRIE_MODULES,
|
|
45
|
+
**revisions.CHIMERA_MODULES,
|
|
46
|
+
).get(revision)
|
|
47
|
+
if not module_type:
|
|
48
|
+
raise exceptions.WrongModuleError(
|
|
49
|
+
revision,
|
|
50
|
+
set.union(
|
|
51
|
+
set(revisions.VALKYRIE_MODULES.keys()),
|
|
52
|
+
set(revisions.CHIMERA_MODULES.keys()),
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
return module_type
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class L23Tester(BaseTester["testers_state.GenuineTesterLocalState"]):
|
|
59
|
+
"""
|
|
60
|
+
This is a conceptual class of Xena Valkyrie Tester.
|
|
61
|
+
It is essentially an extended :class:`BaseTester`.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param host: tester's address/hostname
|
|
65
|
+
:type host: str
|
|
66
|
+
:param username: username of the user
|
|
67
|
+
:type username: str
|
|
68
|
+
:param password: login password of the tester, defaults to "xena"
|
|
69
|
+
:type password: str, optional
|
|
70
|
+
:param port: the port number for connection establishment, default to 22606
|
|
71
|
+
:type port: int, optional
|
|
72
|
+
:param enable_logging: `True` if debug log output from the tester is needed, and `False` otherwise
|
|
73
|
+
:type enable_logging: bool
|
|
74
|
+
:param custom_logger: `None` allow to specify logger with custom configurations
|
|
75
|
+
:type enable_logging: CustomLogger | None
|
|
76
|
+
:param session_timeout: `130` Session timeout in seconds
|
|
77
|
+
:type session_timeout: int
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
def __init__(self, host: str, username: str, password: str = "xena", port: int = 22606, *, enable_logging: bool = False, custom_logger: CustomLogger | None = None, session_timeout: int = 130) -> None:
|
|
81
|
+
super().__init__(
|
|
82
|
+
host=host,
|
|
83
|
+
username=username,
|
|
84
|
+
password=password,
|
|
85
|
+
port=port,
|
|
86
|
+
enable_logging=enable_logging,
|
|
87
|
+
custom_logger=custom_logger,
|
|
88
|
+
session_timeout=session_timeout
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
self._local_states = testers_state.GenuineTesterLocalState(host, port)
|
|
92
|
+
|
|
93
|
+
self.management_interface = mi.ManagementInterface(self._conn)
|
|
94
|
+
"""
|
|
95
|
+
The management interface address configuration includes IP address, DHCP settings, MAC address and hostname.
|
|
96
|
+
|
|
97
|
+
:type: ManagementInterface
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
self.upload_file = upload_file.UploadFile(self._conn)
|
|
101
|
+
"""
|
|
102
|
+
File upload functions of the tester.
|
|
103
|
+
|
|
104
|
+
:type: UploadFile
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
self.rest_api_server = rest_api.RestApiServer(self._conn)
|
|
108
|
+
"""
|
|
109
|
+
REST API server of the tester.
|
|
110
|
+
|
|
111
|
+
:type: RestApiServer
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
self.time_keeper = time_keeper.TimeKeeper(self._conn)
|
|
115
|
+
"""
|
|
116
|
+
TimeKeeper of the tester.
|
|
117
|
+
|
|
118
|
+
:type: TimeKeeper
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
self.multiuser = C_MULTIUSER(self._conn)
|
|
122
|
+
"""
|
|
123
|
+
Enable or disable the ability to control one resource from several different TCP
|
|
124
|
+
connections.
|
|
125
|
+
|
|
126
|
+
:type: C_MULTIUSER
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self.traffic = C_TRAFFIC(self._conn)
|
|
130
|
+
"""
|
|
131
|
+
Starts or stops the traffic on a number of ports on the chassis simultaneously.
|
|
132
|
+
The ports are identified by pairs of integers (module port).
|
|
133
|
+
|
|
134
|
+
:type: C_TRAFFIC
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
self.traffic_sync = C_TRAFFICSYNC(self._conn)
|
|
138
|
+
"""
|
|
139
|
+
This can be used to start traffic simultaneously on multiple chassis. The ports are identified by pairs of integers (module port).
|
|
140
|
+
|
|
141
|
+
:type: C_TRAFFICSYNC
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
self.version_no_minor = C_VERSIONNO_MINOR(self._conn)
|
|
145
|
+
"""
|
|
146
|
+
Get the minor version number of the tester firmware.
|
|
147
|
+
|
|
148
|
+
:type: C_VERSIONNO_MINOR
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
self.version_str = C_VERSIONSTR(self._conn)
|
|
152
|
+
"""
|
|
153
|
+
Returns xenaserver version number in the new format.
|
|
154
|
+
|
|
155
|
+
:type: C_VERSIONSTR
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
self.build_string = C_BUILDSTRING(self._conn)
|
|
159
|
+
"""
|
|
160
|
+
Identify the hostname of the PC that builds the xenaserver. It uniquely identifies the build of a xenaserver.
|
|
161
|
+
|
|
162
|
+
:type: C_BUILDSTRING
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
self.health = health.Health(self._conn)
|
|
166
|
+
"""
|
|
167
|
+
Chassis system health information.
|
|
168
|
+
|
|
169
|
+
:type: C_HEALTH
|
|
170
|
+
"""
|
|
171
|
+
|
|
172
|
+
self.modules: TypeL23Manager = mm.ModulesManager(self._conn, get_module_type)
|
|
173
|
+
"""
|
|
174
|
+
Module Index Manager of the L23 tester.
|
|
175
|
+
|
|
176
|
+
:type: ModulesManager
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def info(self) -> testers_state.GenuineTesterLocalState:
|
|
181
|
+
"""Return tester's local state
|
|
182
|
+
|
|
183
|
+
:return: tester's local state
|
|
184
|
+
:rtype: GenuineTesterLocalState
|
|
185
|
+
"""
|
|
186
|
+
return self._local_states
|
|
187
|
+
|
|
188
|
+
async def _setup(self):
|
|
189
|
+
await super()._setup()
|
|
190
|
+
await self._local_states.initiate(self)
|
|
191
|
+
self._local_states.register_subscriptions(self)
|
|
192
|
+
|
|
193
|
+
ft_pc = await C_PORTCOUNTS(self._conn).get()
|
|
194
|
+
port_counts = ft_pc.port_counts
|
|
195
|
+
await self.modules.fill_l23(port_counts)
|
|
196
|
+
return self
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Type
|
|
3
|
+
from xoa_driver.internals.commands import (
|
|
4
|
+
C_PORTCOUNTS,
|
|
5
|
+
C_MULTIUSER,
|
|
6
|
+
C_TRAFFIC,
|
|
7
|
+
C_TRAFFICSYNC,
|
|
8
|
+
C_VERSIONNO_MINOR,
|
|
9
|
+
)
|
|
10
|
+
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
11
|
+
from xoa_driver.internals.utils.managers import modules_manager as mm
|
|
12
|
+
from ._base_tester import BaseTester
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from xoa_driver import modules
|
|
16
|
+
from xoa_driver.internals.state_storage import testers_state
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
TypeL23Manager = mm.ModulesManager["modules.ModuleL23VE"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def get_module_type(_: str) -> Type:
|
|
23
|
+
return modules.ModuleL23VE
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class L23VeTester(BaseTester["testers_state.TesterLocalState"]):
|
|
27
|
+
"""
|
|
28
|
+
This is a conceptual class of Xena ValkyrieVE Tester.
|
|
29
|
+
It is essentially an extended :class:`BaseTester`.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
:param host: tester's address/hostname
|
|
33
|
+
:type host: str
|
|
34
|
+
:param username: username of the user
|
|
35
|
+
:type username: str
|
|
36
|
+
:param password: login password of the tester, defaults to "xena"
|
|
37
|
+
:type password: str, optional
|
|
38
|
+
:param port: the port number for connection establishment, default to 22606
|
|
39
|
+
:type port: int, optional
|
|
40
|
+
:param enable_logging: `True` if debug log output from the tester is needed, and `False` otherwise
|
|
41
|
+
:type enable_logging: bool
|
|
42
|
+
:param custom_logger: `None` allow to specify logger with custom configurations
|
|
43
|
+
:type enable_logging: CustomLogger | None
|
|
44
|
+
:param session_timeout: `130` Session timeout in seconds
|
|
45
|
+
:type session_timeout: int
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(self, host: str, username: str, password: str = "xena", port: int = 22606, *, enable_logging: bool = False, custom_logger: CustomLogger | None = None, session_timeout: int = 130) -> None:
|
|
49
|
+
super().__init__(
|
|
50
|
+
host=host,
|
|
51
|
+
username=username,
|
|
52
|
+
password=password,
|
|
53
|
+
port=port,
|
|
54
|
+
enable_logging=enable_logging,
|
|
55
|
+
custom_logger=custom_logger,
|
|
56
|
+
session_timeout=session_timeout
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
self._local_states = testers_state.TesterLocalState(host, port)
|
|
60
|
+
|
|
61
|
+
self.multiuser = C_MULTIUSER(self._conn)
|
|
62
|
+
"""
|
|
63
|
+
Enable or disable the ability to control one resource from several different TCP connections.
|
|
64
|
+
|
|
65
|
+
:type: C_MULTIUSER
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
self.traffic = C_TRAFFIC(self._conn)
|
|
69
|
+
"""
|
|
70
|
+
Starts or stops the traffic on a number of ports on the chassis simultaneously.
|
|
71
|
+
The ports are identified by pairs of integers (module port).
|
|
72
|
+
|
|
73
|
+
:type: C_TRAFFIC
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
self.traffic_sync = C_TRAFFICSYNC(self._conn)
|
|
77
|
+
"""
|
|
78
|
+
This can be used to start traffic simultaneously on multiple chassis. The ports are identified by pairs of integers (module port).
|
|
79
|
+
|
|
80
|
+
:type: C_TRAFFICSYNC
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
self.version_no_minor = C_VERSIONNO_MINOR(self._conn)
|
|
84
|
+
"""
|
|
85
|
+
Get the minor version number of the tester firmware.
|
|
86
|
+
|
|
87
|
+
:type: C_VERSIONNO_MINOR
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
self.modules: TypeL23Manager = mm.ModulesManager(self._conn, get_module_type)
|
|
91
|
+
"""
|
|
92
|
+
Module Index Manager of the L23 VE tester.
|
|
93
|
+
|
|
94
|
+
:type: ModulesManager
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def info(self) -> testers_state.TesterLocalState:
|
|
99
|
+
"""Return tester's local state
|
|
100
|
+
|
|
101
|
+
:return: tester's local state
|
|
102
|
+
:rtype: GenuineTesterLocalState
|
|
103
|
+
"""
|
|
104
|
+
return self._local_states
|
|
105
|
+
|
|
106
|
+
async def _setup(self):
|
|
107
|
+
await super()._setup()
|
|
108
|
+
await self._local_states.initiate(self)
|
|
109
|
+
self._local_states.register_subscriptions(self)
|
|
110
|
+
|
|
111
|
+
ft_pc = await C_PORTCOUNTS(self._conn).get()
|
|
112
|
+
port_counts = ft_pc.port_counts
|
|
113
|
+
await self.modules.fill_l23(port_counts)
|
|
114
|
+
return self
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import (
|
|
3
|
+
TYPE_CHECKING,
|
|
4
|
+
Type
|
|
5
|
+
)
|
|
6
|
+
from typing_extensions import Self
|
|
7
|
+
from xoa_driver.internals.commands import (
|
|
8
|
+
C_REMOTEPORTCOUNTS,
|
|
9
|
+
C_BUILDSTRING,
|
|
10
|
+
)
|
|
11
|
+
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
12
|
+
from xoa_driver.internals.utils.managers import modules_manager as mm
|
|
13
|
+
from xoa_driver.internals.hli_v1 import revisions
|
|
14
|
+
from xoa_driver.internals import exceptions
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from xoa_driver.internals.hli_v1.modules import module_l47 as ml47
|
|
17
|
+
|
|
18
|
+
from xoa_driver.internals.state_storage import testers_state
|
|
19
|
+
from ._base_tester import BaseTester
|
|
20
|
+
from .genuine import management_interface as mi
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_module_type(revision: str) -> "Type":
|
|
24
|
+
module_type = revisions.VULCAN_MODULES.get(revision)
|
|
25
|
+
if not module_type:
|
|
26
|
+
raise exceptions.WrongModuleError(
|
|
27
|
+
revision,
|
|
28
|
+
set(revisions.VULCAN_MODULES.keys()),
|
|
29
|
+
)
|
|
30
|
+
return module_type
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class L47Tester(BaseTester["testers_state.GenuineTesterLocalState"]):
|
|
34
|
+
"""
|
|
35
|
+
This is a conceptual class of Xena Vulcan Tester.
|
|
36
|
+
It is essentially an extended :class:`BaseTester`.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
:param host: tester's address/hostname
|
|
40
|
+
:type host: str
|
|
41
|
+
:param username: username of the user
|
|
42
|
+
:type username: str
|
|
43
|
+
:param password: login password of the tester, defaults to "xena"
|
|
44
|
+
:type password: str, optional
|
|
45
|
+
:param port: the port number for connection establishment, default to 22606
|
|
46
|
+
:type port: int, optional
|
|
47
|
+
:param enable_logging: `True` if debug log output from the tester is needed, and `False` otherwise
|
|
48
|
+
:type enable_logging: bool
|
|
49
|
+
:param custom_logger: `None` allow to specify logger with custom configurations
|
|
50
|
+
:type enable_logging: CustomLogger | None
|
|
51
|
+
:param session_timeout: `130` Session timeout in seconds
|
|
52
|
+
:type session_timeout: int
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
def __init__(self, host: str, username: str, password: str = "xena", port: int = 22606, *, enable_logging: bool = False, custom_logger: CustomLogger | None = None, session_timeout: int = 130) -> None:
|
|
56
|
+
super().__init__(
|
|
57
|
+
host=host,
|
|
58
|
+
username=username,
|
|
59
|
+
password=password,
|
|
60
|
+
port=port,
|
|
61
|
+
enable_logging=enable_logging,
|
|
62
|
+
custom_logger=custom_logger,
|
|
63
|
+
session_timeout=session_timeout
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
self._local_states = testers_state.GenuineTesterLocalState(host, port)
|
|
67
|
+
|
|
68
|
+
self.build_string = C_BUILDSTRING(self._conn)
|
|
69
|
+
"""
|
|
70
|
+
Identify the hostname of the PC that builds the xenaserver. It uniquely identifies the build of a xenaserver.
|
|
71
|
+
|
|
72
|
+
:type: C_BUILDSTRING
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
self.management_interface = mi.ManagementInterface(self._conn)
|
|
76
|
+
"""
|
|
77
|
+
The management interface address configuration includes IP address, DHCP settings, MAC address and hostname.
|
|
78
|
+
|
|
79
|
+
:type: ManagementInterface
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self.modules: mm.ModulesManager["ml47.ModuleL47"] = mm.ModulesManager(self._conn, get_module_type)
|
|
83
|
+
"""
|
|
84
|
+
Module Index Manager of the tester.
|
|
85
|
+
|
|
86
|
+
:type: ModulesManager
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def info(self) -> testers_state.GenuineTesterLocalState:
|
|
91
|
+
"""Return tester's local state
|
|
92
|
+
|
|
93
|
+
:return: tester's local state
|
|
94
|
+
:rtype: GenuineTesterLocalState
|
|
95
|
+
"""
|
|
96
|
+
return self._local_states
|
|
97
|
+
|
|
98
|
+
async def _setup(self) -> Self:
|
|
99
|
+
await super()._setup()
|
|
100
|
+
await self._local_states.initiate(self)
|
|
101
|
+
self._local_states.register_subscriptions(self)
|
|
102
|
+
|
|
103
|
+
ft_pc = await C_REMOTEPORTCOUNTS(self._conn).get()
|
|
104
|
+
port_counts = ft_pc.port_counts
|
|
105
|
+
await self.modules.fill_l47(port_counts)
|
|
106
|
+
return self
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
C_BUILDSTRING,
|
|
4
|
+
C_VERSIONNO_MINOR
|
|
5
|
+
)
|
|
6
|
+
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
7
|
+
from .l47_tester import L47Tester
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class L47VeTester(L47Tester):
|
|
11
|
+
"""
|
|
12
|
+
This is a conceptual class of Xena VulcanVE Tester.
|
|
13
|
+
It is essentially an extended :class:`BaseTester`.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
:param host: tester's address/hostname
|
|
17
|
+
:type host: str
|
|
18
|
+
:param username: username of the user
|
|
19
|
+
:type username: str
|
|
20
|
+
:param password: login password of the tester, defaults to "xena"
|
|
21
|
+
:type password: str, optional
|
|
22
|
+
:param port: the port number for connection establishment, default to 22606
|
|
23
|
+
:type port: int, optional
|
|
24
|
+
:param enable_logging: `True` if debug log output from the tester is needed, and `False` otherwise
|
|
25
|
+
:type enable_logging: bool
|
|
26
|
+
:param custom_logger: `None` allow to specify logger with custom configurations
|
|
27
|
+
:type enable_logging: CustomLogger | None
|
|
28
|
+
:param session_timeout: `130` Session timeout in seconds
|
|
29
|
+
:type session_timeout: int
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self, host: str, username: str, password: str = "xena", port: int = 22606, *, enable_logging: bool = False, custom_logger: CustomLogger | None = None, session_timeout: int = 130) -> None:
|
|
33
|
+
super().__init__(
|
|
34
|
+
host=host,
|
|
35
|
+
username=username,
|
|
36
|
+
password=password,
|
|
37
|
+
port=port,
|
|
38
|
+
enable_logging=enable_logging,
|
|
39
|
+
custom_logger=custom_logger,
|
|
40
|
+
session_timeout=session_timeout
|
|
41
|
+
)
|
|
42
|
+
self.version_no_minor = C_VERSIONNO_MINOR(self._conn)
|
|
43
|
+
"""
|
|
44
|
+
Get the minor version number of the tester firmware.
|
|
45
|
+
|
|
46
|
+
:type: C_VERSIONNO_MINOR
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
self.build_string = C_BUILDSTRING(self._conn)
|
|
50
|
+
"""
|
|
51
|
+
Identify the hostname of the PC that builds the xenaserver. It uniquely identifies the build of a xenaserver.
|
|
52
|
+
|
|
53
|
+
:type: C_BUILDSTRING
|
|
54
|
+
"""
|
|
File without changes
|
|
File without changes
|