tdl-xoa-driver 1.0.0b1__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 (325) hide show
  1. tdl_xoa_driver-1.0.0b1.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0b1.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0b1.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0b1.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0b1.dist-info/top_level.txt +1 -0
  6. xoa_driver/__init__.py +2 -0
  7. xoa_driver/enums.py +399 -0
  8. xoa_driver/exceptions.py +77 -0
  9. xoa_driver/functions/__init__.py +0 -0
  10. xoa_driver/functions/anlt.py +744 -0
  11. xoa_driver/functions/anlt_ll_debug.py +429 -0
  12. xoa_driver/functions/cli.py +581 -0
  13. xoa_driver/functions/exceptions.py +72 -0
  14. xoa_driver/functions/headers.py +608 -0
  15. xoa_driver/functions/mgmt.py +515 -0
  16. xoa_driver/functions/tools.py +256 -0
  17. xoa_driver/hlfuncs.py +18 -0
  18. xoa_driver/internals/__init__.py +0 -0
  19. xoa_driver/internals/commands/__init__.py +31 -0
  20. xoa_driver/internals/commands/c_commands.py +2041 -0
  21. xoa_driver/internals/commands/enums.py +3289 -0
  22. xoa_driver/internals/commands/m4_commands.py +700 -0
  23. xoa_driver/internals/commands/m4e_commands.py +107 -0
  24. xoa_driver/internals/commands/m_commands.py +1875 -0
  25. xoa_driver/internals/commands/p4_commands.py +2221 -0
  26. xoa_driver/internals/commands/p4e_commands.py +160 -0
  27. xoa_driver/internals/commands/p4g_commands.py +7253 -0
  28. xoa_driver/internals/commands/p_commands.py +6000 -0
  29. xoa_driver/internals/commands/pc_commands.py +335 -0
  30. xoa_driver/internals/commands/pd_commands.py +355 -0
  31. xoa_driver/internals/commands/pe_commands.py +1018 -0
  32. xoa_driver/internals/commands/pec_commands.py +265 -0
  33. xoa_driver/internals/commands/ped_commands.py +1034 -0
  34. xoa_driver/internals/commands/pef_commands.py +2216 -0
  35. xoa_driver/internals/commands/pf_commands.py +379 -0
  36. xoa_driver/internals/commands/pl1_commands.py +1588 -0
  37. xoa_driver/internals/commands/pl_commands.py +178 -0
  38. xoa_driver/internals/commands/pm_commands.py +256 -0
  39. xoa_driver/internals/commands/pp_commands.py +2341 -0
  40. xoa_driver/internals/commands/pr_commands.py +812 -0
  41. xoa_driver/internals/commands/ps_commands.py +2311 -0
  42. xoa_driver/internals/commands/pt_commands.py +370 -0
  43. xoa_driver/internals/commands/px_commands.py +303 -0
  44. xoa_driver/internals/commands/subtypes.py +86 -0
  45. xoa_driver/internals/core/__init__.py +0 -0
  46. xoa_driver/internals/core/builders.py +39 -0
  47. xoa_driver/internals/core/exceptions.py +69 -0
  48. xoa_driver/internals/core/funcs.py +81 -0
  49. xoa_driver/internals/core/funcs.pyi +1072 -0
  50. xoa_driver/internals/core/interfaces.py +47 -0
  51. xoa_driver/internals/core/token.py +44 -0
  52. xoa_driver/internals/core/transporter/__init__.py +0 -0
  53. xoa_driver/internals/core/transporter/_processor.py +83 -0
  54. xoa_driver/internals/core/transporter/_publisher.py +101 -0
  55. xoa_driver/internals/core/transporter/_request_id_counter.py +28 -0
  56. xoa_driver/internals/core/transporter/_stream.py +99 -0
  57. xoa_driver/internals/core/transporter/_typings.py +43 -0
  58. xoa_driver/internals/core/transporter/exceptions.py +44 -0
  59. xoa_driver/internals/core/transporter/handler.py +127 -0
  60. xoa_driver/internals/core/transporter/logger/__init__.py +10 -0
  61. xoa_driver/internals/core/transporter/logger/__logger.py +94 -0
  62. xoa_driver/internals/core/transporter/logger/__state_off.py +32 -0
  63. xoa_driver/internals/core/transporter/logger/__state_on_default.py +70 -0
  64. xoa_driver/internals/core/transporter/logger/__state_on_loguru.py +51 -0
  65. xoa_driver/internals/core/transporter/logger/__state_on_user.py +48 -0
  66. xoa_driver/internals/core/transporter/protocol/__init__.py +0 -0
  67. xoa_driver/internals/core/transporter/protocol/_constants.py +77 -0
  68. xoa_driver/internals/core/transporter/protocol/_utils.py +59 -0
  69. xoa_driver/internals/core/transporter/protocol/exceptions.py +271 -0
  70. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +70 -0
  71. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +283 -0
  72. xoa_driver/internals/core/transporter/protocol/payload/descriptor.py +119 -0
  73. xoa_driver/internals/core/transporter/protocol/payload/exceptions.py +20 -0
  74. xoa_driver/internals/core/transporter/protocol/payload/field.py +296 -0
  75. xoa_driver/internals/core/transporter/protocol/payload/types.py +173 -0
  76. xoa_driver/internals/core/transporter/protocol/payload/utils.py +53 -0
  77. xoa_driver/internals/core/transporter/protocol/struct_header.py +123 -0
  78. xoa_driver/internals/core/transporter/protocol/struct_request.py +65 -0
  79. xoa_driver/internals/core/transporter/protocol/struct_response.py +89 -0
  80. xoa_driver/internals/core/transporter/registry.py +43 -0
  81. xoa_driver/internals/exceptions/__init__.py +9 -0
  82. xoa_driver/internals/exceptions/modules.py +13 -0
  83. xoa_driver/internals/exceptions/testers.py +21 -0
  84. xoa_driver/internals/hli_v1/__init__.py +0 -0
  85. xoa_driver/internals/hli_v1/indices/__init__.py +0 -0
  86. xoa_driver/internals/hli_v1/indices/base_index.py +39 -0
  87. xoa_driver/internals/hli_v1/indices/connection_group/__init__.py +0 -0
  88. xoa_driver/internals/hli_v1/indices/connection_group/cg.py +186 -0
  89. xoa_driver/internals/hli_v1/indices/connection_group/histogram.py +78 -0
  90. xoa_driver/internals/hli_v1/indices/connection_group/l2.py +94 -0
  91. xoa_driver/internals/hli_v1/indices/connection_group/l3.py +130 -0
  92. xoa_driver/internals/hli_v1/indices/connection_group/raw.py +200 -0
  93. xoa_driver/internals/hli_v1/indices/connection_group/replay.py +109 -0
  94. xoa_driver/internals/hli_v1/indices/connection_group/tcp.py +314 -0
  95. xoa_driver/internals/hli_v1/indices/connection_group/tls.py +198 -0
  96. xoa_driver/internals/hli_v1/indices/connection_group/udp.py +133 -0
  97. xoa_driver/internals/hli_v1/indices/connection_group/user_state.py +28 -0
  98. xoa_driver/internals/hli_v1/indices/filter/__init__.py +0 -0
  99. xoa_driver/internals/hli_v1/indices/filter/base_filter.py +65 -0
  100. xoa_driver/internals/hli_v1/indices/filter/genuine_filter.py +20 -0
  101. xoa_driver/internals/hli_v1/indices/length_term.py +49 -0
  102. xoa_driver/internals/hli_v1/indices/macsecscs/__init__.py +0 -0
  103. xoa_driver/internals/hli_v1/indices/macsecscs/base_macsecsc.py +224 -0
  104. xoa_driver/internals/hli_v1/indices/macsecscs/genuine_macsecsc.py +72 -0
  105. xoa_driver/internals/hli_v1/indices/match_term.py +64 -0
  106. xoa_driver/internals/hli_v1/indices/port_dataset.py +72 -0
  107. xoa_driver/internals/hli_v1/indices/streams/__init__.py +0 -0
  108. xoa_driver/internals/hli_v1/indices/streams/base_stream.py +405 -0
  109. xoa_driver/internals/hli_v1/indices/streams/genuine_stream.py +64 -0
  110. xoa_driver/internals/hli_v1/modules/__init__.py +0 -0
  111. xoa_driver/internals/hli_v1/modules/__interfaces.py +21 -0
  112. xoa_driver/internals/hli_v1/modules/base_module.py +138 -0
  113. xoa_driver/internals/hli_v1/modules/module_chimera.py +366 -0
  114. xoa_driver/internals/hli_v1/modules/module_l23ve.py +73 -0
  115. xoa_driver/internals/hli_v1/modules/module_l47.py +397 -0
  116. xoa_driver/internals/hli_v1/modules/module_l47ve.py +9 -0
  117. xoa_driver/internals/hli_v1/modules/modules_l23/__init__.py +0 -0
  118. xoa_driver/internals/hli_v1/modules/modules_l23/family_combi.py +83 -0
  119. xoa_driver/internals/hli_v1/modules/modules_l23/family_d.py +75 -0
  120. xoa_driver/internals/hli_v1/modules/modules_l23/family_e.py +85 -0
  121. xoa_driver/internals/hli_v1/modules/modules_l23/family_f.py +145 -0
  122. xoa_driver/internals/hli_v1/modules/modules_l23/family_g.py +84 -0
  123. xoa_driver/internals/hli_v1/modules/modules_l23/family_h.py +40 -0
  124. xoa_driver/internals/hli_v1/modules/modules_l23/family_i.py +25 -0
  125. xoa_driver/internals/hli_v1/modules/modules_l23/family_j.py +25 -0
  126. xoa_driver/internals/hli_v1/modules/modules_l23/family_k.py +39 -0
  127. xoa_driver/internals/hli_v1/modules/modules_l23/family_l.py +55 -0
  128. xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py +800 -0
  129. xoa_driver/internals/hli_v1/modules/modules_l23/family_m.py +25 -0
  130. xoa_driver/internals/hli_v1/modules/modules_l23/family_n.py +40 -0
  131. xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +383 -0
  132. xoa_driver/internals/hli_v1/ports/__init__.py +0 -0
  133. xoa_driver/internals/hli_v1/ports/base_port.py +125 -0
  134. xoa_driver/internals/hli_v1/ports/port_l23/__init__.py +0 -0
  135. xoa_driver/internals/hli_v1/ports/port_l23/bases/__init__.py +0 -0
  136. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_capture.py +70 -0
  137. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +527 -0
  138. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23_genuine.py +229 -0
  139. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_reception_statistics.py +231 -0
  140. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +117 -0
  141. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transmission_statistics.py +131 -0
  142. xoa_driver/internals/hli_v1/ports/port_l23/chimera/__init__.py +0 -0
  143. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  144. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  145. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/general.py +396 -0
  146. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/shadow.py +104 -0
  147. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/working.py +36 -0
  148. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_custom_distribution.py +125 -0
  149. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_distribution.py +174 -0
  150. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_chimera.py +119 -0
  151. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_emulation.py +244 -0
  152. xoa_driver/internals/hli_v1/ports/port_l23/chimera/reception_statistics.py +24 -0
  153. xoa_driver/internals/hli_v1/ports/port_l23/chimera/transmission_statistics.py +24 -0
  154. xoa_driver/internals/hli_v1/ports/port_l23/family_combi.py +37 -0
  155. xoa_driver/internals/hli_v1/ports/port_l23/family_d.py +51 -0
  156. xoa_driver/internals/hli_v1/ports/port_l23/family_e.py +107 -0
  157. xoa_driver/internals/hli_v1/ports/port_l23/family_f.py +151 -0
  158. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +77 -0
  159. xoa_driver/internals/hli_v1/ports/port_l23/family_h.py +67 -0
  160. xoa_driver/internals/hli_v1/ports/port_l23/family_i.py +84 -0
  161. xoa_driver/internals/hli_v1/ports/port_l23/family_j.py +68 -0
  162. xoa_driver/internals/hli_v1/ports/port_l23/family_k.py +73 -0
  163. xoa_driver/internals/hli_v1/ports/port_l23/family_l.py +82 -0
  164. xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py +166 -0
  165. xoa_driver/internals/hli_v1/ports/port_l23/family_m.py +29 -0
  166. xoa_driver/internals/hli_v1/ports/port_l23/fault_jkl.py +24 -0
  167. xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +722 -0
  168. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ghijkl.py +369 -0
  169. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ijkl_chimera.py +60 -0
  170. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_l.py +78 -0
  171. xoa_driver/internals/hli_v1/ports/port_l23/port_l23ve.py +101 -0
  172. xoa_driver/internals/hli_v1/ports/port_l47/__init__.py +0 -0
  173. xoa_driver/internals/hli_v1/ports/port_l47/counters.py +174 -0
  174. xoa_driver/internals/hli_v1/ports/port_l47/main.py +228 -0
  175. xoa_driver/internals/hli_v1/ports/port_l47/packet_engine.py +31 -0
  176. xoa_driver/internals/hli_v1/revisions.py +11 -0
  177. xoa_driver/internals/hli_v1/testers/__init__.py +0 -0
  178. xoa_driver/internals/hli_v1/testers/_base_tester.py +259 -0
  179. xoa_driver/internals/hli_v1/testers/genuine/__init__.py +0 -0
  180. xoa_driver/internals/hli_v1/testers/genuine/l_23/__init__.py +0 -0
  181. xoa_driver/internals/hli_v1/testers/genuine/l_23/health.py +16 -0
  182. xoa_driver/internals/hli_v1/testers/genuine/l_23/rest_api.py +38 -0
  183. xoa_driver/internals/hli_v1/testers/genuine/l_23/time_keeper.py +57 -0
  184. xoa_driver/internals/hli_v1/testers/genuine/l_23/upload_file.py +29 -0
  185. xoa_driver/internals/hli_v1/testers/genuine/management_interface.py +42 -0
  186. xoa_driver/internals/hli_v1/testers/l23_tester.py +196 -0
  187. xoa_driver/internals/hli_v1/testers/l23ve_tester.py +114 -0
  188. xoa_driver/internals/hli_v1/testers/l47_tester.py +106 -0
  189. xoa_driver/internals/hli_v1/testers/l47ve_tester.py +54 -0
  190. xoa_driver/internals/hli_v2/__init__.py +0 -0
  191. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  192. xoa_driver/internals/hli_v2/indices/base_index.py +39 -0
  193. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  194. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +115 -0
  195. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +59 -0
  196. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +71 -0
  197. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +96 -0
  198. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +148 -0
  199. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +89 -0
  200. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +261 -0
  201. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +166 -0
  202. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +112 -0
  203. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +25 -0
  204. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  205. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +50 -0
  206. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +17 -0
  207. xoa_driver/internals/hli_v2/indices/length_term.py +44 -0
  208. xoa_driver/internals/hli_v2/indices/match_term.py +49 -0
  209. xoa_driver/internals/hli_v2/indices/port_dataset.py +53 -0
  210. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  211. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +234 -0
  212. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +32 -0
  213. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  214. xoa_driver/internals/hli_v2/modules/__interfaces.py +21 -0
  215. xoa_driver/internals/hli_v2/modules/base_module.py +125 -0
  216. xoa_driver/internals/hli_v2/modules/module_chimera.py +358 -0
  217. xoa_driver/internals/hli_v2/modules/module_l23ve.py +58 -0
  218. xoa_driver/internals/hli_v2/modules/module_l47.py +230 -0
  219. xoa_driver/internals/hli_v2/modules/module_l47ve.py +8 -0
  220. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  221. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +73 -0
  222. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +75 -0
  223. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +85 -0
  224. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +144 -0
  225. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +84 -0
  226. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +40 -0
  227. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +25 -0
  228. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +25 -0
  229. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +39 -0
  230. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +55 -0
  231. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +797 -0
  232. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +25 -0
  233. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +40 -0
  234. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +339 -0
  235. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  236. xoa_driver/internals/hli_v2/ports/base_port.py +105 -0
  237. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  238. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  239. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +64 -0
  240. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +441 -0
  241. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +172 -0
  242. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +156 -0
  243. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +117 -0
  244. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +59 -0
  245. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  246. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  247. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  248. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +340 -0
  249. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +99 -0
  250. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +36 -0
  251. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +116 -0
  252. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +102 -0
  253. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +113 -0
  254. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +420 -0
  255. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +22 -0
  256. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +22 -0
  257. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +36 -0
  258. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +49 -0
  259. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +96 -0
  260. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +144 -0
  261. xoa_driver/internals/hli_v2/ports/port_l23/family_g.py +77 -0
  262. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +60 -0
  263. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +66 -0
  264. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +53 -0
  265. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +58 -0
  266. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +67 -0
  267. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +149 -0
  268. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +28 -0
  269. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +22 -0
  270. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +342 -0
  271. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +50 -0
  272. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +65 -0
  273. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +81 -0
  274. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  275. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +146 -0
  276. xoa_driver/internals/hli_v2/ports/port_l47/main.py +137 -0
  277. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +20 -0
  278. xoa_driver/internals/hli_v2/revisions.py +11 -0
  279. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  280. xoa_driver/internals/hli_v2/testers/_base_tester.py +207 -0
  281. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  282. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  283. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +16 -0
  284. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +34 -0
  285. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +50 -0
  286. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +26 -0
  287. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +38 -0
  288. xoa_driver/internals/hli_v2/testers/l23_tester.py +159 -0
  289. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +98 -0
  290. xoa_driver/internals/hli_v2/testers/l47_tester.py +95 -0
  291. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +50 -0
  292. xoa_driver/internals/state_storage/__init__.py +0 -0
  293. xoa_driver/internals/state_storage/_speed_detector.py +121 -0
  294. xoa_driver/internals/state_storage/modules_state.py +128 -0
  295. xoa_driver/internals/state_storage/ports_state.py +154 -0
  296. xoa_driver/internals/state_storage/testers_state.py +104 -0
  297. xoa_driver/internals/utils/__init__.py +0 -0
  298. xoa_driver/internals/utils/attributes.py +33 -0
  299. xoa_driver/internals/utils/cap_id.py +63 -0
  300. xoa_driver/internals/utils/con_traffic_light.py +88 -0
  301. xoa_driver/internals/utils/indices/__init__.py +0 -0
  302. xoa_driver/internals/utils/indices/_interfaces.py +26 -0
  303. xoa_driver/internals/utils/indices/header_modifier_manager.py +56 -0
  304. xoa_driver/internals/utils/indices/index_manager.py +95 -0
  305. xoa_driver/internals/utils/indices/observer.py +17 -0
  306. xoa_driver/internals/utils/kind.py +19 -0
  307. xoa_driver/internals/utils/managers/__init__.py +0 -0
  308. xoa_driver/internals/utils/managers/abc.py +44 -0
  309. xoa_driver/internals/utils/managers/exceptions.py +22 -0
  310. xoa_driver/internals/utils/managers/modules_manager.py +118 -0
  311. xoa_driver/internals/utils/managers/ports_manager.py +116 -0
  312. xoa_driver/internals/utils/rev_tool.py +21 -0
  313. xoa_driver/internals/utils/session.py +117 -0
  314. xoa_driver/internals/warn.py +32 -0
  315. xoa_driver/lli.py +15 -0
  316. xoa_driver/misc.py +57 -0
  317. xoa_driver/modules.py +448 -0
  318. xoa_driver/ports.py +332 -0
  319. xoa_driver/testers.py +37 -0
  320. xoa_driver/utils.py +12 -0
  321. xoa_driver/v2/__init__.py +11 -0
  322. xoa_driver/v2/misc.py +77 -0
  323. xoa_driver/v2/modules.py +308 -0
  324. xoa_driver/v2/ports.py +232 -0
  325. xoa_driver/v2/testers.py +24 -0
@@ -0,0 +1,1034 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ import typing
4
+ import functools
5
+
6
+ from xoa_driver.internals.core.builders import (
7
+ build_get_request,
8
+ build_set_request
9
+ )
10
+ from xoa_driver.internals.core import interfaces
11
+ from xoa_driver.internals.core.token import Token
12
+ from xoa_driver.internals.core.transporter.registry import register_command
13
+ from xoa_driver.internals.core.transporter.protocol.payload import (
14
+ field,
15
+ RequestBodyStruct,
16
+ ResponseBodyStruct,
17
+ XmpByte,
18
+ XmpInt,
19
+ XmpLong,
20
+ )
21
+ from .enums import OnOff
22
+
23
+
24
+ @register_command
25
+ @dataclass
26
+ class PED_SCHEDULE:
27
+ """
28
+ Configure the impairment scheduler function. The configuration of the scheduler
29
+ depends on the kind of distribution to schedule: (1) Burst distributions:
30
+ "Fixed Burst" and "Accumulate and Burst". (2) Non-Burst distributions: All
31
+ others. For burst distributions, the scheduler can be configured for "One-shot"
32
+ operation or "Repeat Operation". When running in "Repeat Operation" the "Repeat
33
+ Period" must be configured. For non-burst distributions, the scheduler can be
34
+ configured operate in either "Continuous" or "Repeat Period" modes. When
35
+ running in "Repeat Period" configuration of "Duration" and "Repeat Period" is
36
+ required.
37
+ """
38
+
39
+ code: typing.ClassVar[int] = 1611
40
+ pushed: typing.ClassVar[bool] = True
41
+
42
+ _connection: 'interfaces.IConnection'
43
+ _module: int
44
+ _port: int
45
+ _flow_xindex: int
46
+ _impairment_type_xindex: int
47
+
48
+ class GetDataAttr(ResponseBodyStruct):
49
+ duration: int = field(XmpInt())
50
+ """integer, specifies the "on" period. Units = multiples of 10 ms (range 1 to 65535), default is 1"""
51
+ period: int = field(XmpInt())
52
+ """integer, specifies the "total" period. Units = multiples of 10 ms (range 0 to 65535), default is 0"""
53
+
54
+ class SetDataAttr(RequestBodyStruct):
55
+ duration: int = field(XmpInt())
56
+ """integer, specifies the "on" period. Units = multiples of 10 ms (range 1 to 65535), default is 1"""
57
+ period: int = field(XmpInt())
58
+ """integer, specifies the "total" period. Units = multiples of 10 ms (range 0 to 65535), default is 0"""
59
+
60
+ def get(self) -> Token[GetDataAttr]:
61
+ """Get the impairment scheduler configuration.
62
+
63
+ :return: the impairment scheduler configuration
64
+ :rtype: PED_SCHEDULE.GetDataAttr
65
+ """
66
+
67
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
68
+
69
+ def set(self, duration: int, period: int) -> Token[None]:
70
+ """Set the impairment scheduler configuration.
71
+
72
+ :param duration: specifies the "on" period. Units = multiples of 10 ms (range 1 to 65535), default is 1
73
+ :type duration: int
74
+ :param period: specifies the "total" period. Units = multiples of 10 ms (range 0 to 65535), default is 0
75
+ :type period: int
76
+ """
77
+
78
+ return Token(
79
+ self._connection,
80
+ build_set_request(
81
+ self,
82
+ module=self._module,
83
+ port=self._port,
84
+ indices=[self._flow_xindex, self._impairment_type_xindex],
85
+ duration=duration,
86
+ period=period
87
+ )
88
+ )
89
+
90
+
91
+ @register_command
92
+ @dataclass
93
+ class PED_ONESHOTSTATUS:
94
+ """
95
+ Retrieves the one-shot completion status.
96
+
97
+ .. note::
98
+
99
+ The return value is only valid, if the configured distribution is either accumulate & burst (DELAY) or fixed burst (non-DELAY).
100
+
101
+ """
102
+
103
+ code: typing.ClassVar[int] = 1612
104
+ pushed: typing.ClassVar[bool] = False
105
+
106
+ _connection: 'interfaces.IConnection'
107
+ _module: int
108
+ _port: int
109
+ _flow_xindex: int
110
+ _impairment_type_xindex: int
111
+
112
+ class GetDataAttr(ResponseBodyStruct):
113
+ one_shot_status: int = field(XmpByte())
114
+ """byte, specifies the status."""
115
+
116
+ def get(self) -> Token[GetDataAttr]:
117
+ """Get the one-shot completion status.
118
+
119
+ :return: the one-shot completion status
120
+ :rtype: PED_ONESHOTSTATUS.GetDataAttr
121
+ """
122
+
123
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
124
+
125
+
126
+ @register_command
127
+ @dataclass
128
+ class PED_OFF:
129
+ """Configure Impairments Distribution to OFF. Assigning a different distribution than OFF to an impairment
130
+ will activate the impairment. To de-activate the impairment assign distribution OFF.
131
+ """
132
+
133
+ code: typing.ClassVar[int] = 1620
134
+ pushed: typing.ClassVar[bool] = False
135
+
136
+ _connection: 'interfaces.IConnection'
137
+ _module: int
138
+ _port: int
139
+ _flow_xindex: int
140
+ _impairment_type_xindex: int
141
+
142
+ class SetDataAttr(RequestBodyStruct):
143
+ pass
144
+
145
+ def set(self) -> Token[None]:
146
+ """Configure Impairments Distribution to OFF. Assigning a different distribution than OFF to an impairment
147
+ will activate the impairment. To de-activate the impairment assign distribution OFF.
148
+ """
149
+
150
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
151
+
152
+
153
+ @register_command
154
+ @dataclass
155
+ class PED_FIXED:
156
+ """
157
+ Configuration of Fixed Rate distribution. This is predictable distribution with
158
+ nearly equal distance between impairments, to match the configured probability.
159
+
160
+ .. note::
161
+
162
+ In case of misordering, a special limit applies, probability * (depth + 1) should be less than 1000000.
163
+
164
+ """
165
+
166
+ code: typing.ClassVar[int] = 1621
167
+ pushed: typing.ClassVar[bool] = False
168
+
169
+ _connection: 'interfaces.IConnection'
170
+ _module: int
171
+ _port: int
172
+ _flow_xindex: int
173
+ _impairment_type_xindex: int
174
+
175
+ class GetDataAttr(ResponseBodyStruct):
176
+ probability: int = field(XmpInt())
177
+ """integer, specifies the fixed probability in ppm. Default value is 0."""
178
+
179
+ class SetDataAttr(RequestBodyStruct):
180
+ probability: int = field(XmpInt())
181
+ """integer, specifies the fixed probability in ppm. Default value is 0."""
182
+
183
+ def get(self) -> Token[GetDataAttr]:
184
+ """Get the probability of a Fixed Rate distribution.
185
+
186
+ :return: the fixed probability in ppm. Default value is 0.
187
+ :rtype: PED_FIXED.GetDataAttr
188
+ """
189
+
190
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
191
+
192
+ def set(self, probability: int) -> Token[None]:
193
+ """Set the probability of a Fixed Rate distribution.
194
+
195
+ :param probability: the fixed probability in ppm. Default value is 0.
196
+ :type probability: int
197
+ """
198
+
199
+ return Token(
200
+ self._connection,
201
+ build_set_request(
202
+ self,
203
+ module=self._module,
204
+ port=self._port,
205
+ indices=[self._flow_xindex, self._impairment_type_xindex],
206
+ probability=probability
207
+ )
208
+ )
209
+
210
+
211
+ @register_command
212
+ @dataclass
213
+ class PED_RANDOM:
214
+ """
215
+ Configuration of Random Rate distribution. Packets are impaired randomly based
216
+ on a per packet probability. This way the impaired fraction of packets will be
217
+ equal to the configured probability over time. Random probability in ppm (i.e. 1
218
+ means 0.0001%)
219
+ """
220
+
221
+ code: typing.ClassVar[int] = 1622
222
+ pushed: typing.ClassVar[bool] = False
223
+
224
+ _connection: 'interfaces.IConnection'
225
+ _module: int
226
+ _port: int
227
+ _flow_xindex: int
228
+ _impairment_type_xindex: int
229
+
230
+ class GetDataAttr(ResponseBodyStruct):
231
+ probability: int = field(XmpInt())
232
+ """integer, specifies the random probability in ppm. Default value is 0."""
233
+
234
+ class SetDataAttr(RequestBodyStruct):
235
+ probability: int = field(XmpInt())
236
+ """integer, specifies the random probability in ppm. Default value is 0."""
237
+
238
+ def get(self) -> Token[GetDataAttr]:
239
+ """Get the probability of a Random Rate distribution.
240
+
241
+ :return: specifies the random probability in ppm. Default value is 0.
242
+ :rtype: PED_RANDOM.GetDataAttr
243
+ """
244
+
245
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
246
+
247
+ def set(self, probability: int) -> Token[None]:
248
+ """Set the probability of a Random Rate distribution.
249
+
250
+ :param probability: specifies the random probability in ppm. Default value is 0.
251
+ :type probability: int
252
+ """
253
+
254
+ return Token(
255
+ self._connection,
256
+ build_set_request(
257
+ self,
258
+ module=self._module,
259
+ port=self._port,
260
+ indices=[self._flow_xindex, self._impairment_type_xindex],
261
+ probability=probability
262
+ )
263
+ )
264
+
265
+
266
+ @register_command
267
+ @dataclass
268
+ class PED_BER:
269
+ """
270
+ Configuration of Bit Error Rate distribution.
271
+ """
272
+
273
+ code: typing.ClassVar[int] = 1623
274
+ pushed: typing.ClassVar[bool] = False
275
+
276
+ _connection: 'interfaces.IConnection'
277
+ _module: int
278
+ _port: int
279
+ _flow_xindex: int
280
+ _impairment_type_xindex: int
281
+
282
+ class GetDataAttr(ResponseBodyStruct):
283
+ coef: int = field(XmpInt())
284
+ """integer, specifies the coefficient for BER. Default value: 1 (Range is 1 to 9)."""
285
+ exp: int = field(XmpInt())
286
+ """integer, specifies the exponent for BER. Default value: -10 (Range is -18 to -1)."""
287
+
288
+ class SetDataAttr(RequestBodyStruct):
289
+ coef: int = field(XmpInt())
290
+ """integer, specifies the coefficient for BER. Default value: 1 (Range is 1 to 9)."""
291
+ exp: int = field(XmpInt())
292
+ """integer, specifies the exponent for BER. Default value: -10 (Range is -18 to -1)."""
293
+
294
+ def get(self) -> Token[GetDataAttr]:
295
+ """Get the configuration of Bit Error Rate distribution.
296
+
297
+ :return: the configuration of Bit Error Rate distribution
298
+ :rtype: PED_BER.GetDataAttr
299
+ """
300
+
301
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
302
+
303
+ def set(self, coef: int, exp: int) -> Token[None]:
304
+ """Set the configuration of Bit Error Rate distribution.
305
+
306
+ :param coef: specifies the coefficient for BER. Default value: 1 (Range is 1 to 9).
307
+ :type coef: int
308
+ :param exp: specifies the exponent for BER. Default value: -10 (Range is -18 to -1).
309
+ :type exp: int
310
+ """
311
+
312
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], coef=coef, exp=exp))
313
+
314
+
315
+ @register_command
316
+ @dataclass
317
+ class PED_FIXEDBURST:
318
+ """
319
+ Configuration of Fixed Burst distribution.
320
+
321
+ .. note::
322
+
323
+ In case of ``_impairment_type_xindex`` = ``MISO``, burst size is fixed to 1.
324
+
325
+ """
326
+
327
+ code: typing.ClassVar[int] = 1624
328
+ pushed: typing.ClassVar[bool] = False
329
+
330
+ _connection: 'interfaces.IConnection'
331
+ _module: int
332
+ _port: int
333
+ _flow_xindex: int
334
+ _impairment_type_xindex: int
335
+
336
+ class GetDataAttr(ResponseBodyStruct):
337
+ burst_size: int = field(XmpInt())
338
+ """integer, specifies the burst size (Range 1 - 16383). Default value = 1."""
339
+
340
+ class SetDataAttr(RequestBodyStruct):
341
+ burst_size: int = field(XmpInt())
342
+ """integer, specifies the burst size (Range 1 - 16383). Default value = 1."""
343
+
344
+ def get(self) -> Token[GetDataAttr]:
345
+ """Get the configuration of Fixed Burst distribution.
346
+
347
+ :return: configuration of Fixed Burst distribution.
348
+ :rtype: PED_FIXEDBURST.GetDataAttr
349
+ """
350
+
351
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
352
+
353
+ def set(self, burst_size: int) -> Token[None]:
354
+ """Set the configuration of Fixed Burst distribution.
355
+
356
+ :param burst_size: specifies the burst size (Range 1 - 16383). Default value = 1.
357
+ :type burst_size: int
358
+ """
359
+
360
+ return Token(
361
+ self._connection,
362
+ build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], burst_size=burst_size)
363
+ )
364
+
365
+
366
+ @register_command
367
+ @dataclass
368
+ class PED_RANDOMBURST:
369
+ """
370
+ Configuration of Random Burst distribution.
371
+ """
372
+
373
+ code: typing.ClassVar[int] = 1625
374
+ pushed: typing.ClassVar[bool] = False
375
+
376
+ _connection: 'interfaces.IConnection'
377
+ _module: int
378
+ _port: int
379
+ _flow_xindex: int
380
+ _impairment_type_xindex: int
381
+
382
+ class GetDataAttr(ResponseBodyStruct):
383
+ minimum: int = field(XmpInt())
384
+ """integer, specifies minimum burst size. Default value: 0 (Range 0 to 65535)"""
385
+ maximum: int = field(XmpInt())
386
+ """integer, specifies maximum burst size. Default value: 0 (Range 0 to 65535)"""
387
+ probability: int = field(XmpInt())
388
+ """integer, specifies the per packet probability of initiating a burst in ppm. Default value: 0."""
389
+
390
+ class SetDataAttr(RequestBodyStruct):
391
+ minimum: int = field(XmpInt())
392
+ """integer, specifies minimum burst size. Default value: 0 (Range 0 to 65535)"""
393
+ maximum: int = field(XmpInt())
394
+ """integer, specifies maximum burst size. Default value: 0 (Range 0 to 65535)"""
395
+ probability: int = field(XmpInt())
396
+ """integer, specifies the per packet probability of initiating a burst in ppm. Default value: 0."""
397
+
398
+ def get(self) -> Token[GetDataAttr]:
399
+ """Get the configuration of Random Burst distribution.
400
+
401
+ :return: configuration of Random Burst distribution.
402
+ :rtype: PED_RANDOMBURST.GetDataAttr
403
+ """
404
+
405
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
406
+
407
+ def set(self, minimum: int, maximum: int, probability: int) -> Token[None]:
408
+ """Set the configuration of Random Burst distribution.
409
+
410
+ :param minimum: specifies minimum burst size. Default value: 0 (Range 0 to 65535)
411
+ :type minimum: int
412
+ :param maximum: specifies maximum burst size. Default value: 0 (Range 0 to 65535)
413
+ :type maximum: int
414
+ :param probability: specifies the per packet probability of initiating a burst in ppm. Default value: 0.
415
+ :type probability: int
416
+ """
417
+
418
+ return Token(
419
+ self._connection,
420
+ build_set_request(
421
+ self,
422
+ module=self._module,
423
+ port=self._port,
424
+ indices=[self._flow_xindex, self._impairment_type_xindex],
425
+ minimum=minimum,
426
+ maximum=maximum,
427
+ probability=probability
428
+ )
429
+ )
430
+
431
+
432
+ @register_command
433
+ @dataclass
434
+ class PED_GE:
435
+ """
436
+ Configuration of Gilbert-Elliot distribution.
437
+ """
438
+
439
+ code: typing.ClassVar[int] = 1626
440
+ pushed: typing.ClassVar[bool] = False
441
+
442
+ _connection: 'interfaces.IConnection'
443
+ _module: int
444
+ _port: int
445
+ _flow_xindex: int
446
+ _impairment_type_xindex: int
447
+
448
+ class GetDataAttr(ResponseBodyStruct):
449
+ good_state_prob: int = field(XmpInt())
450
+ """integer, specifies the good state probability in ppm. Default value: 0."""
451
+ good_state_trans_prob: int = field(XmpInt())
452
+ """integer, specifies the good state transition probability in ppm. Default value: 0."""
453
+ bad_state_prob: int = field(XmpInt())
454
+ """integer, specifies the bad state probability in ppm. Default value: 0."""
455
+ bad_state_trans_prob: int = field(XmpInt())
456
+ """integer, specifies the bad state transition probability in ppm. Default value: 0."""
457
+
458
+ class SetDataAttr(RequestBodyStruct):
459
+ good_state_prob: int = field(XmpInt())
460
+ """integer, specifies the good state probability in ppm. Default value: 0."""
461
+ good_state_trans_prob: int = field(XmpInt())
462
+ """integer, specifies the good state transition probability in ppm. Default value: 0."""
463
+ bad_state_prob: int = field(XmpInt())
464
+ """integer, specifies the bad state probability in ppm. Default value: 0."""
465
+ bad_state_trans_prob: int = field(XmpInt())
466
+ """integer, specifies the bad state transition probability in ppm. Default value: 0."""
467
+
468
+ def get(self) -> Token[GetDataAttr]:
469
+ """Get the configuration of Gilbert-Elliot distribution.
470
+
471
+ :return: the configuration of Gilbert-Elliot distribution.
472
+ :rtype: PED_GE.GetDataAttr
473
+ """
474
+
475
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
476
+
477
+ def set(self, good_state_prob: int, good_state_trans_prob: int, bad_state_prob: int, bad_state_trans_prob: int) -> Token[None]:
478
+ """Set the configuration of Gilbert-Elliot distribution.
479
+
480
+ :param good_state_prob: specifies the good state probability in ppm. Default value: 0.
481
+ :type good_state_prob: int
482
+ :param good_state_trans_prob: specifies the good state transition probability in ppm. Default value: 0.
483
+ :type good_state_trans_prob: int
484
+ :param bad_state_prob: specifies the bad state probability in ppm. Default value: 0.
485
+ :type bad_state_prob: int
486
+ :param bad_state_trans_prob: specifies the bad state transition probability in ppm. Default value: 0.
487
+ :type bad_state_trans_prob: int
488
+ """
489
+
490
+ return Token(
491
+ self._connection,
492
+ build_set_request(
493
+ self,
494
+ module=self._module,
495
+ port=self._port,
496
+ indices=[self._flow_xindex, self._impairment_type_xindex],
497
+ good_state_prob=good_state_prob,
498
+ good_state_trans_prob=good_state_trans_prob,
499
+ bad_state_prob=bad_state_prob,
500
+ bad_state_trans_prob=bad_state_trans_prob
501
+ )
502
+ )
503
+
504
+
505
+ @register_command
506
+ @dataclass
507
+ class PED_UNI:
508
+ """
509
+ Configuration of Uniform distribution.
510
+
511
+ .. note::
512
+
513
+ If minimum is less than minimum , value is set to minimum. If minimum is greater than maximum, value is set to maximum.
514
+
515
+ """
516
+
517
+ code: typing.ClassVar[int] = 1627
518
+ pushed: typing.ClassVar[bool] = False
519
+
520
+ _connection: 'interfaces.IConnection'
521
+ _module: int
522
+ _port: int
523
+ _flow_xindex: int
524
+ _impairment_type_xindex: int
525
+
526
+ class GetDataAttr(ResponseBodyStruct):
527
+ minimum: int = field(XmpLong())
528
+ """long, in case of iid != DELAY, specifies the minimum no. of packets. Default value: 0 (Range 0 to 4194288).
529
+ In case of iid = DELAY, specifies the minimum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
530
+ """
531
+ maximum: int = field(XmpLong())
532
+ """long, in case of iid != DELAY, specifies the maximum no. of packets. Default value: 0 (Range 0 to 4194288).
533
+ In case of iid = DELAY, specifies the maximum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
534
+ """
535
+
536
+ class SetDataAttr(RequestBodyStruct):
537
+ minimum: int = field(XmpLong())
538
+ """long, in case of iid != DELAY, specifies the minimum no. of packets. Default value: 0 (Range 0 to 4194288).
539
+ In case of iid = DELAY, specifies the minimum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
540
+ """
541
+ maximum: int = field(XmpLong())
542
+ """long, in case of iid != DELAY, specifies the maximum no. of packets. Default value: 0 (Range 0 to 4194288).
543
+ In case of iid = DELAY, specifies the maximum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
544
+ """
545
+
546
+ def get(self) -> Token[GetDataAttr]:
547
+ """Get the configuration of Uniform distribution.
548
+
549
+ :return: the configuration of Uniform distribution.
550
+ :rtype: PED_UNI.GetDataAttr
551
+ """
552
+
553
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
554
+
555
+ def set(self, minimum: int, maximum: int) -> Token[None]:
556
+ """Set the configuration of Uniform distribution.
557
+
558
+ :param minimum: in case of iid != DELAY, specifies the minimum no. of packets. Default value: 0 (Range 0 to 4194288).
559
+ In case of iid = DELAY, specifies the minimum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
560
+ :type minimum: int
561
+ :param maximum: in case of iid != DELAY, specifies the maximum no. of packets. Default value: 0 (Range 0 to 4194288).
562
+ In case of iid = DELAY, specifies the maximum latency limit. Unit is nanosecond (must be multiples of 100 ns). Default value: minimum latency.
563
+ :type maximum: int
564
+ """
565
+
566
+ return Token(
567
+ self._connection,
568
+ build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], minimum=minimum, maximum=maximum)
569
+ )
570
+
571
+
572
+ @register_command
573
+ @dataclass
574
+ class PED_GAUSS:
575
+ """
576
+ Configuration of Gaussian distribution.
577
+
578
+ .. note::
579
+
580
+ In case of ``_impairment_type_xindex != DELAY``:
581
+ (1) mean plus 3 times standard deviation should be less than or equal to max allowed (4194288).
582
+ (2) mean should always be at least 3 times the standard deviation, this to ensure that the impairment distance is always positive.
583
+
584
+ In case of ``_impairment_type_xindex = DELAY``:
585
+ (1) mean plus 3 times standard deviation should be less than or equal to the maximum latency.
586
+ (2) mean minus 3 times the standard deviation should be greater than or equal to minimum latency.
587
+
588
+ """
589
+
590
+ code: typing.ClassVar[int] = 1628
591
+ pushed: typing.ClassVar[bool] = False
592
+
593
+ _connection: 'interfaces.IConnection'
594
+ _module: int
595
+ _port: int
596
+ _flow_xindex: int
597
+ _impairment_type_xindex: int
598
+
599
+ class GetDataAttr(ResponseBodyStruct):
600
+ mean: int = field(XmpLong())
601
+ """long, specifies the Gaussian mean. In case of iid != DELAY, specifies the Gaussian mean value as number of packets.Default value: 0 packets (Range 0 to 4194288).
602
+ In case of iid = DELAY, specifies the Gaussian mean value. Units is nanosecond (must be multiples of 100 ns).
603
+ """
604
+ std_deviation: int = field(XmpLong())
605
+ """long, specifies the Gaussian standard deviation. In case of iid != DELAY, specifies the standard deviation as number of packets.
606
+ Default value: 0 packets (Range 0 to 4194288). In case of iid = DELAY, specifies the the Gaussian standard deviation.
607
+ Units is nanosecond (must be multiples of 100 ns). Default value: 0 ns.
608
+ """
609
+
610
+ class SetDataAttr(RequestBodyStruct):
611
+ mean: int = field(XmpLong())
612
+ """long, specifies the Gaussian mean. In case of iid != DELAY, specifies the Gaussian mean value as number of packets.Default value: 0 packets (Range 0 to 4194288).
613
+ In case of iid = DELAY, specifies the Gaussian mean value. Units is nanosecond (must be multiples of 100 ns)."""
614
+ std_deviation: int = field(XmpLong())
615
+ """long, specifies the Gaussian standard deviation. In case of iid != DELAY, specifies the standard deviation as number of packets.
616
+ Default value: 0 packets (Range 0 to 4194288). In case of iid = DELAY, specifies the the Gaussian standard deviation.
617
+ Units is nanosecond (must be multiples of 100 ns). Default value: 0 ns.
618
+ """
619
+
620
+ def get(self) -> Token[GetDataAttr]:
621
+ """Get the configuration of Gaussian distribution.
622
+
623
+ :return: the configuration of Gaussian distribution
624
+ :rtype: PED_GAUSS.GetDataAttr
625
+ """
626
+
627
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
628
+
629
+ def set(self, mean: int, std_deviation: int) -> Token[None]:
630
+ """Set the configuration of Gaussian distribution.
631
+
632
+ :param mean: specifies the Gaussian mean.
633
+ :type mean: int
634
+ :param std_deviation: specifies the Gaussian standard deviation.
635
+ :type std_deviation: int
636
+ """
637
+
638
+ return Token(
639
+ self._connection,
640
+ build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], mean=mean, std_deviation=std_deviation)
641
+ )
642
+
643
+
644
+ @register_command
645
+ @dataclass
646
+ class PED_POISSON:
647
+ """
648
+ Configuration of "Poisson" distribution.
649
+
650
+ .. note::
651
+
652
+ Standard deviation is derived from mean, i.e., standard deviation = SQRT(mean).
653
+
654
+ In case of ``_impairment_type_xindex != DELAY``, mean plus 3 times standard deviation should be less than or equal to max allowed (4194288).
655
+
656
+ In case of ``_impairment_type_xindex = DELAY``, mean plus 3 times standard deviation should be less than or equal to the maximum latency.
657
+
658
+ """
659
+
660
+ code: typing.ClassVar[int] = 1629
661
+ pushed: typing.ClassVar[bool] = False
662
+
663
+ _connection: 'interfaces.IConnection'
664
+ _module: int
665
+ _port: int
666
+ _flow_xindex: int
667
+ _impairment_type_xindex: int
668
+
669
+ class GetDataAttr(ResponseBodyStruct):
670
+ mean: int = field(XmpLong())
671
+ """long, specifies the Poisson mean value. In case of iid = DELAY specifies the Poisson mean. Unit is nanosecond (must be multiples of 100ns).
672
+ Default value: 0 ns. In case of iid != DELAY specifies the Poisson mean in number of packets packets. Default value: 9 packets (Range 0 to 4194288).
673
+ """
674
+
675
+ class SetDataAttr(RequestBodyStruct):
676
+ mean: int = field(XmpLong())
677
+ """long, specifies the Poisson mean value. In case of iid = DELAY specifies the Poisson mean. Unit is nanosecond (must be multiples of 100ns).
678
+ Default value: 0 ns. In case of iid != DELAY specifies the Poisson mean in number of packets packets. Default value: 9 packets (Range 0 to 4194288).
679
+ """
680
+
681
+ def get(self) -> Token[GetDataAttr]:
682
+ """Get the configuration of Poisson distribution.
683
+
684
+ :return: the configuration of Poisson distribution
685
+ :rtype: PED_POISSON.GetDataAttr
686
+ """
687
+
688
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
689
+
690
+ def set(self, mean: int) -> Token[None]:
691
+ """Set the configuration of Poisson distribution.
692
+
693
+ :param mean: specifies the Poisson mean value.
694
+ :type mean: int
695
+ """
696
+
697
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], mean=mean))
698
+
699
+
700
+ @register_command
701
+ @dataclass
702
+ class PED_GAMMA:
703
+ """
704
+ Configuration of Gamma distribution.
705
+
706
+ .. note::
707
+
708
+ Mean and Standard deviation are calculated from Shape and Scale parameters and validation is performed using those.
709
+ standard deviation = [SQRT(shape * scale * scale)]mean = [shape * scale].
710
+
711
+ In case of ``_impairment_type_xindex != DELAY``,
712
+ (1) mean plus 4 times standard deviation should be less than or equal to max allowed(4194288).
713
+ (2)shape and scale should be greater than or equal to 0.
714
+
715
+ In case of ``_impairment_type_xindex = DELAY``, mean plus 4 times standard deviation should be less than or equal to the maximum latency.
716
+
717
+ """
718
+
719
+ code: typing.ClassVar[int] = 1630
720
+ pushed: typing.ClassVar[bool] = False
721
+
722
+ _connection: 'interfaces.IConnection'
723
+ _module: int
724
+ _port: int
725
+ _flow_xindex: int
726
+ _impairment_type_xindex: int
727
+
728
+ class GetDataAttr(ResponseBodyStruct):
729
+ shape: int = field(XmpLong())
730
+ """long, specifies the shape. Units: none. Default value: 0."""
731
+ scale: int = field(XmpLong())
732
+ """long, specifies the Gamma function scale parameter. In case of iid = DELAY, units: nanosecond
733
+ (must be multiples of 100 ns). Default value: 0 ns. In case of iid != DELAY, units: number of packets.Default value: 0 packets.
734
+ """
735
+
736
+ class SetDataAttr(RequestBodyStruct):
737
+ shape: int = field(XmpLong())
738
+ """long, specifies the shape. Units: none. Default value: 0."""
739
+ scale: int = field(XmpLong())
740
+ """long, specifies the Gamma function scale parameter. In case of iid = DELAY, units: nanosecond (must be multiples of 100 ns). Default value: 0 ns.
741
+ In case of iid != DELAY, units: number of packets.Default value: 0 packets.
742
+ """
743
+
744
+ def get(self) -> Token[GetDataAttr]:
745
+ """Get the configuration of Gamma distribution.
746
+
747
+ :return: the configuration of Gamma distribution
748
+ :rtype: PED_GAMMA.GetDataAttr
749
+ """
750
+
751
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
752
+
753
+ def set(self, shape: int, scale: int) -> Token[None]:
754
+ """Set the configuration of Gamma distribution.
755
+
756
+ :param shape: specifies the shape. Units: none. Default value: 0.
757
+ :type shape: int
758
+ :param scale: specifies the Gamma function scale parameter.
759
+ :type scale: int
760
+ """
761
+
762
+ return Token(
763
+ self._connection,
764
+ build_set_request(
765
+ self,
766
+ module=self._module,
767
+ port=self._port,
768
+ indices=[self._flow_xindex, self._impairment_type_xindex],
769
+ shape=shape,
770
+ scale=scale
771
+ )
772
+ )
773
+
774
+
775
+ @register_command
776
+ @dataclass
777
+ class PED_CUST:
778
+ """
779
+ Associate a custom distribution to a flow and impairment type.
780
+
781
+ .. note::
782
+
783
+ Before associating a custom distribution, the below validation checks are applied.
784
+
785
+ In case of ``_impairment_type_xindex != DELAY``,
786
+ (1) Custom values should be less than or equal to max allowed (4194288).
787
+ (2) Custom distribution bust contain 512 values.
788
+
789
+ In case of ``_impairment_type_xindex = DELAY``,
790
+ (1) Custom values should be less than or equal to the maximum latency.
791
+ (2) Custom values should be greater than or equal to minimum latency.
792
+ (3) Custom distribution should contain 1024 values.
793
+
794
+ """
795
+
796
+ code: typing.ClassVar[int] = 1631
797
+ pushed: typing.ClassVar[bool] = False
798
+
799
+ _connection: 'interfaces.IConnection'
800
+ _module: int
801
+ _port: int
802
+ _flow_xindex: int
803
+ _impairment_type_xindex: int
804
+
805
+ class GetDataAttr(ResponseBodyStruct):
806
+ cust_id: int = field(XmpInt())
807
+ """integer, custom distribution identifier."""
808
+
809
+ class SetDataAttr(RequestBodyStruct):
810
+ cust_id: int = field(XmpInt())
811
+ """integer, custom distribution identifier."""
812
+
813
+ def get(self) -> Token[GetDataAttr]:
814
+ """Get the custom distribution identifier that is associated to a flow and impairment type.
815
+
816
+ :return: custom distribution identifier
817
+ :rtype: PED_CUST.GetDataAttr
818
+ """
819
+
820
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
821
+
822
+ def set(self, cust_id: int) -> Token[None]:
823
+ """Associate a custom distribution to a flow and impairment type.
824
+
825
+ :param cust_id: custom distribution identifier
826
+ :type cust_id: int
827
+ """
828
+
829
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], cust_id=cust_id))
830
+
831
+
832
+ @register_command
833
+ @dataclass
834
+ class PED_CONST:
835
+ """
836
+ Configuration of Constant Delay distribution (DELAY only). Unit is ns (must be
837
+ multiples of 100ns). Default value: Minimum supported per speed and FEC mode.
838
+
839
+ .. note::
840
+
841
+ If the latency is less than minimum latency, value is set to minimum latency. If the latency is greater than maximum latency, value is set to maximum latency.
842
+
843
+ """
844
+
845
+ code: typing.ClassVar[int] = 1640
846
+ pushed: typing.ClassVar[bool] = False
847
+
848
+ _connection: 'interfaces.IConnection'
849
+ _module: int
850
+ _port: int
851
+ _flow_xindex: int
852
+ _impairment_type_xindex: int
853
+
854
+ class GetDataAttr(ResponseBodyStruct):
855
+ delay: int = field(XmpLong())
856
+ """long, specifies the constant delay/latency time. Unit is nanosecond (must be multiples of 100 ns). Default value: Minimum supported per speed and FEC mode."""
857
+
858
+ class SetDataAttr(RequestBodyStruct):
859
+ delay: int = field(XmpLong())
860
+ """long, specifies the constant delay/latency time. Unit is nanosecond (must be multiples of 100 ns). Default value: Minimum supported per speed and FEC mode."""
861
+
862
+ def get(self) -> Token[GetDataAttr]:
863
+ """Get the configuration of Constant Delay distribution (DELAY only).
864
+
865
+ :return: the configuration of Constant Delay distribution (DELAY only)
866
+ :rtype: PED_CONST.GetDataAttr
867
+ """
868
+
869
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
870
+
871
+ def set(self, delay: int) -> Token[None]:
872
+ """Set the configuration of Constant Delay distribution (DELAY only).
873
+
874
+ :param delay: specifies the constant delay/latency time. Unit is nanosecond (must be multiples of 100 ns). Default value: Minimum supported per speed and FEC mode.
875
+ :type delay: int
876
+ """
877
+
878
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], delay=delay))
879
+
880
+
881
+ @register_command
882
+ @dataclass
883
+ class PED_ACCBURST:
884
+ """
885
+ Configuration of Accumulate & Burst distribution (DELAY only).
886
+
887
+ .. note::
888
+
889
+ If the delay is less than minimum latency, value is set to minimum latency. If the delay is greater than maximum latency, value is set to maximum latency.
890
+
891
+ """
892
+
893
+ code: typing.ClassVar[int] = 1641
894
+ pushed: typing.ClassVar[bool] = False
895
+
896
+ _connection: 'interfaces.IConnection'
897
+ _module: int
898
+ _port: int
899
+ _flow_xindex: int
900
+ _impairment_type_xindex: int
901
+
902
+ class GetDataAttr(ResponseBodyStruct):
903
+ delay: int = field(XmpLong())
904
+ """long, specifies the burst delay time. Units = nanosecond (must multiples of 100 ns). Default value: minimum latency."""
905
+
906
+ class SetDataAttr(RequestBodyStruct):
907
+ delay: int = field(XmpLong())
908
+ """long, specifies the burst delay time. Units = nanosecond (must multiples of 100 ns). Default value: minimum latency."""
909
+
910
+ def get(self) -> Token[GetDataAttr]:
911
+ """Get the configuration of Accumulate & Burst distribution (DELAY only).
912
+
913
+ :return: the configuration of Accumulate & Burst distribution (DELAY only)
914
+ :rtype: PED_ACCBURST.GetDataAttr
915
+ """
916
+
917
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
918
+
919
+ def set(self, delay: int) -> Token[None]:
920
+ """Set the configuration of Accumulate & Burst distribution (DELAY only).
921
+
922
+ :param delay: specifies the burst delay time. Units = nanosecond (must multiples of 100 ns). Default value: minimum latency.
923
+ :type delay: int
924
+ """
925
+
926
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], delay=delay))
927
+
928
+
929
+ @register_command
930
+ @dataclass
931
+ class PED_STEP:
932
+ """
933
+ Configuration of Step distribution (DELAY only).
934
+
935
+ .. note::
936
+
937
+ If the low/high is less than minimum latency, value is set to minimum latency. If the low/high is greater than maximum latency, value is set to maximum latency.
938
+
939
+ """
940
+
941
+ code: typing.ClassVar[int] = 1642
942
+ pushed: typing.ClassVar[bool] = False
943
+
944
+ _connection: 'interfaces.IConnection'
945
+ _module: int
946
+ _port: int
947
+ _flow_xindex: int
948
+ _impairment_type_xindex: int
949
+
950
+ class GetDataAttr(ResponseBodyStruct):
951
+ low: int = field(XmpLong())
952
+ """long, specifies the packet delay in the 'low' state of the step. Units = nanosecond (must be multiples of 100 ns)."""
953
+ high: int = field(XmpLong())
954
+ """long, specifies the packet delay in the 'high' state of the step. Units = nanosecond (must be multiples of 100 ns)."""
955
+
956
+ class SetDataAttr(RequestBodyStruct):
957
+ low: int = field(XmpLong())
958
+ """long, specifies the packet delay in the 'low' state of the step. Units = nanosecond (must be multiples of 100 ns)."""
959
+ high: int = field(XmpLong())
960
+ """long, specifies the packet delay in the 'high' state of the step. Units = nanosecond (must be multiples of 100 ns)."""
961
+
962
+ def get(self) -> Token[GetDataAttr]:
963
+ """Get the configuration of Step distribution (DELAY only).
964
+
965
+ :return: the configuration of Step distribution (DELAY only)
966
+ :rtype: PED_STEP.GetDataAttr
967
+ """
968
+
969
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
970
+
971
+ def set(self, low: int, high: int) -> Token[None]:
972
+ """Set the configuration of Step distribution (DELAY only).
973
+
974
+ :param low: specifies the packet delay in the 'low' state of the step. Units = nanosecond (must be multiples of 100 ns).
975
+ :type low: int
976
+ :param high: specifies the packet delay in the 'high' state of the step. Units = nanosecond (must be multiples of 100 ns).
977
+ :type high: int
978
+ """
979
+
980
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], low=low, high=high))
981
+
982
+
983
+ @register_command
984
+ @dataclass
985
+ class PED_ENABLE:
986
+ """
987
+ Control whether this impairment distribution is enabled.
988
+
989
+ .. note::
990
+
991
+ This command is not applicable for PE_BANDPOLICER and PE_BANDSHAPER because they have a separate ``ON / OFF`` parameter.
992
+
993
+ """
994
+
995
+ code: typing.ClassVar[int] = 1644
996
+ pushed: typing.ClassVar[bool] = True
997
+
998
+ _connection: 'interfaces.IConnection'
999
+ _module: int
1000
+ _port: int
1001
+ _flow_xindex: int
1002
+ _impairment_type_xindex: int
1003
+
1004
+ class GetDataAttr(ResponseBodyStruct):
1005
+ action: OnOff = field(XmpByte())
1006
+ """coded byte, specifying whether impairment is enabled."""
1007
+
1008
+ class SetDataAttr(RequestBodyStruct):
1009
+ action: OnOff = field(XmpByte())
1010
+ """coded byte, specifying whether impairment is enabled."""
1011
+
1012
+ def get(self) -> Token[GetDataAttr]:
1013
+ """Get the status of this impairment distribution.
1014
+
1015
+ :return: the status of this impairment distribution
1016
+ :rtype: PED_ENABLE.GetDataAttr
1017
+ """
1018
+
1019
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex]))
1020
+
1021
+ def set(self, action: OnOff) -> Token[None]:
1022
+ """Set the status of this impairment distribution.
1023
+
1024
+ :param action: the status of this impairment distribution
1025
+ :type action: OnOff
1026
+ """
1027
+
1028
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._impairment_type_xindex], action=action))
1029
+
1030
+ set_off = functools.partialmethod(set, OnOff.OFF)
1031
+ """Disable impairment distribution"""
1032
+
1033
+ set_on = functools.partialmethod(set, OnOff.ON)
1034
+ """Enable impairment distribution"""