tdl-xoa-driver 1.3.0__py3-none-any.whl → 1.5.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.
Files changed (268) hide show
  1. tdl_xoa_driver-1.5.0.dist-info/METADATA +56 -0
  2. tdl_xoa_driver-1.5.0.dist-info/RECORD +231 -0
  3. xoa_driver/__init__.py +2 -2
  4. xoa_driver/enums.py +2 -0
  5. xoa_driver/exceptions.py +2 -0
  6. xoa_driver/functions/anlt.py +4 -2
  7. xoa_driver/functions/anlt_ll_debug.py +2 -0
  8. xoa_driver/functions/cli/__init__.py +21 -0
  9. xoa_driver/functions/cli/_cli_manager.py +541 -0
  10. xoa_driver/functions/cli/_config_block.py +334 -0
  11. xoa_driver/functions/cli/_socket_driver.py +111 -0
  12. xoa_driver/functions/cli/port_config.py +116 -0
  13. xoa_driver/functions/cli/testbed_config.py +179 -0
  14. xoa_driver/functions/cmis/__init__.py +8 -0
  15. xoa_driver/functions/cmis/_constants.py +25 -0
  16. xoa_driver/functions/cmis/_replies.py +600 -0
  17. xoa_driver/functions/cmis/_utils.py +49 -0
  18. xoa_driver/functions/cmis/cdb.py +1266 -0
  19. xoa_driver/functions/exceptions.py +2 -0
  20. xoa_driver/functions/headers.py +2 -0
  21. xoa_driver/functions/mgmt.py +48 -34
  22. xoa_driver/functions/tools.py +9 -3
  23. xoa_driver/hlfuncs.py +7 -3
  24. xoa_driver/internals/commands/c_commands.py +6 -10
  25. xoa_driver/internals/commands/enums.py +25 -1
  26. xoa_driver/internals/commands/p_commands.py +50 -12
  27. xoa_driver/internals/commands/pl1_commands.py +130 -73
  28. xoa_driver/internals/commands/pp_commands.py +44 -55
  29. xoa_driver/internals/commands/pr_commands.py +17 -16
  30. xoa_driver/internals/commands/pt_commands.py +21 -1
  31. xoa_driver/internals/commands/px_commands.py +1686 -6
  32. xoa_driver/internals/core/transporter/_request_id_counter.py +1 -1
  33. xoa_driver/internals/core/transporter/logger/__state_on_user.py +1 -1
  34. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +3 -1
  35. xoa_driver/internals/core/transporter/protocol/payload/field.py +41 -0
  36. xoa_driver/internals/core/transporter/protocol/payload/types.py +19 -0
  37. xoa_driver/internals/exceptions/modules.py +4 -3
  38. xoa_driver/internals/{hli_v1 → hli}/indices/filter/base_filter.py +1 -1
  39. xoa_driver/internals/{hli_v1 → hli}/indices/length_term.py +1 -1
  40. xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/base_macsecsc.py +2 -2
  41. xoa_driver/internals/{hli_v1 → hli}/indices/match_term.py +1 -1
  42. xoa_driver/internals/{hli_v1 → hli}/indices/port_dataset.py +1 -1
  43. xoa_driver/internals/{hli_v1 → hli}/indices/streams/base_stream.py +1 -1
  44. xoa_driver/internals/{hli_v1 → hli}/modules/module_chimera.py +3 -3
  45. xoa_driver/internals/{hli_v1 → hli}/modules/module_l47.py +1 -1
  46. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_combi.py +1 -1
  47. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_d.py +1 -1
  48. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_e.py +1 -1
  49. xoa_driver/internals/hli/modules/modules_l23/family_edun.py +82 -0
  50. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_f.py +1 -1
  51. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_g.py +17 -2
  52. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_h.py +1 -1
  53. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_i.py +1 -1
  54. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_j.py +1 -1
  55. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_k.py +1 -1
  56. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l.py +1 -1
  57. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l1.py +20 -1
  58. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_m.py +1 -1
  59. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_n.py +1 -1
  60. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/module_l23_base.py +1 -1
  61. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23.py +3 -3
  62. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23_genuine.py +4 -4
  63. xoa_driver/internals/hli/ports/port_l23/bases/port_transceiver.py +247 -0
  64. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_transmission_statistics.py +1 -1
  65. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_chimera.py +1 -1
  66. xoa_driver/internals/hli/ports/port_l23/edun_l1.py +181 -0
  67. xoa_driver/internals/hli/ports/port_l23/family_edun.py +82 -0
  68. xoa_driver/internals/{hli_v2 → hli}/ports/port_l23/family_g.py +5 -0
  69. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l1.py +14 -8
  70. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/port_l23ve.py +2 -2
  71. xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/main.py +2 -2
  72. xoa_driver/internals/{hli_v1 → hli}/testers/l23_tester.py +1 -1
  73. xoa_driver/internals/{hli_v1 → hli}/testers/l47_tester.py +2 -2
  74. xoa_driver/internals/state_storage/modules_state.py +20 -0
  75. xoa_driver/internals/state_storage/testers_state.py +10 -0
  76. xoa_driver/lli.py +1 -0
  77. xoa_driver/misc.py +13 -17
  78. xoa_driver/modules.py +40 -22
  79. xoa_driver/ports.py +42 -20
  80. xoa_driver/testers.py +5 -7
  81. xoa_driver/utils.py +2 -0
  82. tdl_xoa_driver-1.3.0.dist-info/METADATA +0 -56
  83. tdl_xoa_driver-1.3.0.dist-info/RECORD +0 -325
  84. xoa_driver/functions/cli.py +0 -581
  85. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +0 -117
  86. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +0 -77
  87. xoa_driver/internals/hli_v2/__init__.py +0 -0
  88. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  89. xoa_driver/internals/hli_v2/indices/base_index.py +0 -39
  90. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  91. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +0 -115
  92. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +0 -59
  93. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +0 -71
  94. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +0 -96
  95. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +0 -148
  96. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +0 -89
  97. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +0 -261
  98. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +0 -166
  99. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +0 -112
  100. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +0 -25
  101. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  102. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +0 -50
  103. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +0 -17
  104. xoa_driver/internals/hli_v2/indices/length_term.py +0 -44
  105. xoa_driver/internals/hli_v2/indices/match_term.py +0 -49
  106. xoa_driver/internals/hli_v2/indices/port_dataset.py +0 -53
  107. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  108. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +0 -234
  109. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +0 -32
  110. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  111. xoa_driver/internals/hli_v2/modules/__interfaces.py +0 -21
  112. xoa_driver/internals/hli_v2/modules/base_module.py +0 -125
  113. xoa_driver/internals/hli_v2/modules/module_chimera.py +0 -358
  114. xoa_driver/internals/hli_v2/modules/module_l23ve.py +0 -58
  115. xoa_driver/internals/hli_v2/modules/module_l47.py +0 -230
  116. xoa_driver/internals/hli_v2/modules/module_l47ve.py +0 -8
  117. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  118. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +0 -73
  119. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +0 -75
  120. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +0 -85
  121. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +0 -144
  122. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +0 -84
  123. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +0 -40
  124. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +0 -25
  125. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +0 -25
  126. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +0 -39
  127. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +0 -55
  128. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +0 -797
  129. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +0 -25
  130. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +0 -40
  131. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +0 -339
  132. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  133. xoa_driver/internals/hli_v2/ports/base_port.py +0 -105
  134. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  135. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  136. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +0 -64
  137. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +0 -441
  138. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +0 -172
  139. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +0 -156
  140. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +0 -117
  141. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +0 -59
  142. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  143. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  144. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +0 -15
  145. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +0 -340
  146. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +0 -99
  147. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +0 -36
  148. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +0 -116
  149. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +0 -102
  150. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +0 -113
  151. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +0 -420
  152. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +0 -22
  153. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +0 -22
  154. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +0 -36
  155. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +0 -49
  156. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +0 -96
  157. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +0 -144
  158. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +0 -60
  159. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +0 -66
  160. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +0 -53
  161. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +0 -58
  162. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +0 -67
  163. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +0 -149
  164. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +0 -28
  165. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +0 -22
  166. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +0 -342
  167. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -50
  168. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +0 -65
  169. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +0 -81
  170. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  171. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +0 -146
  172. xoa_driver/internals/hli_v2/ports/port_l47/main.py +0 -137
  173. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +0 -20
  174. xoa_driver/internals/hli_v2/revisions.py +0 -11
  175. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  176. xoa_driver/internals/hli_v2/testers/_base_tester.py +0 -207
  177. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  178. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  179. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +0 -16
  180. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +0 -34
  181. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +0 -50
  182. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +0 -26
  183. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +0 -38
  184. xoa_driver/internals/hli_v2/testers/l23_tester.py +0 -159
  185. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +0 -98
  186. xoa_driver/internals/hli_v2/testers/l47_tester.py +0 -95
  187. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +0 -50
  188. xoa_driver/v2/__init__.py +0 -11
  189. xoa_driver/v2/misc.py +0 -77
  190. xoa_driver/v2/modules.py +0 -308
  191. xoa_driver/v2/ports.py +0 -232
  192. xoa_driver/v2/testers.py +0 -24
  193. {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/WHEEL +0 -0
  194. {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/licenses/LICENSE +0 -0
  195. {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/top_level.txt +0 -0
  196. /xoa_driver/internals/{hli_v1 → hli}/__init__.py +0 -0
  197. /xoa_driver/internals/{hli_v1 → hli}/indices/__init__.py +0 -0
  198. /xoa_driver/internals/{hli_v1 → hli}/indices/base_index.py +0 -0
  199. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/__init__.py +0 -0
  200. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/cg.py +0 -0
  201. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/histogram.py +0 -0
  202. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l2.py +0 -0
  203. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l3.py +0 -0
  204. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/raw.py +0 -0
  205. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/replay.py +0 -0
  206. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tcp.py +0 -0
  207. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tls.py +0 -0
  208. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/udp.py +0 -0
  209. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/user_state.py +0 -0
  210. /xoa_driver/internals/{hli_v1 → hli}/indices/filter/__init__.py +0 -0
  211. /xoa_driver/internals/{hli_v1 → hli}/indices/filter/genuine_filter.py +0 -0
  212. /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/__init__.py +0 -0
  213. /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/genuine_macsecsc.py +0 -0
  214. /xoa_driver/internals/{hli_v1 → hli}/indices/streams/__init__.py +0 -0
  215. /xoa_driver/internals/{hli_v1 → hli}/indices/streams/genuine_stream.py +0 -0
  216. /xoa_driver/internals/{hli_v1 → hli}/modules/__init__.py +0 -0
  217. /xoa_driver/internals/{hli_v1 → hli}/modules/__interfaces.py +0 -0
  218. /xoa_driver/internals/{hli_v1 → hli}/modules/base_module.py +0 -0
  219. /xoa_driver/internals/{hli_v1 → hli}/modules/module_l23ve.py +0 -0
  220. /xoa_driver/internals/{hli_v1 → hli}/modules/module_l47ve.py +0 -0
  221. /xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/__init__.py +0 -0
  222. /xoa_driver/internals/{hli_v1 → hli}/ports/__init__.py +0 -0
  223. /xoa_driver/internals/{hli_v1 → hli}/ports/base_port.py +0 -0
  224. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/__init__.py +0 -0
  225. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/__init__.py +0 -0
  226. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_capture.py +0 -0
  227. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_reception_statistics.py +0 -0
  228. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/__init__.py +0 -0
  229. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  230. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/_utils.py +0 -0
  231. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/general.py +0 -0
  232. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/shadow.py +0 -0
  233. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/working.py +0 -0
  234. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_custom_distribution.py +0 -0
  235. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_distribution.py +0 -0
  236. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_emulation.py +0 -0
  237. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/reception_statistics.py +0 -0
  238. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/transmission_statistics.py +0 -0
  239. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_combi.py +0 -0
  240. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_d.py +0 -0
  241. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_e.py +0 -0
  242. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_f.py +0 -0
  243. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_h.py +0 -0
  244. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_i.py +0 -0
  245. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_j.py +0 -0
  246. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_k.py +0 -0
  247. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l.py +0 -0
  248. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_m.py +0 -0
  249. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/fault_jkl.py +0 -0
  250. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/freya_l1.py +0 -0
  251. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ghijkl.py +0 -0
  252. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -0
  253. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_l.py +0 -0
  254. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/__init__.py +0 -0
  255. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/counters.py +0 -0
  256. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/packet_engine.py +0 -0
  257. /xoa_driver/internals/{hli_v1 → hli}/revisions.py +0 -0
  258. /xoa_driver/internals/{hli_v1 → hli}/testers/__init__.py +0 -0
  259. /xoa_driver/internals/{hli_v1 → hli}/testers/_base_tester.py +0 -0
  260. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/__init__.py +0 -0
  261. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/__init__.py +0 -0
  262. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/health.py +0 -0
  263. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/rest_api.py +0 -0
  264. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/time_keeper.py +0 -0
  265. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/upload_file.py +0 -0
  266. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/management_interface.py +0 -0
  267. /xoa_driver/internals/{hli_v1 → hli}/testers/l23ve_tester.py +0 -0
  268. /xoa_driver/internals/{hli_v1 → hli}/testers/l47ve_tester.py +0 -0
@@ -1,50 +0,0 @@
1
- from typing import (
2
- TYPE_CHECKING,
3
- List,
4
- Type,
5
- TypeVar,
6
- )
7
- from xoa_driver.internals.commands import (
8
- PF_INDICES,
9
- PF_CREATE,
10
- PF_DELETE,
11
- PF_ENABLE,
12
- PF_COMMENT,
13
- PF_CONDITION,
14
- )
15
- if TYPE_CHECKING:
16
- from xoa_driver.internals.core import interfaces as itf
17
- from xoa_driver.internals.utils import kind
18
- from xoa_driver.internals.utils.indices import observer as idx_obs
19
- from ..base_index import BaseIndex
20
-
21
-
22
- FT = TypeVar("FT")
23
-
24
-
25
- class BaseFilterIdx(BaseIndex):
26
- """Base L23 Filter Index Manager"""
27
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
28
- super().__init__(conn, kind, observer)
29
-
30
- self.comment = PF_COMMENT(conn, *kind)
31
- """Representation of PF_COMMENT"""
32
- self.enable = PF_ENABLE(conn, *kind)
33
- """Representation of PF_ENABLE"""
34
- self.condition = PF_CONDITION(conn, *kind)
35
- """Representation of PF_CONDITION"""
36
-
37
- async def delete(self):
38
- """Representation of PF_DELETE"""
39
- await PF_DELETE(self._conn, *self.kind).set()
40
- self._observer.notify(idx_obs.IndexEvents.DEL, self)
41
-
42
- @classmethod
43
- async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
44
- resp = await PF_INDICES(conn, module_id, port_id).get()
45
- return list(resp.filter_xindices)
46
-
47
- @classmethod
48
- async def _new(cls: Type[FT], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> FT:
49
- await PF_CREATE(conn, *kind).set()
50
- return cls(conn, kind, observer)
@@ -1,17 +0,0 @@
1
- from typing import TYPE_CHECKING
2
- from xoa_driver.internals.commands import PF_STRING
3
-
4
- if TYPE_CHECKING:
5
- from xoa_driver.internals.core import interfaces as itf
6
- from xoa_driver.internals.utils import kind
7
- from xoa_driver.internals.utils.indices import observer as idx_obs
8
-
9
- from .base_filter import BaseFilterIdx
10
-
11
-
12
- class GenuineFilterIdx(BaseFilterIdx):
13
- """Genuine L23 Filter Index Manager"""
14
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
15
- super().__init__(conn, kind, observer)
16
- self.string = PF_STRING(conn, *kind)
17
- """Representation of PF_STRING"""
@@ -1,44 +0,0 @@
1
- from typing import (
2
- TYPE_CHECKING,
3
- List,
4
- TypeVar,
5
- Type,
6
- )
7
- from xoa_driver.internals.commands import (
8
- PL_INDICES,
9
- PL_CREATE,
10
- PL_DELETE,
11
- PL_LENGTH,
12
- )
13
-
14
- if TYPE_CHECKING:
15
- from xoa_driver.internals.core import interfaces as itf
16
- from xoa_driver.internals.utils import kind
17
- from xoa_driver.internals.utils.indices import observer as idx_obs
18
- from .base_index import BaseIndex
19
-
20
-
21
- LT = TypeVar("LT")
22
-
23
-
24
- class LengthTermIdx(BaseIndex):
25
- """L23 Length Term Index Manager"""
26
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
27
- super().__init__(conn, kind, observer)
28
- self.length = PL_LENGTH(conn, *kind)
29
- """Representation of pl_commands.PL_LENGTH"""
30
-
31
- async def delete(self):
32
- await PL_DELETE(self._conn, *self.kind).set()
33
- """Representation of pl_commands.PL_DELETE"""
34
- self._observer.notify(idx_obs.IndexEvents.DEL, self)
35
-
36
- @classmethod
37
- async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
38
- resp = await PL_INDICES(conn, module_id, port_id).get()
39
- return list(resp.length_term_xindices)
40
-
41
- @classmethod
42
- async def _new(cls: Type[LT], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> LT:
43
- await PL_CREATE(conn, *kind).set()
44
- return cls(conn, kind, observer)
@@ -1,49 +0,0 @@
1
- from typing import (
2
- List,
3
- Type,
4
- TypeVar,
5
- TYPE_CHECKING,
6
- )
7
- from xoa_driver.internals.commands import (
8
- PM_INDICES,
9
- PM_CREATE,
10
- PM_DELETE,
11
- PM_PROTOCOL,
12
- PM_POSITION,
13
- PM_MATCH,
14
- )
15
- if TYPE_CHECKING:
16
- from xoa_driver.internals.core import interfaces as itf
17
- from xoa_driver.internals.utils import kind
18
- from xoa_driver.internals.utils.indices import observer as idx_obs
19
- from .base_index import BaseIndex
20
-
21
- MT = TypeVar("MT")
22
-
23
-
24
- class MatchTermIdx(BaseIndex):
25
- """L23 Match Term Index Manager"""
26
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
27
- super().__init__(conn, kind, observer)
28
-
29
- self.protocol = PM_PROTOCOL(conn, *kind)
30
- """Representation of pm_commands.PM_PROTOCOL"""
31
- self.position = PM_POSITION(conn, *kind)
32
- """Representation of pm_commands.PM_POSITION"""
33
- self.match = PM_MATCH(conn, *kind)
34
- """Representation of pm_commands.PM_MATCH"""
35
-
36
- async def delete(self):
37
- await PM_DELETE(self._conn, *self.kind).set()
38
- """Representation of pm_commands.PM_DELETE"""
39
- self._observer.notify(idx_obs.IndexEvents.DEL, self)
40
-
41
- @classmethod
42
- async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
43
- resp = await PM_INDICES(conn, module_id, port_id).get()
44
- return list(resp.match_term_xindices)
45
-
46
- @classmethod
47
- async def _new(cls: Type[MT], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> MT:
48
- await PM_CREATE(conn, *kind).set()
49
- return cls(conn, kind, observer)
@@ -1,53 +0,0 @@
1
- from typing import (
2
- TYPE_CHECKING,
3
- List,
4
- TypeVar,
5
- Type,
6
- )
7
- from xoa_driver.internals.commands import (
8
- PD_INDICES,
9
- PD_CREATE,
10
- PD_DELETE,
11
- PD_ENABLE,
12
- PD_SOURCE,
13
- PD_RANGE,
14
- PD_SAMPLES,
15
- )
16
-
17
- if TYPE_CHECKING:
18
- from xoa_driver.internals.core import interfaces as itf
19
- from xoa_driver.internals.utils import kind
20
- from xoa_driver.internals.utils.indices import observer as idx_obs
21
- from .base_index import BaseIndex
22
-
23
-
24
- PD = TypeVar("PD")
25
-
26
-
27
- class PortDatasetIdx(BaseIndex):
28
- """L23 Histogram Index Manager"""
29
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
30
- super().__init__(conn, kind, observer)
31
- self.enable = PD_ENABLE(conn, *kind)
32
- """Representation of pd_commands.PD_ENABLE"""
33
- self.source = PD_SOURCE(conn, *kind)
34
- """Representation of pd_commands.PD_SOURCE"""
35
- self.range = PD_RANGE(conn, *kind)
36
- """Representation of pd_commands.PD_RANGE"""
37
- self.samples = PD_SAMPLES(conn, *kind)
38
- """Representation of pd_commands.PD_SAMPLES"""
39
-
40
- async def delete(self):
41
- await PD_DELETE(self._conn, *self.kind).set()
42
- """Representation of pd_commands.PD_ENABLE"""
43
- self._observer.notify(idx_obs.IndexEvents.DEL, self)
44
-
45
- @classmethod
46
- async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
47
- resp = await PD_INDICES(conn, module_id, port_id).get()
48
- return list(resp.histogram_indices)
49
-
50
- @classmethod
51
- async def _new(cls: Type[PD], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> PD:
52
- await PD_CREATE(conn, *kind).set()
53
- return cls(conn, kind, observer)
File without changes
@@ -1,234 +0,0 @@
1
- from typing import (
2
- List,
3
- Type,
4
- TypeVar,
5
- TYPE_CHECKING,
6
- )
7
- from xoa_driver.internals.commands import (
8
- PS_INDICES,
9
- PS_CREATE,
10
- PS_DELETE,
11
- PS_ENABLE,
12
- PS_PACKETLIMIT,
13
- PS_COMMENT,
14
- PS_TPLDID,
15
- PS_ARPREQUEST,
16
- PS_PINGREQUEST,
17
- PS_MODIFIEREXTRANGE,
18
- PS_MODIFIERRANGE,
19
- PS_RATEFRACTION,
20
- PS_RATEPPS,
21
- PS_RATEL2BPS,
22
- PS_BURST,
23
- PS_PACKETHEADER,
24
- PS_HEADERPROTOCOL,
25
- PS_MODIFIERCOUNT,
26
- PS_MODIFIER,
27
- PS_PACKETLENGTH,
28
- PS_PAYLOAD,
29
- PS_IPV4GATEWAY,
30
- PS_IPV6GATEWAY,
31
- PS_BURSTGAP,
32
- PS_INJECTSEQERR,
33
- PS_INJECTMISERR,
34
- PS_INJECTPLDERR,
35
- PS_INJECTTPLDERR,
36
- PS_MODIFIEREXT,
37
- PS_MODIFIEREXTCOUNT,
38
- PS_CDFOFFSET,
39
- PS_CDFCOUNT,
40
- PS_CDFDATA,
41
- PS_EXTPAYLOAD,
42
- PS_PFCPRIORITY,
43
- PS_AUTOADJUST,
44
- PS_OPTIONS,
45
- )
46
- if TYPE_CHECKING:
47
- from xoa_driver.internals.core import interfaces as itf
48
- from xoa_driver.internals.utils import kind
49
- from xoa_driver.internals.utils.indices import observer as idx_obs
50
- from xoa_driver.internals.utils.indices import header_modifier_manager as hmm
51
- from ..base_index import BaseIndex
52
-
53
-
54
- class SRate:
55
- """L23 Stream Rate Configuration"""
56
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
57
- self.fraction = PS_RATEFRACTION(conn, module_id, port_id, stream_idx)
58
- """Representation of PS_RATEFRACTION"""
59
- self.pps = PS_RATEPPS(conn, module_id, port_id, stream_idx)
60
- """Representation of PS_RATEPPS"""
61
- self.l2bps = PS_RATEL2BPS(conn, module_id, port_id, stream_idx)
62
- """Representation of PS_RATEL2BPS"""
63
-
64
-
65
- class HModifierExtended:
66
- """L23 Extended Modifier Configuration"""
67
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int, modifier_idx: int) -> None:
68
- self.specification = PS_MODIFIEREXT(conn, module_id, port_id, stream_idx, modifier_idx)
69
- """Representation of PS_MODIFIEREXT"""
70
- self.range = PS_MODIFIEREXTRANGE(conn, module_id, port_id, stream_idx, modifier_idx)
71
- """Representation of PS_MODIFIEREXTRANGE"""
72
-
73
-
74
- class HModifier:
75
- """L23 Modifier Configuration"""
76
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int, modifier_idx: int) -> None:
77
- self.specification = PS_MODIFIER(conn, module_id, port_id, stream_idx, modifier_idx)
78
- """Representation of PS_MODIFIEREXTRANGE"""
79
- self.range = PS_MODIFIERRANGE(conn, module_id, port_id, stream_idx, modifier_idx)
80
- """Representation of PS_MODIFIERRANGE"""
81
-
82
-
83
- class SCustomDataField:
84
- """L23 Custom Data Field Configuration"""
85
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
86
- self.__conn = conn
87
- self.__module_id = module_id
88
- self.__port_id = port_id
89
- self.__stream_idx = stream_idx
90
-
91
- self.offset = PS_CDFOFFSET(conn, module_id, port_id, stream_idx)
92
- """Representation of PS_CDFOFFSET"""
93
- self.count = PS_CDFCOUNT(conn, module_id, port_id, stream_idx)
94
- """Representation of PS_CDFCOUNT"""
95
-
96
- def data(self, cdf_index: int) -> "PS_CDFDATA":
97
- """Representation of PS_CDFDATA"""
98
- return PS_CDFDATA(self.__conn, self.__module_id, self.__port_id, self.__stream_idx, cdf_index)
99
-
100
-
101
- class SInjectError:
102
- """L23 Error Injection Configuration"""
103
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
104
- self.sequence = PS_INJECTSEQERR(conn, module_id, port_id, stream_idx)
105
- """Representation of PS_INJECTSEQERR"""
106
- self.misorder = PS_INJECTMISERR(conn, module_id, port_id, stream_idx)
107
- """Representation of PS_INJECTMISERR"""
108
- self.payload_integrity = PS_INJECTPLDERR(conn, module_id, port_id, stream_idx)
109
- """Representation of PS_INJECTPLDERR"""
110
- self.test_payload = PS_INJECTTPLDERR(conn, module_id, port_id, stream_idx)
111
- """Representation of PS_INJECTTPLDERR"""
112
-
113
-
114
- class SRequest:
115
- """L23 Request Configuration"""
116
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
117
- self.arp = PS_ARPREQUEST(conn, module_id, port_id, stream_idx)
118
- """Representation of PS_ARPREQUEST"""
119
- self.ping = PS_PINGREQUEST(conn, module_id, port_id, stream_idx)
120
- """Representation of PS_PINGREQUEST"""
121
-
122
-
123
- class SPayload:
124
- """L23 Payload Configuration"""
125
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
126
- self.content = PS_PAYLOAD(conn, module_id, port_id, stream_idx)
127
- """Representation of PS_PAYLOAD"""
128
- self.extended = PS_EXTPAYLOAD(conn, module_id, port_id, stream_idx)
129
- """Representation of PS_EXTPAYLOAD"""
130
-
131
-
132
- class SGateway:
133
- """L23 Gateway Configuration"""
134
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
135
- self.ipv4 = PS_IPV4GATEWAY(conn, module_id, port_id, stream_idx)
136
- """Representation of PS_IPV4GATEWAY"""
137
- self.ipv6 = PS_IPV6GATEWAY(conn, module_id, port_id, stream_idx)
138
- """Representation of PS_IPV6GATEWAY"""
139
-
140
-
141
- class SPHeader:
142
- """L23 Stream Header Configuration"""
143
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
144
- self.data = PS_PACKETHEADER(conn, module_id, port_id, stream_idx)
145
- """Representation of PS_PACKETHEADER"""
146
- self.protocol = PS_HEADERPROTOCOL(conn, module_id, port_id, stream_idx)
147
- """Representation of PS_HEADERPROTOCOL"""
148
- self.modifiers: "hmm.ModifiersManager[HModifier]" = hmm.ModifiersManager(
149
- conn,
150
- (module_id, port_id, stream_idx),
151
- PS_MODIFIERCOUNT,
152
- HModifier
153
- )
154
- """L23 stream modifier index manager"""
155
- self.modifiers_extended: "hmm.ModifiersManager[HModifierExtended]" = hmm.ModifiersManager(
156
- conn,
157
- (module_id, port_id, stream_idx),
158
- PS_MODIFIEREXTCOUNT,
159
- HModifierExtended
160
- )
161
- """L23 stream extended modifier index manager"""
162
-
163
-
164
- class SPacket:
165
- """L23 Packet Configuration"""
166
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
167
- self.limit = PS_PACKETLIMIT(conn, module_id, port_id, stream_idx)
168
- """Representation of PS_PACKETLIMIT"""
169
- self.length = PS_PACKETLENGTH(conn, module_id, port_id, stream_idx)
170
- """Representation of PS_PACKETLENGTH"""
171
- self.header = SPHeader(conn, module_id, port_id, stream_idx)
172
- """Packet header config"""
173
- self.auto_adjust = PS_AUTOADJUST(conn, module_id, port_id, stream_idx)
174
- """Auto adjust the packet length distribution of the stream."""
175
-
176
-
177
- class SBurst:
178
- """L23 Stream Burst Configuration"""
179
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
180
- self.burstiness = PS_BURST(conn, module_id, port_id, stream_idx)
181
- """Representation of PS_BURST"""
182
- self.gap = PS_BURSTGAP(conn, module_id, port_id, stream_idx)
183
- """Representation of PS_BURSTGAP"""
184
-
185
-
186
- BS = TypeVar("BS")
187
-
188
-
189
- class BaseStreamIdx(BaseIndex):
190
- """Base L23 Stream Index Manager"""
191
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
192
- super().__init__(conn, kind, observer)
193
-
194
- self.comment = PS_COMMENT(conn, *kind)
195
- """Representation of PS_COMMENT"""
196
- self.enable = PS_ENABLE(conn, *kind)
197
- """Representation of PS_ENABLE"""
198
- self.tpld_id = PS_TPLDID(conn, *kind)
199
- """Representation of PS_TPLDID"""
200
- self.priority_flow = PS_PFCPRIORITY(conn, *kind)
201
- """Representation of PS_PFCPRIORITY"""
202
- self.payload = SPayload(conn, *kind)
203
- """L23 stream payload config"""
204
- self.request = SRequest(conn, *kind)
205
- """L23 stream request config"""
206
- self.packet = SPacket(conn, *kind)
207
- """L23 stream packet config"""
208
- self.burst = SBurst(conn, *kind)
209
- """L23 stream burst config"""
210
- self.gateway = SGateway(conn, *kind)
211
- """L23 stream gateway config"""
212
- self.inject_err = SInjectError(conn, *kind)
213
- """L23 stream error injections config"""
214
- self.cdf = SCustomDataField(conn, *kind)
215
- """L23 stream custom data field config"""
216
- self.rate = SRate(conn, *kind)
217
- """L23 stream rate config"""
218
- self.options = PS_OPTIONS(conn, *kind)
219
- """L23 stream options"""
220
-
221
- async def delete(self):
222
- """Representation of PS_DELETE"""
223
- await PS_DELETE(self._conn, *self.kind).set()
224
- self._observer.notify(idx_obs.IndexEvents.DEL, self)
225
-
226
- @classmethod
227
- async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
228
- resp = await PS_INDICES(conn, module_id, port_id).get()
229
- return list(resp.stream_indices)
230
-
231
- @classmethod
232
- async def _new(cls: Type[BS], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> BS:
233
- await PS_CREATE(conn, *kind).set()
234
- return cls(conn, kind, observer)
@@ -1,32 +0,0 @@
1
- from typing import TYPE_CHECKING
2
- from xoa_driver.internals.commands import (
3
- PS_INSERTFCS,
4
- PS_INJECTFCSERR,
5
- )
6
- from .base_stream import (
7
- BaseStreamIdx,
8
- SInjectError
9
- )
10
-
11
- if TYPE_CHECKING:
12
- from xoa_driver.internals.core import interfaces as itf
13
- from xoa_driver.internals.utils import kind
14
- from xoa_driver.internals.utils.indices import observer as idx_obs
15
-
16
-
17
- class GSInjectError(SInjectError):
18
- """Error Injection configuration"""
19
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, stream_idx: int) -> None:
20
- super().__init__(conn, module_id, port_id, stream_idx)
21
- self.frame_checksum = PS_INJECTFCSERR(conn, module_id, port_id, stream_idx)
22
- """Representation of PS_INJECTFCSERR"""
23
-
24
-
25
- class GenuineStreamIdx(BaseStreamIdx):
26
- """Genuine L23 Stream Index Manager"""
27
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
28
- super().__init__(conn, kind, observer)
29
- self.insert_packets_checksum = PS_INSERTFCS(conn, *kind)
30
- """Representation of PS_INSERTFCS"""
31
- self.inject_err = GSInjectError(conn, *kind)
32
- """Error injection configuration"""
File without changes
@@ -1,21 +0,0 @@
1
- import typing
2
-
3
- if typing.TYPE_CHECKING:
4
- from xoa_driver.internals.core import interfaces as itf
5
-
6
-
7
- class ModuleInitData(typing.Protocol):
8
- module_id: int
9
- ports_count: int
10
- revision: str
11
-
12
-
13
- class IPort(typing.Protocol):
14
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
15
- ...
16
-
17
- # def __await__(self):
18
- # ...
19
-
20
- # async def _setup(self):
21
- # ...
@@ -1,125 +0,0 @@
1
-
2
- import functools
3
- from typing import (
4
- TYPE_CHECKING,
5
- TypeVar,
6
- Generic
7
- )
8
- from abc import (
9
- ABC,
10
- abstractmethod,
11
- )
12
- from typing import Self
13
- from xoa_driver.internals.commands import enums
14
- from xoa_driver.internals.commands import (
15
- M_MODEL,
16
- M_PORTCOUNT,
17
- M_RESERVATION,
18
- M_RESERVEDBY,
19
- M_SERIALNO,
20
- M_VERSIONNO
21
- )
22
- from xoa_driver.internals.utils import attributes as utils
23
-
24
- if TYPE_CHECKING:
25
- from xoa_driver.internals.core import interfaces as itf
26
- from . import __interfaces as m_itf
27
- from xoa_driver.internals.state_storage import modules_state
28
-
29
-
30
- T = TypeVar('T', bound="modules_state.ModuleLocalState")
31
-
32
-
33
- class BaseModule(ABC, Generic[T]):
34
- """
35
- Representation of a Valkyrie module on a physical tester.
36
- """
37
- def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
38
- self._conn = conn
39
- self.module_id = init_data.module_id
40
- self.ports_count = init_data.ports_count
41
- self.reservation = M_RESERVATION(self._conn, self.module_id)
42
- """Test module's reservation action.
43
- Representation of M_RESERVATION
44
- """
45
-
46
- self.reserved_by = M_RESERVEDBY(self._conn, self.module_id)
47
- """Test module's reservation status.
48
- Representation of M_RESERVEDBY
49
- """
50
-
51
- self.model = M_MODEL(self._conn, self.module_id)
52
- """Test module's model.
53
- Representation of M_MODEL
54
- """
55
-
56
- self.serial_number = M_SERIALNO(self._conn, self.module_id)
57
- """Test module's serial number.
58
- Representation of M_SERIALNO
59
- """
60
-
61
- self.version_number = M_VERSIONNO(self._conn, self.module_id)
62
- """Test module's version number.
63
- Representation of M_VERSIONNO
64
- """
65
-
66
- self.port_count = M_PORTCOUNT(self._conn, self.module_id)
67
- """Max port count of the test module.
68
- Representation of M_PORTCOUNT
69
- """
70
-
71
- @property
72
- @abstractmethod
73
- def info(self) -> T:
74
- """
75
- Module local info.
76
- """
77
- raise NotImplementedError()
78
-
79
- def __await__(self):
80
- return self._setup().__await__()
81
-
82
- @abstractmethod
83
- async def _setup(self) -> Self:
84
- raise NotImplementedError()
85
-
86
- def _check_identity(self, request) -> bool:
87
- return self.module_id == request.header.module_index
88
-
89
- def __is_reservation(self, reserved_status: enums.ReservedStatus) -> bool:
90
- return self.info.reservation == reserved_status
91
-
92
- is_released = functools.partialmethod(__is_reservation, enums.ReservedStatus.RELEASED)
93
- """
94
- Validate if the module is released.
95
- """
96
-
97
- is_reserved_by_me = functools.partialmethod(__is_reservation, enums.ReservedStatus.RESERVED_BY_YOU)
98
- """
99
- Validate if the module is reserved by me.
100
- """
101
-
102
- on_reservation_change = functools.partialmethod(utils.on_event, M_RESERVATION)
103
- """
104
- Register a callback to the event that the module's reservation status changes.
105
- """
106
-
107
- on_reserved_by_change = functools.partialmethod(utils.on_event, M_RESERVEDBY)
108
- """
109
- Register a callback to the event that the module's ownership status changes.
110
- """
111
-
112
- on_model_change = functools.partialmethod(utils.on_event, M_MODEL)
113
- """
114
- Register a callback to the event that the module's legacy model changes.
115
- """
116
-
117
- on_serial_number_change = functools.partialmethod(utils.on_event, M_SERIALNO)
118
- """
119
- Register a callback to the event that the module's serial number status changes.
120
- """
121
-
122
- on_version_number_change = functools.partialmethod(utils.on_event, M_VERSIONNO)
123
- """
124
- Register a callback to the event that the module's version number status changes.
125
- """