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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
if TYPE_CHECKING:
|
|
3
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
4
|
+
from xoa_driver.internals.commands.enums import ImpairmentTypeIndex
|
|
5
|
+
from xoa_driver.internals.commands import (
|
|
6
|
+
PED_SCHEDULE,
|
|
7
|
+
PED_ONESHOTSTATUS,
|
|
8
|
+
PED_OFF,
|
|
9
|
+
PED_FIXED,
|
|
10
|
+
PED_RANDOM,
|
|
11
|
+
PED_BER,
|
|
12
|
+
PED_FIXEDBURST,
|
|
13
|
+
PED_RANDOMBURST,
|
|
14
|
+
PED_GE,
|
|
15
|
+
PED_UNI,
|
|
16
|
+
PED_GAUSS,
|
|
17
|
+
PED_POISSON,
|
|
18
|
+
PED_GAMMA,
|
|
19
|
+
PED_CUST,
|
|
20
|
+
PED_CONST,
|
|
21
|
+
PED_ACCBURST,
|
|
22
|
+
PED_STEP,
|
|
23
|
+
PED_ENABLE,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ImpairmentDistributionConfig:
|
|
28
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int, impairment_type_index: "ImpairmentTypeIndex") -> None:
|
|
29
|
+
self.enable = PED_ENABLE(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
30
|
+
"""Impairment distribution control.
|
|
31
|
+
|
|
32
|
+
:type: PED_ENABLE
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
self.schedule = PED_SCHEDULE(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
36
|
+
"""Impairment scheduling configuration.
|
|
37
|
+
|
|
38
|
+
:type: PED_SCHEDULE
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
self.one_shot_status = PED_ONESHOTSTATUS(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
42
|
+
"""One-shot status.
|
|
43
|
+
|
|
44
|
+
:type: PED_ONESHOTSTATUS
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
self.off = PED_OFF(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
48
|
+
"""Impairments Distribution to OFF.
|
|
49
|
+
|
|
50
|
+
:type: PED_OFF
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
self.fixed_rate = PED_FIXED(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
54
|
+
"""Fixed Rate distribution configuration.
|
|
55
|
+
|
|
56
|
+
:type: PED_FIXED
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
self.random_rate = PED_RANDOM(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
60
|
+
"""Random Rate distribution configuration.
|
|
61
|
+
|
|
62
|
+
:type: PED_RANDOM
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
self.bit_error_rate = PED_BER(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
66
|
+
"""Bit Error Rate distribution configuration.
|
|
67
|
+
|
|
68
|
+
:type: PED_BER
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
self.random_burst = PED_RANDOMBURST(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
72
|
+
"""Random Burst configuration.
|
|
73
|
+
|
|
74
|
+
:type: PED_RANDOMBURST
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self.ge = PED_GE(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
78
|
+
"""Gilbert-Elliot distribution configuration.
|
|
79
|
+
|
|
80
|
+
:type: PED_GE
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
self.uniform = PED_UNI(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
84
|
+
"""Uniform distribution configuration.
|
|
85
|
+
|
|
86
|
+
:type: PED_UNI
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
self.gaussian = PED_GAUSS(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
90
|
+
"""Gaussian distribution configuration.
|
|
91
|
+
|
|
92
|
+
:type: PED_GAUSS
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
self.poisson = PED_POISSON(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
96
|
+
"""Poisson distribution configuration.
|
|
97
|
+
|
|
98
|
+
:type: PED_POISSON
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
self.gamma = PED_GAMMA(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
102
|
+
"""Gamma distribution configuration.
|
|
103
|
+
|
|
104
|
+
:type: PED_GAMMA
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
self.custom = PED_CUST(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
108
|
+
"""Associate a custom distribution to a flow and impairment type.
|
|
109
|
+
|
|
110
|
+
:type: PED_CUST
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
self.constant_delay = PED_CONST(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
114
|
+
"""Constant Delay distribution configuration.
|
|
115
|
+
|
|
116
|
+
:type: PED_CONST
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
self.accumulate_and_burst = PED_ACCBURST(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
120
|
+
"""Accumulate & Burst distribution configuration.
|
|
121
|
+
|
|
122
|
+
:type: PED_ACCBURST
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
self.step = PED_STEP(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
126
|
+
"""Step distribution configuration.
|
|
127
|
+
|
|
128
|
+
:type: PED_STEP
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
self.fixed_burst = PED_FIXEDBURST(conn, module_id, port_id, flow_index, impairment_type_index)
|
|
132
|
+
"""Fixed Burst distribution configuration.
|
|
133
|
+
|
|
134
|
+
:type: PED_FIXEDBURST
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class ImpairmentTypeDistribution:
|
|
139
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
140
|
+
self.drop_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.DROP)
|
|
141
|
+
"""Impairment distribution configuration of impairment type Drop.
|
|
142
|
+
|
|
143
|
+
:type: ImpairmentDistributionConfig
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
self.misorder_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.MISORDER)
|
|
147
|
+
"""Impairment distribution configuration of impairment type Misorder."""
|
|
148
|
+
|
|
149
|
+
self.latency_jitter_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.LATENCYJITTER)
|
|
150
|
+
"""Impairment distribution configuration of impairment type Delay Jitter."""
|
|
151
|
+
|
|
152
|
+
self.duplication_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.DUPLICATION)
|
|
153
|
+
"""Impairment distribution configuration of impairment type Duplication.
|
|
154
|
+
|
|
155
|
+
:type: ImpairmentDistributionConfig
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
self.corruption_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.CORRUPTION)
|
|
159
|
+
"""Impairment distribution configuration of impairment type Corruption.
|
|
160
|
+
|
|
161
|
+
:type: ImpairmentDistributionConfig
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
self.policer_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.POLICER)
|
|
165
|
+
"""Impairment distribution configuration of impairment type Policer.
|
|
166
|
+
|
|
167
|
+
:type: ImpairmentDistributionConfig
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
self.shaper_type_config = ImpairmentDistributionConfig(conn, module_id, port_id, flow_index, ImpairmentTypeIndex.SHAPER)
|
|
171
|
+
"""Impairment distribution configuration of impairment type Shaper.
|
|
172
|
+
|
|
173
|
+
:type: ImpairmentDistributionConfig
|
|
174
|
+
"""
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import functools
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from xoa_driver.internals.commands import (
|
|
6
|
+
P_CAPABILITIES,
|
|
7
|
+
P_INTERFACE,
|
|
8
|
+
P_STATUS,
|
|
9
|
+
P_TXENABLE,
|
|
10
|
+
P_LOADMODE,
|
|
11
|
+
P_EMULATE,
|
|
12
|
+
P_CAPABILITIES_EXT,
|
|
13
|
+
)
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
16
|
+
|
|
17
|
+
from xoa_driver.internals.hli_v1.ports import base_port
|
|
18
|
+
from xoa_driver.internals.utils import attributes as utils
|
|
19
|
+
from xoa_driver.internals.state_storage import ports_state
|
|
20
|
+
from ..pcs_pma_ijkl_chimera import PcsPma
|
|
21
|
+
from .pe_custom_distribution import CustomDistributions
|
|
22
|
+
from .port_emulation import ChimeraPE
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PortChimera(base_port.BasePort[ports_state.PortChimeraLocalState]):
|
|
26
|
+
"""Chimera port for traffic impairment."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
29
|
+
super().__init__(conn, module_id, port_id)
|
|
30
|
+
self.capabilities = P_CAPABILITIES(conn, module_id, port_id)
|
|
31
|
+
"""Chimera port capabilities.
|
|
32
|
+
|
|
33
|
+
:type: P_CAPABILITIES
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
self.capabilities_ext = P_CAPABILITIES_EXT(conn, module_id, port_id)
|
|
37
|
+
"""Chimera port capabilities ext.
|
|
38
|
+
|
|
39
|
+
:type: P_CAPABILITIES_EXT
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
self.interface = P_INTERFACE(conn, module_id, port_id)
|
|
43
|
+
"""Physical interface type of the Chimera port.
|
|
44
|
+
|
|
45
|
+
:type: P_INTERFACE
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
self.status = P_STATUS(conn, module_id, port_id)
|
|
49
|
+
"""Chimera port's received optical signal level'.
|
|
50
|
+
|
|
51
|
+
:type: P_STATUS
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
self.tx_enable = P_TXENABLE(conn, module_id, port_id)
|
|
55
|
+
"""Enabling Chimera port TX.
|
|
56
|
+
|
|
57
|
+
:type: P_TXENABLE
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
self.load_mode = P_LOADMODE(conn, module_id, port_id)
|
|
61
|
+
"""Load mode of the Chimera port.
|
|
62
|
+
|
|
63
|
+
:type: P_LOADMODE
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
self.emulation = ChimeraPE(self._conn, *self.kind)
|
|
67
|
+
"""Chimera Port Emulation """
|
|
68
|
+
|
|
69
|
+
self.emulate = P_EMULATE(conn, module_id, port_id)
|
|
70
|
+
"""Chimera port emulation control.
|
|
71
|
+
|
|
72
|
+
:type: P_EMULATE
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
self.custom_distributions = CustomDistributions(conn, module_id, port_id)
|
|
76
|
+
"""Custom distributions."""
|
|
77
|
+
|
|
78
|
+
self.pcs_pma = PcsPma(conn, self)
|
|
79
|
+
""""PCS/PMA settings."""
|
|
80
|
+
|
|
81
|
+
self._local_states = ports_state.PortChimeraLocalState()
|
|
82
|
+
"""Local states of the Chimera port."""
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def info(self) -> ports_state.PortChimeraLocalState:
|
|
86
|
+
return self._local_states
|
|
87
|
+
|
|
88
|
+
async def _setup(self):
|
|
89
|
+
await asyncio.gather(
|
|
90
|
+
self._local_states.initiate(self),
|
|
91
|
+
self.custom_distributions.server_sync(),
|
|
92
|
+
self.emulation
|
|
93
|
+
)
|
|
94
|
+
self._local_states.register_subscriptions(self)
|
|
95
|
+
return self
|
|
96
|
+
|
|
97
|
+
on_interface_change = functools.partialmethod(utils.on_event, P_INTERFACE)
|
|
98
|
+
"""Register a callback to the event that the port's interface type changes."""
|
|
99
|
+
|
|
100
|
+
on_emulate_change = functools.partialmethod(utils.on_event, P_EMULATE)
|
|
101
|
+
"""Register a callback to the event that the port's emulation state changes."""
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class PChi100G5S2P(PortChimera):
|
|
105
|
+
"""Impairment port on Chi-100G-5S-2P module.
|
|
106
|
+
"""
|
|
107
|
+
...
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class PChi100G5S2P_b(PortChimera):
|
|
111
|
+
"""Impairment port on Chi-100G-5S-2P[b] module.
|
|
112
|
+
"""
|
|
113
|
+
...
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class PChi40G2S2P(PortChimera):
|
|
117
|
+
"""Impairment port on Chi-40G-2S-2P module.
|
|
118
|
+
"""
|
|
119
|
+
...
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
from typing import (
|
|
2
|
+
TYPE_CHECKING,
|
|
3
|
+
Tuple,
|
|
4
|
+
)
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
7
|
+
|
|
8
|
+
from xoa_driver.internals.commands import (
|
|
9
|
+
PE_FCSDROP,
|
|
10
|
+
PE_TPLDMODE,
|
|
11
|
+
PE_COMMENT,
|
|
12
|
+
PE_INDICES,
|
|
13
|
+
PE_LATENCYRANGE,
|
|
14
|
+
PE_CORRUPT,
|
|
15
|
+
PE_MISORDER,
|
|
16
|
+
PE_BANDPOLICER,
|
|
17
|
+
PE_BANDSHAPER,
|
|
18
|
+
PE_DROPTOTAL,
|
|
19
|
+
PE_LATENCYTOTAL,
|
|
20
|
+
PE_DUPTOTAL,
|
|
21
|
+
PE_MISTOTAL,
|
|
22
|
+
PE_CORTOTAL,
|
|
23
|
+
PE_JITTERTOTAL,
|
|
24
|
+
PE_CLEAR,
|
|
25
|
+
PE_FLOWDROPTOTAL,
|
|
26
|
+
PE_FLOWLATENCYTOTAL,
|
|
27
|
+
PE_FLOWDUPTOTAL,
|
|
28
|
+
PE_FLOWMISTOTAL,
|
|
29
|
+
PE_FLOWCORTOTAL,
|
|
30
|
+
PE_FLOWJITTERTOTAL,
|
|
31
|
+
PE_FLOWCLEAR,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
from .reception_statistics import ReceptionStatistics
|
|
35
|
+
from .transmission_statistics import TransmissionStatistics
|
|
36
|
+
from .pe_distribution import ImpairmentTypeDistribution
|
|
37
|
+
from .filter_definition import (
|
|
38
|
+
shadow,
|
|
39
|
+
working,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class CTotalFlow:
|
|
44
|
+
"""Total flow statistics."""
|
|
45
|
+
|
|
46
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
47
|
+
self.drop_packets = PE_FLOWDROPTOTAL(conn, module_id, port_id, flow_index)
|
|
48
|
+
"""Statistics of all packets dropped in a flow.
|
|
49
|
+
|
|
50
|
+
:type: PE_FLOWDROPTOTAL
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
self.latency_packets = PE_FLOWLATENCYTOTAL(conn, module_id, port_id, flow_index)
|
|
54
|
+
"""Statistics of all packets delayed in a flow.
|
|
55
|
+
|
|
56
|
+
:type: PE_FLOWLATENCYTOTAL
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
self.duplicated_packets = PE_FLOWDUPTOTAL(conn, module_id, port_id, flow_index)
|
|
60
|
+
"""Statistics of all packets duplicate in a flow.
|
|
61
|
+
|
|
62
|
+
:type: PE_FLOWDUPTOTAL
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
self.mis_ordered_packets = PE_FLOWMISTOTAL(conn, module_id, port_id, flow_index)
|
|
66
|
+
"""Statistics of all packets misordered in a flow.
|
|
67
|
+
|
|
68
|
+
:type: PE_FLOWMISTOTAL
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
self.corrupted_packets = PE_FLOWCORTOTAL(conn, module_id, port_id, flow_index)
|
|
72
|
+
"""Statistics of all packets corrupted in a flow.
|
|
73
|
+
|
|
74
|
+
:type: PE_FLOWCORTOTAL
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self.jittered_packets = PE_FLOWJITTERTOTAL(conn, module_id, port_id, flow_index)
|
|
78
|
+
"""Statistics of all packets jittered in a flow.
|
|
79
|
+
|
|
80
|
+
:type: PE_FLOWJITTERTOTAL
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class StatisticsTotals:
|
|
85
|
+
"""Total port statistics."""
|
|
86
|
+
|
|
87
|
+
def __init__(self, conn, module_id, port_id) -> None:
|
|
88
|
+
self.drop = PE_DROPTOTAL(conn, module_id, port_id)
|
|
89
|
+
"""Statistics of all packets dropped on the port.
|
|
90
|
+
|
|
91
|
+
:type: PE_DROPTOTAL
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
self.latency = PE_LATENCYTOTAL(conn, module_id, port_id)
|
|
95
|
+
"""Statistics of all packets delayed on the port.
|
|
96
|
+
|
|
97
|
+
:type: PE_LATENCYTOTAL
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
self.duplicated = PE_DUPTOTAL(conn, module_id, port_id)
|
|
101
|
+
"""Statistics of all packets duplicated on the port.
|
|
102
|
+
|
|
103
|
+
:type: PE_DUPTOTAL
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
self.mis_ordered = PE_MISTOTAL(conn, module_id, port_id)
|
|
107
|
+
"""Statistics of all packets mirordered on the port.
|
|
108
|
+
|
|
109
|
+
:type: PE_MISTOTAL
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
self.corrupted = PE_CORTOTAL(conn, module_id, port_id)
|
|
113
|
+
"""Statistics of all packets corrupted on the port.
|
|
114
|
+
|
|
115
|
+
:type: PE_CORTOTAL
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
self.jittered = PE_JITTERTOTAL(conn, module_id, port_id)
|
|
119
|
+
"""Statistics of all packets jittered on the port.
|
|
120
|
+
|
|
121
|
+
:type: PE_JITTERTOTAL
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class CFlowStatistics:
|
|
126
|
+
"""Per flow statistics."""
|
|
127
|
+
|
|
128
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
129
|
+
self.rx = ReceptionStatistics(conn, module_id, port_id, flow_index)
|
|
130
|
+
"""RX statistics."""
|
|
131
|
+
|
|
132
|
+
self.tx = TransmissionStatistics(conn, module_id, port_id, flow_index)
|
|
133
|
+
"""TX statistics."""
|
|
134
|
+
|
|
135
|
+
self.total = CTotalFlow(conn, module_id, port_id, flow_index)
|
|
136
|
+
"""Total flow statistics."""
|
|
137
|
+
|
|
138
|
+
self.clear = PE_FLOWCLEAR(conn, module_id, port_id, flow_index)
|
|
139
|
+
"""Clear the impairment statistics on a flow.
|
|
140
|
+
|
|
141
|
+
:type: PE_FLOWCLEAR
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class CBandwidth:
|
|
146
|
+
"""Bandwidth configuration."""
|
|
147
|
+
|
|
148
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
149
|
+
self.policer = PE_BANDPOLICER(conn, module_id, port_id, flow_index)
|
|
150
|
+
"""Bandwidth policer configuration.
|
|
151
|
+
|
|
152
|
+
:type: PE_BANDPOLICER
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
self.shaper = PE_BANDSHAPER(conn, module_id, port_id, flow_index)
|
|
156
|
+
"""Bandwidth shaper configuration.
|
|
157
|
+
|
|
158
|
+
:type: PE_BANDSHAPER
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class CFlow:
|
|
163
|
+
"""Flow settings."""
|
|
164
|
+
|
|
165
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
166
|
+
self.comment = PE_COMMENT(conn, module_id, port_id, flow_index)
|
|
167
|
+
"""Flow description.
|
|
168
|
+
|
|
169
|
+
:type: PE_COMMENT
|
|
170
|
+
"""
|
|
171
|
+
|
|
172
|
+
self.latency_range = PE_LATENCYRANGE(conn, module_id, port_id, flow_index)
|
|
173
|
+
"""Flow latency range.
|
|
174
|
+
|
|
175
|
+
:type: PE_LATENCYRANGE
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
self.corruption = PE_CORRUPT(conn, module_id, port_id, flow_index)
|
|
179
|
+
"""Corruption type.
|
|
180
|
+
|
|
181
|
+
:type: PE_CORRUPT
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
self.misordering = PE_MISORDER(conn, module_id, port_id, flow_index)
|
|
185
|
+
"""Misordering depth
|
|
186
|
+
|
|
187
|
+
:type: PE_MISORDER
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
self.bandwidth_control = CBandwidth(conn, module_id, port_id, flow_index)
|
|
191
|
+
"""Bandwidth configuration."""
|
|
192
|
+
|
|
193
|
+
self.statistics = CFlowStatistics(conn, module_id, port_id, flow_index)
|
|
194
|
+
"""Flow statistics."""
|
|
195
|
+
|
|
196
|
+
self.impairment_distribution = ImpairmentTypeDistribution(conn, module_id, port_id, flow_index)
|
|
197
|
+
"""Impairment type's distribution."""
|
|
198
|
+
|
|
199
|
+
self.shadow_filter = shadow.FilterDefinitionShadow(conn, module_id, port_id, flow_index)
|
|
200
|
+
"""Shadow copy."""
|
|
201
|
+
|
|
202
|
+
self.working_filter = working.FilterDefinitionWorking(conn, module_id, port_id, flow_index)
|
|
203
|
+
"""Working copy."""
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class ChimeraPE:
|
|
207
|
+
"""Port Emulation"""
|
|
208
|
+
|
|
209
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
210
|
+
self._conn = conn
|
|
211
|
+
self.module_id = module_id
|
|
212
|
+
self.port_id = port_id
|
|
213
|
+
self.drop_fcs_errors = PE_FCSDROP(conn, module_id, port_id)
|
|
214
|
+
"""Action on FCS errors.
|
|
215
|
+
|
|
216
|
+
:type: PE_FCSDROP
|
|
217
|
+
"""
|
|
218
|
+
|
|
219
|
+
self.clear = PE_CLEAR(conn, module_id, port_id)
|
|
220
|
+
"""Clear impairment statistics.
|
|
221
|
+
|
|
222
|
+
:type: PE_CLEAR
|
|
223
|
+
"""
|
|
224
|
+
|
|
225
|
+
self.statistics = StatisticsTotals(conn, module_id, port_id)
|
|
226
|
+
"""Total port statistics."""
|
|
227
|
+
|
|
228
|
+
self.tpld_mode = PE_TPLDMODE(conn, module_id, port_id)
|
|
229
|
+
"""TPLD mode.
|
|
230
|
+
|
|
231
|
+
:type: PE_TPLDMODE
|
|
232
|
+
"""
|
|
233
|
+
|
|
234
|
+
self.flows: Tuple["CFlow", ...] = tuple()
|
|
235
|
+
|
|
236
|
+
def __await__(self):
|
|
237
|
+
return self._setup().__await__()
|
|
238
|
+
|
|
239
|
+
async def _setup(self) -> None:
|
|
240
|
+
indices = await PE_INDICES(self._conn, self.module_id, self.port_id).get()
|
|
241
|
+
self.flows = tuple(
|
|
242
|
+
CFlow(self._conn, self.module_id, self.port_id, idx)
|
|
243
|
+
for idx in indices.to_tuple()
|
|
244
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
if TYPE_CHECKING:
|
|
3
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
4
|
+
from xoa_driver.internals.commands import (
|
|
5
|
+
PR_FLOWTOTAL,
|
|
6
|
+
PR_FLOWCLEAR,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReceptionStatistics:
|
|
11
|
+
"""Chimera RX statistics."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
14
|
+
self.total = PR_FLOWTOTAL(conn, module_id, port_id, flow_index)
|
|
15
|
+
"""RX statistics of a flow.
|
|
16
|
+
|
|
17
|
+
:type: PR_FLOWTOTAL
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
self.clear = PR_FLOWCLEAR(conn, module_id, port_id, flow_index)
|
|
21
|
+
"""Clear RX statistics of a flow.
|
|
22
|
+
|
|
23
|
+
:type: PR_FLOWCLEAR
|
|
24
|
+
"""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
if TYPE_CHECKING:
|
|
3
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
4
|
+
from xoa_driver.internals.commands import (
|
|
5
|
+
PT_FLOWTOTAL,
|
|
6
|
+
PT_FLOWCLEAR,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TransmissionStatistics:
|
|
11
|
+
"""Chimera TX statistics."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
|
|
14
|
+
self.total = PT_FLOWTOTAL(conn, module_id, port_id, flow_index)
|
|
15
|
+
"""TX statistics of a flow.
|
|
16
|
+
|
|
17
|
+
:type: PT_FLOWTOTAL
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
self.clear = PT_FLOWCLEAR(conn, module_id, port_id, flow_index)
|
|
21
|
+
"""Clear TX statistics of a flow.
|
|
22
|
+
|
|
23
|
+
:type: PT_FLOWCLEAR
|
|
24
|
+
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
from xoa_driver.internals.commands import P_AUTONEGSELECTION
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
5
|
+
|
|
6
|
+
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
7
|
+
from . import family_f
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class POdin1G4S4PCombi(BasePortL23Genuine):
|
|
11
|
+
"""L23 ports that supports MDI/MDIX and """
|
|
12
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
13
|
+
super().__init__(conn, module_id, port_id)
|
|
14
|
+
|
|
15
|
+
self.autoneg_selection = P_AUTONEGSELECTION(conn, module_id, port_id)
|
|
16
|
+
"""L23 port's auto-negotiation selection.
|
|
17
|
+
|
|
18
|
+
:type: P_AUTONEGSELECTION`
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class POdin1G4S4PCombi_b(POdin1G4S4PCombi):
|
|
23
|
+
"""L23 port on Odin-1G-4S-2P-Combi_b module.
|
|
24
|
+
"""
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class POdin10G4S2PCombi(family_f.FamilyF):
|
|
29
|
+
"""L23 port on Odin-10G-4S-2P-Combi module.
|
|
30
|
+
"""
|
|
31
|
+
...
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class POdin10G4S2PCombi_b(family_f.FamilyF):
|
|
35
|
+
"""L23 port on Odin-10G-4S-2P-Combi_b module.
|
|
36
|
+
"""
|
|
37
|
+
...
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
from xoa_driver.internals.commands import (
|
|
3
|
+
P_MDIXMODE,
|
|
4
|
+
P_AUTONEGSELECTION,
|
|
5
|
+
)
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
8
|
+
|
|
9
|
+
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FamilyD(BasePortL23Genuine):
|
|
13
|
+
"""L23 ports that supports MDI/MDIX and """
|
|
14
|
+
|
|
15
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
16
|
+
super().__init__(conn, module_id, port_id)
|
|
17
|
+
self.mdix_mode = P_MDIXMODE(conn, module_id, port_id)
|
|
18
|
+
"""L23 port's MDI/MDIX mode.
|
|
19
|
+
|
|
20
|
+
:type: P_MDIXMODE
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
self.autoneg_selection = P_AUTONEGSELECTION(conn, module_id, port_id)
|
|
24
|
+
"""L23 port's auto-negotiation selection.
|
|
25
|
+
|
|
26
|
+
:type: P_AUTONEGSELECTION
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class POdin1G3S6P(FamilyD):
|
|
31
|
+
"""L23 port on Odin-1G-3S-6P module.
|
|
32
|
+
"""
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class POdin1G3S6P_b(FamilyD):
|
|
37
|
+
"""L23 port on Odin-1G-3S-6P[b] module.
|
|
38
|
+
"""
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class POdin1G3S6PE(FamilyD):
|
|
43
|
+
"""L23 port on Odin-1G-3S-6P-E module.
|
|
44
|
+
"""
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class POdin1G3S2PT(FamilyD):
|
|
49
|
+
"""L23 port on Odin-1G-3S-2P-T module.
|
|
50
|
+
"""
|
|
51
|
+
...
|