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,99 +0,0 @@
1
- from typing import (
2
- TYPE_CHECKING,
3
- Dict,
4
- Type,
5
- Union
6
- )
7
- if TYPE_CHECKING:
8
- from xoa_driver.internals.core import interfaces as itf
9
- from xoa_driver.internals.commands.enums import (
10
- FilterType,
11
- ProtocolOption,
12
- FilterMode,
13
- )
14
- from xoa_driver.internals.commands import (
15
- PEF_INIT,
16
- PEF_APPLY,
17
- PEF_ENABLE,
18
- PEF_PROTOCOL,
19
- PEF_MODE,
20
- PEF_CANCEL,
21
- )
22
- from . import general
23
-
24
-
25
- class ModeExtendedS(general.ModeExtended):
26
- async def use_segments(self, *segments: ProtocolOption) -> None:
27
- segments_payload = [
28
- ProtocolOption.ETHERNET,
29
- *segments
30
- ]
31
- await PEF_PROTOCOL(
32
- self._conn,
33
- self._module_id,
34
- self._port_id,
35
- self._flow_index,
36
- self._filter_type
37
- ).set(segments_payload)
38
-
39
-
40
- class FilterDefinitionShadow:
41
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
42
- self._conn = conn
43
- self._module_id = module_id
44
- self._port_id = port_id
45
- self._flow_index = flow_index
46
- self._filter_type = FilterType.SHADOW
47
-
48
- self.initiating = PEF_INIT(conn, module_id, port_id, flow_index)
49
- """Preparing filter definition.
50
- Representation of PEF_INIT
51
- """
52
- self.apply = PEF_APPLY(conn, module_id, port_id, flow_index)
53
- """Apply filter definition.
54
- Representation of PEF_APPLY
55
- """
56
- self.enable = PEF_ENABLE(conn, module_id, port_id, flow_index, self._filter_type)
57
- """Enabling the filter.
58
- Representation of PEF_ENABLE
59
- """
60
- self.cancel = PEF_CANCEL(conn, module_id, port_id, flow_index)
61
- """Cancel changes made to Shadow and restores them to the ones in Working.
62
- Representation of PEF_CANCEL
63
- """
64
- # self.mode = PEF_MODE(conn, module_id, port_id, flow_index, self._filter_type)
65
- # """Filter mode.
66
- # Representation of PEF_MODE`
67
- # """
68
-
69
- async def get_mode(self) -> Union[general.ModeBasic, ModeExtendedS]:
70
- mode_types: Dict[FilterMode, Type[Union[general.ModeBasic, ModeExtendedS]]] = {
71
- FilterMode.BASIC: general.ModeBasic,
72
- FilterMode.EXTENDED: ModeExtendedS,
73
- }
74
- return await general.get_mode(
75
- self._conn,
76
- self._module_id,
77
- self._port_id,
78
- self._flow_index,
79
- self._filter_type,
80
- mode_types
81
- )
82
-
83
- async def use_basic_mode(self) -> None:
84
- await PEF_MODE(
85
- self._conn,
86
- self._module_id,
87
- self._port_id,
88
- self._flow_index,
89
- self._filter_type,
90
- ).set_basic()
91
-
92
- async def use_extended_mode(self) -> None:
93
- await PEF_MODE(
94
- self._conn,
95
- self._module_id,
96
- self._port_id,
97
- self._flow_index,
98
- self._filter_type,
99
- ).set_extended()
@@ -1,36 +0,0 @@
1
- from typing import (
2
- Dict,
3
- Type,
4
- Union,
5
- TYPE_CHECKING
6
- )
7
- if TYPE_CHECKING:
8
- from xoa_driver.internals.core import interfaces as itf
9
- from xoa_driver.internals.commands.enums import (
10
- FilterType,
11
- FilterMode,
12
- )
13
- from . import general
14
-
15
-
16
- class FilterDefinitionWorking:
17
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int) -> None:
18
- self._conn = conn
19
- self._module_id = module_id
20
- self._port_id = port_id
21
- self._flow_index = flow_index
22
- self._filter_type = FilterType.WORKING
23
-
24
- async def get_mode(self) -> Union[general.ModeBasic, general.ModeExtended]:
25
- mode_types: Dict[FilterMode, Type[Union[general.ModeBasic, general.ModeExtended]]] = {
26
- FilterMode.BASIC: general.ModeBasic,
27
- FilterMode.EXTENDED: general.ModeExtended,
28
- }
29
- return await general.get_mode(
30
- self._conn,
31
- self._module_id,
32
- self._port_id,
33
- self._flow_index,
34
- self._filter_type,
35
- mode_types
36
- )
@@ -1,116 +0,0 @@
1
- from typing import (
2
- TYPE_CHECKING,
3
- Dict,
4
- List,
5
- )
6
- from collections import UserDict
7
- if TYPE_CHECKING:
8
- from xoa_driver.internals.core import interfaces as itf
9
- from xoa_driver.internals.commands import (
10
- PEC_INDICES,
11
- PEC_VAL,
12
- PEC_COMMENT,
13
- PEC_DELETE,
14
- PEC_DISTTYPE,
15
- )
16
-
17
- from xoa_driver.internals.utils.indices import observer
18
- from xoa_driver.enums import OnOff
19
-
20
-
21
- class CustomDistribution:
22
- """Custom distribution"""
23
-
24
- def __init__(self, observer: "observer.IndicesObserver", conn: "itf.IConnection", module_id: int, port_id: int, custom_distribution_index: int) -> None:
25
- self.__observer = observer
26
- self.__conn = conn
27
- self.__module_id = module_id
28
- self.__port_id = port_id
29
- self.custom_distribution_index = custom_distribution_index
30
- self.definition = PEC_VAL(conn, module_id, port_id, custom_distribution_index)
31
- """Custom distribution definition.
32
- Representation of PEC_VAL
33
- """
34
-
35
- self.comment = PEC_COMMENT(conn, module_id, port_id, custom_distribution_index)
36
- """Custom distribution description.
37
- Representation of PEC_COMMENT
38
- """
39
-
40
- self.type = PEC_DISTTYPE(conn, module_id, port_id, custom_distribution_index)
41
- """Custom distribution type.
42
- Representation of PEC_DISTTYPE
43
- """
44
-
45
- async def delete(self) -> None:
46
- """
47
- Deleting an existing Custom Distribution
48
- """
49
-
50
- await PEC_DELETE(
51
- self.__conn,
52
- self.__module_id,
53
- self.__port_id,
54
- self.custom_distribution_index
55
- ).set()
56
- self.__observer.notify(observer.IndexEvents.DEL, self)
57
-
58
-
59
- class CustomDistributions(UserDict):
60
- """Custom distributions"""
61
-
62
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
63
- self.__conn = conn
64
- self.__module_id = module_id
65
- self.__port_id = port_id
66
- self.data: Dict[int, CustomDistribution] = {}
67
- self.__observer = observer.IndicesObserver()
68
- self.__observer.subscribe(
69
- observer.IndexEvents.DEL,
70
- self.__remove_from_slot
71
- )
72
-
73
- async def server_sync(self) -> None:
74
- """Sync the indices with xenaserver"""
75
- _resp = await PEC_INDICES(self.__conn, self.__module_id, self.__port_id).get()
76
- self.data = {
77
- idx: CustomDistribution(
78
- self.__observer,
79
- self.__conn,
80
- self.__module_id,
81
- self.__port_id,
82
- idx
83
- )
84
- for idx in _resp.indexations
85
- }
86
-
87
- def __remove_from_slot(self, index_inst: "CustomDistribution") -> None:
88
- # throws ValueError if element is not exists in list of indices
89
- del self.data[index_inst.custom_distribution_index]
90
-
91
- def __setitem__(self, key, value):
92
- raise NotImplementedError("Only support assign item by 'add' method")
93
-
94
- async def remove(self, custom_distribution_index: int) -> None:
95
- """Remove a index from port"""
96
- await self.data[custom_distribution_index].delete()
97
-
98
- async def __get_available_custom_distribution_index(self) -> int:
99
- await self.server_sync()
100
- if len(self.keys()) == 40:
101
- raise ValueError("The server was full of custom distributions.")
102
- return next(i for i in range(1, 41) if i not in self.keys())
103
-
104
- async def add(self, linear: OnOff, entry_count: int, data_x: List[int], comment: str) -> "CustomDistribution":
105
- cdi = await self.__get_available_custom_distribution_index()
106
- cd = CustomDistribution(
107
- self.__observer,
108
- self.__conn,
109
- self.__module_id,
110
- self.__port_id,
111
- custom_distribution_index=cdi,
112
- )
113
- await cd.definition.set(linear=linear, symmetric=OnOff.OFF, entry_count=entry_count, data_x=data_x)
114
- await cd.comment.set(comment)
115
- self.data[cdi] = cd
116
- return cd
@@ -1,102 +0,0 @@
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 ImpairmentDistribution:
28
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, flow_index: int, impairment_type_index: "ImpairmentTypeIndex") -> None:
29
- self.off = PED_OFF(conn, module_id, port_id, flow_index, impairment_type_index)
30
- """Impairments Distribution to OFF.
31
- Representation of PED_OFF
32
- """
33
-
34
- self.fixed_rate = PED_FIXED(conn, module_id, port_id, flow_index, impairment_type_index)
35
- """Fixed Rate distribution configuration.
36
- Representation of PED_FIXED
37
- """
38
-
39
- self.random_rate = PED_RANDOM(conn, module_id, port_id, flow_index, impairment_type_index)
40
- """Random Rate distribution configuration.
41
- Representation of PED_RANDOM
42
- """
43
-
44
- self.bit_error_rate = PED_BER(conn, module_id, port_id, flow_index, impairment_type_index)
45
- """Bit Error Rate distribution configuration.
46
- Representation of PED_BER
47
- """
48
-
49
- self.random_burst = PED_RANDOMBURST(conn, module_id, port_id, flow_index, impairment_type_index)
50
- """Random Burst configuration.
51
- Representation of PED_RANDOMBURST
52
- """
53
-
54
- self.ge = PED_GE(conn, module_id, port_id, flow_index, impairment_type_index)
55
- """Gilbert-Elliot distribution configuration.
56
- Representation of PED_GE
57
- """
58
-
59
- self.uniform = PED_UNI(conn, module_id, port_id, flow_index, impairment_type_index)
60
- """Uniform distribution configuration.
61
- Representation of PED_UNI
62
- """
63
-
64
- self.gaussian = PED_GAUSS(conn, module_id, port_id, flow_index, impairment_type_index)
65
- """Gaussian distribution configuration.
66
- Representation of PED_GAUSS
67
- """
68
-
69
- self.poisson = PED_POISSON(conn, module_id, port_id, flow_index, impairment_type_index)
70
- """Poisson distribution configuration.
71
- Representation of PED_POISSON
72
- """
73
-
74
- self.gamma = PED_GAMMA(conn, module_id, port_id, flow_index, impairment_type_index)
75
- """Gamma distribution configuration.
76
- Representation of PED_GAMMA
77
- """
78
-
79
- self.custom = PED_CUST(conn, module_id, port_id, flow_index, impairment_type_index)
80
- """Associate a custom distribution to a flow and impairment type.
81
- Representation of PED_CUST
82
- """
83
-
84
- self.constant_delay = PED_CONST(conn, module_id, port_id, flow_index, impairment_type_index)
85
- """Constant Delay distribution configuration.
86
- Representation of PED_CONST
87
- """
88
-
89
- self.accumulate_and_burst = PED_ACCBURST(conn, module_id, port_id, flow_index, impairment_type_index)
90
- """Accumulate & Burst distribution configuration.
91
- Representation of PED_ACCBURST
92
- """
93
-
94
- self.step = PED_STEP(conn, module_id, port_id, flow_index, impairment_type_index)
95
- """Step distribution configuration.
96
- Representation of PED_STEP
97
- """
98
-
99
- self.fixed_burst = PED_FIXEDBURST(conn, module_id, port_id, flow_index, impairment_type_index)
100
- """Fixed Burst distribution configuration.
101
- Representation of PED_FIXEDBURST
102
- """
@@ -1,113 +0,0 @@
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_v2.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
- Representation of P_CAPABILITIES
33
- """
34
-
35
- self.capabilities_ext = P_CAPABILITIES_EXT(conn, module_id, port_id)
36
- """Chimera port capabilities ext.
37
-
38
- Representation of P_CAPABILITIES_EXT
39
- """
40
-
41
- self.interface = P_INTERFACE(conn, module_id, port_id)
42
- """Physical interface type of the Chimera port.
43
- Representation of P_INTERFACE
44
- """
45
-
46
- self.status = P_STATUS(conn, module_id, port_id)
47
- """Chimera port's received optical signal level'.
48
- Representation of P_STATUS
49
- """
50
-
51
- self.tx_enable = P_TXENABLE(conn, module_id, port_id)
52
- """Enabling Chimera port TX.
53
- Representation of P_TXENABLE
54
- """
55
-
56
- self.load_mode = P_LOADMODE(conn, module_id, port_id)
57
- """Load mode of the Chimera port.
58
- Representation of P_LOADMODE
59
- """
60
-
61
- self.emulation = ChimeraPE(self._conn, *self.kind)
62
- """Chimera Port Emulation"""
63
-
64
- self.emulate = P_EMULATE(conn, module_id, port_id)
65
- """Chimera port emulation control.
66
- Representation of P_EMULATE
67
- """
68
-
69
- self.custom_distributions = CustomDistributions(conn, module_id, port_id)
70
- """Custom distributions."""
71
-
72
- self.pcs_pma = PcsPma(conn, self)
73
- """"PCS/PMA settings."""
74
-
75
- self._local_states = ports_state.PortChimeraLocalState()
76
- """Local states of the Chimera port."""
77
-
78
- @property
79
- def info(self) -> ports_state.PortChimeraLocalState:
80
- return self._local_states
81
-
82
- async def _setup(self):
83
- await asyncio.gather(
84
- self._local_states.initiate(self),
85
- self.custom_distributions.server_sync(),
86
- self.emulation
87
- )
88
- self._local_states.register_subscriptions(self)
89
- return self
90
-
91
- on_interface_change = functools.partialmethod(utils.on_event, P_INTERFACE)
92
- """Register a callback to the event that the port's interface type changes."""
93
-
94
- on_emulate_change = functools.partialmethod(utils.on_event, P_EMULATE)
95
- """Register a callback to the event that the port's emulation state changes."""
96
-
97
-
98
- class PChi100G5S2P(PortChimera):
99
- """Impairment port on Chi-100G-5S-2P module.
100
- """
101
- ...
102
-
103
-
104
- class PChi100G5S2P_b(PortChimera):
105
- """Impairment port on Chi-100G-5S-2P[b] module.
106
- """
107
- ...
108
-
109
-
110
- class PChi40G2S2P(PortChimera):
111
- """Impairment port on Chi-40G-2S-2P module.
112
- """
113
- ...