tdl-xoa-driver 1.2.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/METADATA +5 -5
  2. tdl_xoa_driver-1.4.0.dist-info/RECORD +218 -0
  3. {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/WHEEL +1 -1
  4. xoa_driver/__init__.py +2 -2
  5. xoa_driver/enums.py +2 -0
  6. xoa_driver/functions/anlt.py +2 -2
  7. xoa_driver/functions/exceptions.py +7 -0
  8. xoa_driver/functions/mgmt.py +62 -25
  9. xoa_driver/hlfuncs.py +1 -1
  10. xoa_driver/internals/commands/enums.py +10 -1
  11. xoa_driver/internals/commands/m_commands.py +35 -3
  12. xoa_driver/internals/commands/p_commands.py +12 -10
  13. xoa_driver/internals/commands/pt_commands.py +21 -1
  14. xoa_driver/internals/commands/px_commands.py +1686 -6
  15. xoa_driver/internals/core/transporter/_request_id_counter.py +1 -1
  16. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +3 -1
  17. xoa_driver/internals/core/transporter/protocol/payload/field.py +41 -0
  18. xoa_driver/internals/core/transporter/protocol/payload/types.py +19 -0
  19. xoa_driver/internals/{hli_v1 → hli}/indices/filter/base_filter.py +1 -1
  20. xoa_driver/internals/{hli_v1 → hli}/indices/length_term.py +1 -1
  21. xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/base_macsecsc.py +2 -2
  22. xoa_driver/internals/{hli_v1 → hli}/indices/match_term.py +1 -1
  23. xoa_driver/internals/{hli_v1 → hli}/indices/port_dataset.py +1 -1
  24. xoa_driver/internals/{hli_v1 → hli}/indices/streams/base_stream.py +1 -1
  25. xoa_driver/internals/{hli_v1 → hli}/modules/module_chimera.py +20 -15
  26. xoa_driver/internals/{hli_v1 → hli}/modules/module_l47.py +1 -1
  27. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_combi.py +1 -1
  28. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_d.py +1 -1
  29. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_e.py +1 -1
  30. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_f.py +1 -1
  31. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_g.py +17 -2
  32. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_h.py +1 -1
  33. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_i.py +1 -1
  34. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_j.py +1 -1
  35. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_k.py +1 -1
  36. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l.py +1 -1
  37. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l1.py +1 -1
  38. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_m.py +1 -1
  39. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_n.py +1 -1
  40. xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/module_l23_base.py +18 -12
  41. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23.py +3 -3
  42. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23_genuine.py +4 -4
  43. xoa_driver/internals/hli/ports/port_l23/bases/port_transceiver.py +247 -0
  44. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_transmission_statistics.py +1 -1
  45. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_chimera.py +1 -1
  46. xoa_driver/internals/{hli_v2 → hli}/ports/port_l23/family_g.py +5 -0
  47. xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/port_l23ve.py +2 -2
  48. xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/main.py +2 -2
  49. xoa_driver/internals/{hli_v1 → hli}/testers/l23_tester.py +1 -1
  50. xoa_driver/internals/{hli_v1 → hli}/testers/l47_tester.py +2 -2
  51. xoa_driver/internals/state_storage/modules_state.py +1 -1
  52. xoa_driver/misc.py +12 -17
  53. xoa_driver/modules.py +18 -22
  54. xoa_driver/ports.py +20 -20
  55. xoa_driver/testers.py +4 -8
  56. tdl_xoa_driver-1.2.0.dist-info/RECORD +0 -325
  57. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +0 -117
  58. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +0 -77
  59. xoa_driver/internals/hli_v2/__init__.py +0 -0
  60. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  61. xoa_driver/internals/hli_v2/indices/base_index.py +0 -39
  62. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  63. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +0 -115
  64. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +0 -59
  65. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +0 -71
  66. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +0 -96
  67. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +0 -148
  68. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +0 -89
  69. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +0 -261
  70. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +0 -166
  71. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +0 -112
  72. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +0 -25
  73. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  74. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +0 -50
  75. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +0 -17
  76. xoa_driver/internals/hli_v2/indices/length_term.py +0 -44
  77. xoa_driver/internals/hli_v2/indices/match_term.py +0 -49
  78. xoa_driver/internals/hli_v2/indices/port_dataset.py +0 -53
  79. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  80. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +0 -234
  81. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +0 -32
  82. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  83. xoa_driver/internals/hli_v2/modules/__interfaces.py +0 -21
  84. xoa_driver/internals/hli_v2/modules/base_module.py +0 -125
  85. xoa_driver/internals/hli_v2/modules/module_chimera.py +0 -358
  86. xoa_driver/internals/hli_v2/modules/module_l23ve.py +0 -58
  87. xoa_driver/internals/hli_v2/modules/module_l47.py +0 -230
  88. xoa_driver/internals/hli_v2/modules/module_l47ve.py +0 -8
  89. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  90. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +0 -73
  91. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +0 -75
  92. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +0 -85
  93. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +0 -144
  94. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +0 -84
  95. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +0 -40
  96. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +0 -25
  97. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +0 -25
  98. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +0 -39
  99. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +0 -55
  100. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +0 -797
  101. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +0 -25
  102. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +0 -40
  103. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +0 -339
  104. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  105. xoa_driver/internals/hli_v2/ports/base_port.py +0 -105
  106. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  107. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  108. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +0 -64
  109. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +0 -441
  110. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +0 -172
  111. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +0 -156
  112. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +0 -117
  113. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +0 -59
  114. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  115. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  116. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +0 -15
  117. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +0 -340
  118. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +0 -99
  119. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +0 -36
  120. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +0 -116
  121. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +0 -102
  122. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +0 -113
  123. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +0 -420
  124. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +0 -22
  125. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +0 -22
  126. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +0 -36
  127. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +0 -49
  128. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +0 -96
  129. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +0 -144
  130. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +0 -60
  131. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +0 -66
  132. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +0 -53
  133. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +0 -58
  134. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +0 -67
  135. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +0 -149
  136. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +0 -28
  137. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +0 -22
  138. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +0 -342
  139. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -50
  140. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +0 -65
  141. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +0 -81
  142. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  143. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +0 -146
  144. xoa_driver/internals/hli_v2/ports/port_l47/main.py +0 -137
  145. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +0 -20
  146. xoa_driver/internals/hli_v2/revisions.py +0 -11
  147. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  148. xoa_driver/internals/hli_v2/testers/_base_tester.py +0 -207
  149. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  150. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  151. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +0 -16
  152. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +0 -34
  153. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +0 -50
  154. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +0 -26
  155. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +0 -38
  156. xoa_driver/internals/hli_v2/testers/l23_tester.py +0 -159
  157. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +0 -98
  158. xoa_driver/internals/hli_v2/testers/l47_tester.py +0 -95
  159. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +0 -50
  160. xoa_driver/v2/__init__.py +0 -11
  161. xoa_driver/v2/misc.py +0 -77
  162. xoa_driver/v2/modules.py +0 -308
  163. xoa_driver/v2/ports.py +0 -232
  164. xoa_driver/v2/testers.py +0 -24
  165. {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/licenses/LICENSE +0 -0
  166. {tdl_xoa_driver-1.2.0.dist-info → tdl_xoa_driver-1.4.0.dist-info}/top_level.txt +0 -0
  167. /xoa_driver/internals/{hli_v1 → hli}/__init__.py +0 -0
  168. /xoa_driver/internals/{hli_v1 → hli}/indices/__init__.py +0 -0
  169. /xoa_driver/internals/{hli_v1 → hli}/indices/base_index.py +0 -0
  170. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/__init__.py +0 -0
  171. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/cg.py +0 -0
  172. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/histogram.py +0 -0
  173. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l2.py +0 -0
  174. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l3.py +0 -0
  175. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/raw.py +0 -0
  176. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/replay.py +0 -0
  177. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tcp.py +0 -0
  178. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tls.py +0 -0
  179. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/udp.py +0 -0
  180. /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/user_state.py +0 -0
  181. /xoa_driver/internals/{hli_v1 → hli}/indices/filter/__init__.py +0 -0
  182. /xoa_driver/internals/{hli_v1 → hli}/indices/filter/genuine_filter.py +0 -0
  183. /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/__init__.py +0 -0
  184. /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/genuine_macsecsc.py +0 -0
  185. /xoa_driver/internals/{hli_v1 → hli}/indices/streams/__init__.py +0 -0
  186. /xoa_driver/internals/{hli_v1 → hli}/indices/streams/genuine_stream.py +0 -0
  187. /xoa_driver/internals/{hli_v1 → hli}/modules/__init__.py +0 -0
  188. /xoa_driver/internals/{hli_v1 → hli}/modules/__interfaces.py +0 -0
  189. /xoa_driver/internals/{hli_v1 → hli}/modules/base_module.py +0 -0
  190. /xoa_driver/internals/{hli_v1 → hli}/modules/module_l23ve.py +0 -0
  191. /xoa_driver/internals/{hli_v1 → hli}/modules/module_l47ve.py +0 -0
  192. /xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/__init__.py +0 -0
  193. /xoa_driver/internals/{hli_v1 → hli}/ports/__init__.py +0 -0
  194. /xoa_driver/internals/{hli_v1 → hli}/ports/base_port.py +0 -0
  195. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/__init__.py +0 -0
  196. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/__init__.py +0 -0
  197. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_capture.py +0 -0
  198. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_reception_statistics.py +0 -0
  199. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/__init__.py +0 -0
  200. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  201. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/_utils.py +0 -0
  202. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/general.py +0 -0
  203. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/shadow.py +0 -0
  204. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/working.py +0 -0
  205. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_custom_distribution.py +0 -0
  206. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_distribution.py +0 -0
  207. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_emulation.py +0 -0
  208. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/reception_statistics.py +0 -0
  209. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/transmission_statistics.py +0 -0
  210. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_combi.py +0 -0
  211. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_d.py +0 -0
  212. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_e.py +0 -0
  213. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_f.py +0 -0
  214. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_h.py +0 -0
  215. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_i.py +0 -0
  216. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_j.py +0 -0
  217. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_k.py +0 -0
  218. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l.py +0 -0
  219. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l1.py +0 -0
  220. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_m.py +0 -0
  221. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/fault_jkl.py +0 -0
  222. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/freya_l1.py +0 -0
  223. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ghijkl.py +0 -0
  224. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -0
  225. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_l.py +0 -0
  226. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/__init__.py +0 -0
  227. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/counters.py +0 -0
  228. /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/packet_engine.py +0 -0
  229. /xoa_driver/internals/{hli_v1 → hli}/revisions.py +0 -0
  230. /xoa_driver/internals/{hli_v1 → hli}/testers/__init__.py +0 -0
  231. /xoa_driver/internals/{hli_v1 → hli}/testers/_base_tester.py +0 -0
  232. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/__init__.py +0 -0
  233. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/__init__.py +0 -0
  234. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/health.py +0 -0
  235. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/rest_api.py +0 -0
  236. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/time_keeper.py +0 -0
  237. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/upload_file.py +0 -0
  238. /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/management_interface.py +0 -0
  239. /xoa_driver/internals/{hli_v1 → hli}/testers/l23ve_tester.py +0 -0
  240. /xoa_driver/internals/{hli_v1 → hli}/testers/l47ve_tester.py +0 -0
@@ -1,137 +0,0 @@
1
- import functools
2
- from typing import TYPE_CHECKING
3
- from typing import Self
4
-
5
- from xoa_driver.internals.commands import (
6
- P4_TRAFFIC,
7
- P4_STATE,
8
- P4_CAPABILITIES,
9
- P4_STATE_STATUS,
10
- P4_VLAN_OFFLOAD,
11
- P4_ARP_CONFIG,
12
- P4_NDP_CONFIG,
13
- P4_CAPTURE,
14
- P4_CAPTURE_GET_FIRST,
15
- P4_CAPTURE_GET_NEXT,
16
- P4_TX_PACKET_SIZE,
17
- P4_RX_PACKET_SIZE,
18
- P4_TX_MTU,
19
- P4_RX_MTU,
20
- P4_CLEAR,
21
- P4_SPEEDSELECTION,
22
- P4_MAX_PACKET_RATE,
23
- P4_PCI_INFO,
24
- P4_FW_VER,
25
- P4_DEV_NAME,
26
- P4_PORT_TYPE,
27
- P4_LICENSE_INFO,
28
- P4_APTITUDES,
29
- )
30
- if TYPE_CHECKING:
31
- from xoa_driver.internals.core import interfaces as itf
32
-
33
- from xoa_driver.internals.hli_v2.ports import base_port
34
- from xoa_driver.internals.state_storage import ports_state
35
- from xoa_driver.internals.utils import attributes as utils
36
- from xoa_driver.internals.utils.indices import index_manager as im
37
- from xoa_driver.internals.hli_v2.indices.connection_group.cg import ConnectionGroupIdx
38
-
39
- from .counters import PCounters
40
- from .packet_engine import PacketEngine
41
-
42
-
43
- class PCapture:
44
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
45
- self.start = P4_CAPTURE(conn, module_id, port_id)
46
- self.get_first_frame = P4_CAPTURE_GET_FIRST(conn, module_id, port_id)
47
- self.get_next_frame = P4_CAPTURE_GET_NEXT(conn, module_id, port_id)
48
-
49
-
50
- class PortL47(base_port.BasePort["ports_state.PortL47LocalState"]):
51
- """L47 Port"""
52
-
53
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
54
- super().__init__(conn, module_id, port_id)
55
-
56
- self._local_states = ports_state.PortL47LocalState()
57
-
58
- self.traffic = P4_TRAFFIC(self._conn, module_id, port_id)
59
- """Representation of P4_TRAFFIC"""
60
- self.clear = P4_CLEAR(self._conn, module_id, port_id)
61
- """Representation of P4_CLEAR"""
62
- self.state = P4_STATE(self._conn, module_id, port_id)
63
- """Representation of P4_STATE"""
64
- self.type = P4_PORT_TYPE(self._conn, module_id, port_id)
65
- """Representation of P4_PORT_TYPE"""
66
- self.aptitudes = P4_APTITUDES(self._conn, module_id, port_id)
67
- """Representation of P4_APTITUDES"""
68
- self.last_state_status = P4_STATE_STATUS(self._conn, module_id, port_id)
69
- """Representation of P4_STATE_STATUS"""
70
-
71
- self.nic_name = P4_DEV_NAME(self._conn, module_id, port_id)
72
- """Representation of P4_DEV_NAME"""
73
- self.nic_firmware_version = P4_FW_VER(self._conn, module_id, port_id)
74
- """Representation of P4_FW_VER"""
75
- self.vlan_offload = P4_VLAN_OFFLOAD(self._conn, module_id, port_id)
76
- """Representation of P4_VLAN_OFFLOAD"""
77
-
78
- self.max_packet_rate = P4_MAX_PACKET_RATE(self._conn, module_id, port_id)
79
- """Representation of P4_MAX_PACKET_RATE"""
80
- self.capabilities = P4_CAPABILITIES(self._conn, module_id, port_id)
81
- """Representation of P4_CAPABILITIES"""
82
- self.speed_selection = P4_SPEEDSELECTION(self._conn, module_id, port_id)
83
- """Representation of P4_SPEEDSELECTION"""
84
-
85
- # region Not sure if this commands must be at this level
86
- self.tx_packet_size = P4_TX_PACKET_SIZE(self._conn, module_id, port_id)
87
- """Representation of P4_TX_PACKET_SIZE"""
88
- self.rx_packet_size = P4_RX_PACKET_SIZE(self._conn, module_id, port_id)
89
- """Representation of P4_RX_PACKET_SIZE"""
90
- self.tx_mtu = P4_TX_MTU(self._conn, module_id, port_id)
91
- """Representation of P4_TX_MTU"""
92
- self.rx_mtu = P4_RX_MTU(self._conn, module_id, port_id)
93
- """Representation of P4_RX_MTU"""
94
- # endregion
95
-
96
- self.pci_info = P4_PCI_INFO(self._conn, module_id, port_id)
97
- """Representation of P4_PCI_INFO"""
98
- self.license_info = P4_LICENSE_INFO(self._conn, module_id, port_id)
99
- """Representation of P4_LICENSE_INFO"""
100
-
101
- self.arp_config = P4_ARP_CONFIG(self._conn, module_id, port_id)
102
- """Representation of P4_ARP_CONFIG"""
103
- self.ndp_config = P4_NDP_CONFIG(self._conn, module_id, port_id)
104
- """Representation of P4_NDP_CONFIG"""
105
-
106
- self.capture = PCapture(self._conn, module_id, port_id)
107
- """L47 packet capture"""
108
- self.counters = PCounters(self._conn, module_id, port_id)
109
- """L47 counters"""
110
- self.packet_engine = PacketEngine(self._conn, module_id, port_id)
111
- """L47 packet engine"""
112
-
113
- self.connection_groups: "im.IndexManager[ConnectionGroupIdx]" = im.IndexManager(
114
- self._conn,
115
- ConnectionGroupIdx,
116
- module_id,
117
- port_id
118
- )
119
- """L47 connection group index manager."""
120
-
121
- @property
122
- def info(self) -> ports_state.PortL47LocalState:
123
- return self._local_states
124
-
125
- async def _setup(self) -> Self:
126
- await self._local_states.initiate(self)
127
- self._local_states.register_subscriptions(self)
128
- return self
129
-
130
- on_capabilities_change = functools.partialmethod(utils.on_event, P4_CAPABILITIES)
131
- """Register a callback to the event that the L47 port's capabilities change."""
132
- on_speed_selection_change = functools.partialmethod(utils.on_event, P4_SPEEDSELECTION)
133
- """Register a callback to the event that the L47 port's speed mode changes."""
134
- on_state_change = functools.partialmethod(utils.on_event, P4_STATE)
135
- """Register a callback to the event that the L47 port's state changes."""
136
- on_license_info_change = functools.partialmethod(utils.on_event, P4_LICENSE_INFO)
137
- """Register a callback to the event that the L47 port's license information changes."""
@@ -1,20 +0,0 @@
1
- from xoa_driver.internals.core import interfaces as itf
2
- from xoa_driver.internals.commands import (
3
- P4E_ASSIGN,
4
- P4E_AVAILABLE,
5
- P4E_ALLOCATE,
6
- P4E_ALLOCATION_INFO,
7
- )
8
-
9
-
10
- class PacketEngine:
11
- """L47 port's packet engine."""
12
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
13
- self.assign = P4E_ASSIGN(conn, module_id, port_id)
14
- """Representation of P4E_ASSIGN"""
15
- self.available = P4E_AVAILABLE(conn, module_id, port_id)
16
- """Representation of P4E_AVAILABLE"""
17
- self.allocate = P4E_ALLOCATE(conn, module_id, port_id)
18
- """Representation of P4E_ALLOCATE"""
19
- self.allocation_info = P4E_ALLOCATION_INFO(conn, module_id, port_id)
20
- """Representation of P4E_ALLOCATION_INFO"""
@@ -1,11 +0,0 @@
1
- from functools import partial
2
- from xoa_driver.internals.utils.rev_tool import RegisterModule
3
-
4
- VALKYRIE_MODULES = {}
5
- CHIMERA_MODULES = {}
6
- VULCAN_MODULES = {}
7
-
8
-
9
- register_valkyrie_module = partial(RegisterModule, modules_store=VALKYRIE_MODULES)
10
- register_chimera_module = partial(RegisterModule, modules_store=CHIMERA_MODULES)
11
- register_vulcan_module = partial(RegisterModule, modules_store=VULCAN_MODULES)
File without changes
@@ -1,207 +0,0 @@
1
- from __future__ import annotations
2
- from typing import (
3
- TypeVar,
4
- Awaitable,
5
- Generic,
6
- Callable,
7
- Generator,
8
- Any
9
- )
10
- from abc import (
11
- ABC,
12
- abstractmethod,
13
- )
14
- import functools
15
- from xoa_driver.internals.commands import enums
16
- from xoa_driver.internals.commands import (
17
- C_RESERVATION,
18
- C_DOWN,
19
- C_PASSWORD,
20
- C_TIME,
21
- C_CAPABILITIES,
22
- C_DEBUGLOGS,
23
- C_NAME,
24
- C_MODEL,
25
- C_COMMENT,
26
- C_VERSIONNO,
27
- C_SERIALNO,
28
- C_RESERVEDBY,
29
- )
30
- from xoa_driver.internals.core.funcs import establish_connection
31
- from xoa_driver.internals.core.transporter.handler import TransportationHandler
32
- from xoa_driver.internals.core.transporter.logger import CustomLogger
33
-
34
- from xoa_driver.internals.utils import session
35
- from xoa_driver.internals.state_storage import testers_state
36
-
37
-
38
- T = TypeVar('T', bound="BaseTester")
39
- TesterStateStorage = TypeVar('TesterStateStorage', bound="testers_state.TesterLocalState")
40
-
41
-
42
- # min version = rel v83.2 eq fw v446.5
43
- class BaseTester(ABC, Generic[TesterStateStorage]):
44
- """
45
- Basic Tester class of APIv2.
46
-
47
- :param host: tester's address/hostname
48
- :type host: str
49
- :param username: username of the user
50
- :type username: str
51
- :param password: login password of the tester, defaults to "xena"
52
- :type password: str, optional
53
- :param port: the port number for connection establishment, default to 22606
54
- :type port: int, optional
55
- :param enable_logging: `True` if debug log output from the tester is needed, and `False` otherwise
56
- :type enable_logging: bool
57
- :param custom_logger: `None` allow to specify logger with custom configurations
58
- :type enable_logging: CustomLogger | None
59
- :param session_timeout: `130` Session timeout in seconds
60
- :type session_timeout: int
61
- """
62
-
63
- 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:
64
- self.__host = host
65
- self.__port = port
66
- self._conn = TransportationHandler(
67
- enable_logging=enable_logging,
68
- custom_logger=custom_logger
69
- )
70
- self.session = session.TesterSession(
71
- self._conn,
72
- username,
73
- password=password,
74
- timeout_seconds=session_timeout,
75
- keepalive=True,
76
- )
77
- """
78
- Current management session
79
- """
80
-
81
- self.name = C_NAME(self._conn)
82
- """
83
- Tester's name.
84
- Representation of C_NAME
85
- """
86
-
87
- self.comment = C_COMMENT(self._conn)
88
- """Description of the tester.
89
- Representation of C_COMMENT
90
- """
91
-
92
- self.model = C_MODEL(self._conn)
93
- """Tester's model.
94
- Representation of C_MODEL
95
- """
96
-
97
- self.version_no = C_VERSIONNO(self._conn)
98
- """Tester's version number.
99
- Representation of C_VERSIONNO
100
- """
101
-
102
- self.serial_no = C_SERIALNO(self._conn)
103
- """Tester's serial number.
104
- Representation of C_SERIALNO
105
- """
106
-
107
- self.reservation = C_RESERVATION(self._conn)
108
- """Tester's reservation operation.
109
- Representation of C_RESERVATION
110
- """
111
-
112
- self.reserved_by = C_RESERVEDBY(self._conn)
113
- """Tester's reservation status.
114
- Representation of C_RESERVEDBY
115
- """
116
-
117
- self.down = C_DOWN(self._conn)
118
- """Shut down the tester.
119
- Representation of C_DOWN
120
- """
121
-
122
- self.password = C_PASSWORD(self._conn)
123
- """Tester's password.
124
- Representation of C_PASSWORD
125
- """
126
-
127
- self.time = C_TIME(self._conn)
128
- """Tester's time in seconds.
129
- Representation of C_TIME
130
- """
131
-
132
- self.capabilities = C_CAPABILITIES(self._conn)
133
- """Tester's capabilities.
134
- Representation of C_CAPABILITIES
135
- """
136
-
137
- self.debug_log = C_DEBUGLOGS(self._conn)
138
- """Tester's debug log.
139
- Representation of C_DEBUGLOGS
140
- """
141
-
142
- async def __aenter__(self: Awaitable[T]) -> T:
143
- return await self
144
-
145
- async def __aexit__(self, type, value, traceback) -> None:
146
- await self.session.logoff()
147
-
148
- def __await__(self: T) -> Generator[Any, None, T]:
149
- if self.session.is_online:
150
- async def skip():
151
- return self
152
- return skip().__await__()
153
- return self._setup().__await__()
154
-
155
- async def _setup(self: T) -> T:
156
- await establish_connection(self._conn, self.__host, self.__port)
157
- await self.session.logon()
158
- return self
159
-
160
- def __is_reservation(self, reserved_status: enums.ReservedStatus) -> bool:
161
- return self.info.reservation == reserved_status
162
-
163
- is_released = functools.partialmethod(__is_reservation, enums.ReservedStatus.RELEASED)
164
- """Validate if the tester is released.
165
- """
166
-
167
- is_reserved_by_me = functools.partialmethod(__is_reservation, enums.ReservedStatus.RESERVED_BY_YOU)
168
- """Validate if the tester is reserved by my connection.
169
- """
170
-
171
- @property
172
- @abstractmethod
173
- def info(self) -> TesterStateStorage:
174
- """
175
- Tester's local information.
176
- """
177
- raise NotImplementedError()
178
-
179
- # region Events
180
-
181
- # We are not supporting Subscription on Connection made, coz Connection is happens at Awaiting of instance
182
- # but subscription only registered after instance is already created, means already connected,
183
- # means On_connected event will never b called, it's can be twiked, but then Creating process of tester instance
184
- # will be less intuitive, and in one case subscription will work while in another not.
185
-
186
- def on_disconnected(self, callback: "Callable") -> None:
187
- """
188
- Register a callback which will be called at the time when connection will be closed.
189
- """
190
-
191
- self._conn.on_disconnected(callback)
192
-
193
- def on_reservation_change(self, callback: "Callable") -> None:
194
- """
195
- Register an callback function to C_RESERVATION event.
196
- """
197
-
198
- self._conn.subscribe(C_RESERVATION, callback)
199
-
200
- def on_reserved_by_change(self, callback: "Callable") -> None:
201
- """
202
- Register an callback function to C_RESERVEDBY event.
203
- """
204
-
205
- self._conn.subscribe(C_RESERVEDBY, callback)
206
-
207
- # endregion
File without changes
@@ -1,16 +0,0 @@
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"""
@@ -1,34 +0,0 @@
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
- Representation of C_RESTPORT
19
- """
20
-
21
- self.enable = C_RESTENABLE(conn)
22
- """Enable the REST server.
23
- Representation of C_RESTENABLE
24
- """
25
-
26
- self.status = C_RESTSTATUS(conn)
27
- """Status of the REST server.
28
- Representation of C_RESTSTATUS
29
- """
30
-
31
- self.control = C_RESTCONTROL(conn)
32
- """Control the REST server.
33
- Representation of C_RESTCONTROL
34
- """
@@ -1,50 +0,0 @@
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
- Representation of C_TKLICFILE
20
- """
21
-
22
- self.license_state = C_TKLICSTATE(conn)
23
- """State of TimeKeeper license file content.
24
- Representation of C_TKLICSTATE
25
- """
26
-
27
- self.status = C_TKSTATUS(conn)
28
- """Version and status of TimeKeeper.
29
- Representation of C_TKSTATUS
30
- """
31
-
32
- self.status_extended = C_TKSTATUSEXT(conn)
33
- """Version and status of TimeKeeper (extended).
34
- Representation of C_TKSTATUSEXT
35
- """
36
-
37
- self.svc_state = C_TKSVCSTATE(conn)
38
- """TimeKeeper service state.
39
- Representation of C_TKSVCSTATE
40
- """
41
-
42
- self.gps_state = C_TKGPSSTATE(conn)
43
- """TimeKeeper GPS state.
44
- Representation of C_TKGPSSTATE
45
- """
46
-
47
- self.config_file = C_TKCONFIG(conn)
48
- """TimeKeeper configuration file content.
49
- Representation of C_TKCONFIG
50
- """
@@ -1,26 +0,0 @@
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
- Representation of C_FILESTART
16
- """
17
-
18
- self.data = C_FILEDATA(conn)
19
- """Uploading a file fragment.
20
- Representation of C_FILEDATA
21
- """
22
-
23
- self.finish = C_FILEFINISH(conn)
24
- """Finish uploading file.
25
- Representation of C_FILEFINISH
26
- """
@@ -1,38 +0,0 @@
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
- Representation of C_IPADDRESS
20
- """
21
-
22
- self.dhcp = C_DHCP(conn)
23
- """
24
- Chassis management port IP address configuration with DHCP.
25
- Representation of C_DHCP
26
- """
27
-
28
- self.macaddress = C_MACADDRESS(conn)
29
- """
30
- Chassis management port MAC address.
31
- Representation of C_MACADDRESS
32
- """
33
-
34
- self.hostname = C_HOSTNAME(conn)
35
- """
36
- Chassis management hostname.
37
- Representation of C_HOSTNAME
38
- """