tdl-xoa-driver 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. tdl_xoa_driver-1.0.0.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0.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,2041 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ import ipaddress
4
+ import typing
5
+ import functools
6
+
7
+ from xoa_driver.internals.core.builders import (
8
+ build_get_request,
9
+ build_set_request
10
+ )
11
+ from xoa_driver.internals.core import interfaces
12
+ from xoa_driver.internals.core.token import Token
13
+ from xoa_driver.internals.core.transporter.registry import register_command
14
+ from xoa_driver.internals.core.transporter.protocol.payload import (
15
+ field,
16
+ RequestBodyStruct,
17
+ ResponseBodyStruct,
18
+ XmpByte,
19
+ XmpHex,
20
+ XmpInt,
21
+ XmpIPv4Address,
22
+ XmpLong,
23
+ XmpMacAddress,
24
+ XmpSequence,
25
+ XmpStr,
26
+ Hex
27
+ )
28
+ from .enums import (
29
+ ReservedStatus,
30
+ ReservedAction,
31
+ ChassisShutdownAction,
32
+ OnOff,
33
+ RESTControlAction,
34
+ ServiceStatus,
35
+ ChassisSessionType,
36
+ TimeKeeperLicenseFileState,
37
+ TimeKeeperLicenseType,
38
+ TimeKeeperLicenseError,
39
+ TimeKeeperServiceStatus,
40
+ TimeKeeperServiceAction,
41
+ ChassisModelNumber,
42
+ ChassisModelName
43
+ )
44
+
45
+
46
+ @register_command
47
+ @dataclass
48
+ class C_LOGON:
49
+ """
50
+ You log on to the chassis by setting the value of this command to the correct
51
+ password for the chassis. All other commands will fail if the session has not
52
+ been logged on.
53
+ """
54
+
55
+ code: typing.ClassVar[int] = 1
56
+ pushed: typing.ClassVar[bool] = False
57
+
58
+ _connection: 'interfaces.IConnection'
59
+
60
+ class SetDataAttr(RequestBodyStruct):
61
+ password: str = field(XmpStr())
62
+ """string, containing the password value."""
63
+
64
+ def set(self, password: str) -> Token[None]:
65
+ """Set the password for creating a tester management session and logging on to the tester.
66
+
67
+ :param password: password for creating a tester management session and logging on to the tester.
68
+ :type password: str
69
+ """
70
+
71
+ return Token(self._connection, build_set_request(self, password=password))
72
+
73
+
74
+ @register_command
75
+ @dataclass
76
+ class C_OWNER:
77
+ """
78
+ Identify the owner of the management session. The name can be any short quoted
79
+ string up to eight characters long. This name will be used when reserving ports
80
+ prior to updating their configuration. There is no authentication of the users,
81
+ and the chassis does not have any actual user accounts. Multiple concurrent
82
+ connections may use the same owner name, but only one connection can have any
83
+ particular resource reserved at any given time. Until an owner is specified the
84
+ chassis configuration can only be read. Once specified, the session can reserve
85
+ ports for that owner, and will inherit any existing reservations for that owner
86
+ retained at the chassis. Maximum 32 ASCII characters.
87
+ """
88
+
89
+ code: typing.ClassVar[int] = 2
90
+ pushed: typing.ClassVar[bool] = False
91
+
92
+ _connection: 'interfaces.IConnection'
93
+
94
+ class GetDataAttr(ResponseBodyStruct):
95
+ username: str = field(XmpStr())
96
+ """string, containing the name of the owner of this session."""
97
+
98
+ class SetDataAttr(RequestBodyStruct):
99
+ username: str = field(XmpStr())
100
+ """string, containing the name of the owner of this session."""
101
+
102
+ def get(self) -> Token[GetDataAttr]:
103
+ """Get the username of this chassis management session.
104
+
105
+ :return: The username of this chassis management session.
106
+ :rtype: C_OWNER.GetDataAttr
107
+ """
108
+
109
+ return Token(self._connection, build_get_request(self))
110
+
111
+ def set(self, username: str) -> Token[None]:
112
+ """Set the username of this chassis management session.
113
+
114
+ :param username: the username of this chassis management session.
115
+ :type username: str
116
+ """
117
+
118
+ return Token(self._connection, build_set_request(self, username=username))
119
+
120
+
121
+ @register_command
122
+ @dataclass
123
+ class C_KEEPALIVE:
124
+ """
125
+ You can request this value from the chassis, simply to let it (as well as and
126
+ any routers and proxies between you) know that the connection is still valid.
127
+ """
128
+
129
+ code: typing.ClassVar[int] = 3
130
+ pushed: typing.ClassVar[bool] = False
131
+
132
+ _connection: 'interfaces.IConnection'
133
+
134
+ class GetDataAttr(ResponseBodyStruct):
135
+ tick_count: int = field(XmpInt())
136
+ """integer, an increasing number from the chassis."""
137
+
138
+ def get(self) -> Token[GetDataAttr]:
139
+ """Get the tick count value.
140
+
141
+ :return: an increasing number from the chassis.
142
+ :rtype: C_KEEPALIVE.GetDataAttr
143
+ """
144
+
145
+ return Token(self._connection, build_get_request(self))
146
+
147
+
148
+ @register_command
149
+ @dataclass
150
+ class C_TIMEOUT:
151
+ """
152
+ The maximum number of idle seconds allowed before the connection is timed out by
153
+ the tester.
154
+ """
155
+
156
+ code: typing.ClassVar[int] = 4
157
+ pushed: typing.ClassVar[bool] = False
158
+
159
+ _connection: 'interfaces.IConnection'
160
+
161
+ class GetDataAttr(ResponseBodyStruct):
162
+ second_count: int = field(XmpInt())
163
+ """integer, the maximum idle interval, default is 130 seconds."""
164
+
165
+ class SetDataAttr(RequestBodyStruct):
166
+ second_count: int = field(XmpInt())
167
+ """integer, the maximum idle interval, default is 130 seconds."""
168
+
169
+ def get(self) -> Token[GetDataAttr]:
170
+ """Get the timeout value.
171
+
172
+ :return: the maximum idle interval, default is 130 seconds.
173
+ :rtype: C_TIMEOUT.GetDataAttr
174
+ """
175
+
176
+ return Token(self._connection, build_get_request(self))
177
+
178
+ def set(self, second_count: int) -> Token[None]:
179
+ """Set the timeout value.
180
+
181
+ :param second_count: the maximum idle interval, default is 130 seconds.
182
+ :type second_count: int
183
+ """
184
+
185
+ return Token(self._connection, build_set_request(self, second_count=second_count))
186
+
187
+
188
+ @register_command
189
+ @dataclass
190
+ class C_RESERVATION:
191
+ """
192
+ You set this command to reserve, release, or relinquish the chassis itself.
193
+ The chassis must be reserved before any of the chassis-level parameters can be
194
+ changed. The owner of the session must already have been specified.
195
+ Reservation will fail if any modules or ports are reserved for other users.
196
+
197
+ NOTICE: Before reserve Tester need to reserve all the ports on it, otherwise
198
+ ``<STATUS_NOTVALID>``
199
+ """
200
+
201
+ code: typing.ClassVar[int] = 5
202
+ pushed: typing.ClassVar[bool] = True
203
+
204
+ _connection: 'interfaces.IConnection'
205
+
206
+ class GetDataAttr(ResponseBodyStruct):
207
+ operation: ReservedStatus = field(XmpByte())
208
+ """coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get.
209
+ When set, it contains the operation to perform. When get, it contains the status.
210
+ """
211
+
212
+ class SetDataAttr(RequestBodyStruct):
213
+ operation: ReservedAction = field(XmpByte())
214
+ """coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get.
215
+ When set, it contains the operation to perform. When get, it contains the status.
216
+ """
217
+
218
+ def get(self) -> Token[GetDataAttr]:
219
+ """Get the chassis reservation status.
220
+
221
+ :return: the status of chassis reservation.
222
+ :rtype: C_RESERVATION.GetDataAttr
223
+ """
224
+
225
+ return Token(self._connection, build_get_request(self))
226
+
227
+ def set(self, operation: ReservedAction) -> Token[None]:
228
+ """Set the chassis reservation operation to be performed.
229
+
230
+ :param operation: reservation operation to be performed.
231
+ :type operation: ReservedAction
232
+ """
233
+
234
+ return Token(self._connection, build_set_request(self, operation=operation))
235
+
236
+ set_release = functools.partialmethod(set, ReservedAction.RELEASE)
237
+ """Release the ownership of the tester.
238
+ """
239
+
240
+ set_reserve = functools.partialmethod(set, ReservedAction.RESERVE)
241
+ """Reserve the tester.
242
+ """
243
+
244
+ set_relinquish = functools.partialmethod(set, ReservedAction.RELINQUISH)
245
+ """Release the ownership of the tester from another user.
246
+ """
247
+
248
+
249
+ @register_command
250
+ @dataclass
251
+ class C_RESERVEDBY:
252
+ """
253
+ Identify the user who has the chassis reserved. The empty string if the chassis
254
+ is not currently reserved.
255
+ """
256
+
257
+ code: typing.ClassVar[int] = 6
258
+ pushed: typing.ClassVar[bool] = True
259
+
260
+ _connection: 'interfaces.IConnection'
261
+
262
+ class GetDataAttr(ResponseBodyStruct):
263
+ username: str = field(XmpStr())
264
+ """string, containing the name of the current owner of the chassis."""
265
+
266
+ def get(self) -> Token[GetDataAttr]:
267
+ """Get the username of the current owner of the tester.
268
+
269
+ :return: the username of the current owner of the tester.
270
+ :rtype: C_RESERVEDBY.GetDataAttr
271
+ """
272
+
273
+ return Token(self._connection, build_get_request(self))
274
+
275
+
276
+ @register_command
277
+ @dataclass
278
+ class C_LOGOFF:
279
+ """
280
+ Terminates the current scripting session. Courtesy only, the chassis will also
281
+ handle disconnection at the TCP/IP level
282
+ """
283
+
284
+ code: typing.ClassVar[int] = 7
285
+ pushed: typing.ClassVar[bool] = False
286
+
287
+ _connection: 'interfaces.IConnection'
288
+
289
+ class SetDataAttr(RequestBodyStruct):
290
+ pass
291
+
292
+ def set(self) -> Token[None]:
293
+ """Log off from the tester and close the management session.
294
+ """
295
+
296
+ return Token(self._connection, build_set_request(self))
297
+
298
+
299
+ @register_command
300
+ @dataclass
301
+ class C_DOWN:
302
+ """
303
+ Shuts down the chassis, and either restarts it in a clean state or leaves it
304
+ powered off.
305
+ """
306
+
307
+ code: typing.ClassVar[int] = 8
308
+ pushed: typing.ClassVar[bool] = False
309
+
310
+ _connection: 'interfaces.IConnection'
311
+
312
+ class SetDataAttr(RequestBodyStruct):
313
+ magic: int = field(XmpInt())
314
+ """integer, must be the special value -1480937026."""
315
+ operation: ChassisShutdownAction = field(XmpByte())
316
+ """coded byte, what to do after shutting chassis down."""
317
+
318
+ def set(self, operation: ChassisShutdownAction) -> Token[None]:
319
+ """Shuts down the chassis, and either restarts it in a clean state or leaves it powered off.
320
+
321
+ :param operation: what to do after shutting chassis down.
322
+ :type operation: ChassisShutdownAction
323
+ """
324
+
325
+ return Token(self._connection, build_set_request(self, magic=-1480937026, operation=operation))
326
+
327
+ set_restart = functools.partialmethod(set, ChassisShutdownAction.RESTART)
328
+ """Shuts down the tester and then restarts it.
329
+ """
330
+
331
+ set_poweroff = functools.partialmethod(set, ChassisShutdownAction.POWER_OFF)
332
+ """Shuts down the tester and leaves it powered off.
333
+ """
334
+
335
+
336
+ @register_command
337
+ @dataclass
338
+ class C_CAPABILITIES:
339
+ """
340
+ A series of integer values specifying various internal limits (aka.
341
+ capabilities) of the chassis.
342
+ """
343
+
344
+ code: typing.ClassVar[int] = 9
345
+ pushed: typing.ClassVar[bool] = False
346
+
347
+ _connection: 'interfaces.IConnection'
348
+
349
+ class GetDataAttr(ResponseBodyStruct):
350
+ version: int = field(XmpInt())
351
+ """integer, chassis software build number."""
352
+ max_name_len: int = field(XmpInt())
353
+ """integer, max ASCII characters in chassis name."""
354
+ max_comment_len: int = field(XmpInt())
355
+ """integer, max ASCII characters in chassis comment."""
356
+ max_password_len: int = field(XmpInt())
357
+ """integer, max ASCII characters in chassis password."""
358
+ max_ext_rate: int = field(XmpInt())
359
+ """integer, maximum rate for external traffic."""
360
+ max_session_count: int = field(XmpInt())
361
+ """integer, max number of management and scripting sessions."""
362
+ max_chain_depth: int = field(XmpInt())
363
+ """integer, max chain index."""
364
+ max_module_count: int = field(XmpInt())
365
+ """integer, maximum number of L23 modules."""
366
+ max_protocol_count: int = field(XmpInt())
367
+ """integer, max protocol segments in a packet."""
368
+ can_stream_based_arp: int = field(XmpInt())
369
+ """integer, does server support stream-based ARP/NDP?"""
370
+ can_sync_traffic_start: int = field(XmpInt())
371
+ """integer, does server support synchronous traffic start?"""
372
+ can_read_log_files: int = field(XmpInt())
373
+ """integer, can clients read debug log files from server?"""
374
+ can_par_module_upgrade: int = field(XmpInt())
375
+ """integer, can server handle parallel module upgrades?"""
376
+ can_upgrade_timekeeper: int = field(XmpInt())
377
+ """integer, is server capable of upgrading the TimeKeeper application?"""
378
+ can_custom_defaults: int = field(XmpInt())
379
+ """integer, can server handle custom default values for XMP parameters?"""
380
+ can_latency_f2f: int = field(XmpInt())
381
+ """integer, can server handle first-to-first latency mode?"""
382
+ max_owner_name_length: int = field(XmpInt())
383
+ """integer, max number of ASCII characters in C_OWNER name"""
384
+ can_read_temperatures: int = field(XmpInt())
385
+ """integer, can the server read out chassis and/or CPU temperatures? (C_TEMPERATURE ?)"""
386
+
387
+ def get(self) -> Token[GetDataAttr]:
388
+ """Get the internal limits (capabilities) of the tester.
389
+
390
+ :return: A series of integer values specifying various internal limits
391
+ - chassis software build number
392
+ - max ASCII characters in chassis name
393
+ - max ASCII characters in chassis comment
394
+ - max ASCII characters in chassis password
395
+ - maximum rate for external traffic
396
+ - max number of management and scripting sessions
397
+ - max chain index
398
+ - maximum number of L23 modules
399
+ - max protocol segments in a packet
400
+ - does server support stream-based ARP/NDP?
401
+ - does server support synchronous traffic start?
402
+ - can clients read debug log files from server?
403
+ - can server handle parallel module upgrades?
404
+ - is server capable of upgrading the TimeKeeper application?
405
+ - can server handle custom default values for XMP parameters?
406
+ - can server handle first-to-first latency mode?
407
+ - max number of ASCII characters in ``C_OWNER`` name
408
+ - can the server read out chassis and/or CPU temperatures?
409
+
410
+ :rtype: C_CAPABILITIES.GetDataAttr
411
+ """
412
+
413
+ return Token(self._connection, build_get_request(self))
414
+
415
+
416
+ @register_command
417
+ @dataclass
418
+ class C_MODEL:
419
+ """
420
+ Gets the specific model of this Xena chassis.
421
+ """
422
+
423
+ code: typing.ClassVar[int] = 10
424
+ pushed: typing.ClassVar[bool] = False
425
+
426
+ _connection: 'interfaces.IConnection'
427
+
428
+ class GetDataAttr(ResponseBodyStruct):
429
+ model: str = field(XmpStr())
430
+ """string, the Xena model designation for the chassis."""
431
+
432
+ def get(self) -> Token[GetDataAttr]:
433
+ """Get the model of this Xena tester.
434
+
435
+ :return: the model of the Xena tester
436
+ :rtype: C_MODEL.GetDataAttr
437
+ """
438
+
439
+ return Token(self._connection, build_get_request(self))
440
+
441
+
442
+ @register_command
443
+ @dataclass
444
+ class C_SERIALNO:
445
+ """
446
+ Gets the unique serial number of this particular Xena chassis.
447
+ """
448
+
449
+ code: typing.ClassVar[int] = 11
450
+ pushed: typing.ClassVar[bool] = False
451
+
452
+ _connection: 'interfaces.IConnection'
453
+
454
+ class GetDataAttr(ResponseBodyStruct):
455
+ serial_number: int = field(XmpInt())
456
+ """integer, the serial number of this chassis."""
457
+
458
+ def get(self) -> Token[GetDataAttr]:
459
+ """Get the serial number of this Xena tester.
460
+
461
+ :return: the serial number of the Xena tester
462
+ :rtype: C_SERIALNO.GetDataAttr
463
+ """
464
+
465
+ return Token(self._connection, build_get_request(self))
466
+
467
+
468
+ @register_command
469
+ @dataclass
470
+ class C_VERSIONNO:
471
+ """
472
+ Gets the major version numbers for the chassis firmware and the Xena PCI
473
+ driver installed on the chassis.
474
+ """
475
+
476
+ code: typing.ClassVar[int] = 12
477
+ pushed: typing.ClassVar[bool] = False
478
+
479
+ _connection: 'interfaces.IConnection'
480
+
481
+ class GetDataAttr(ResponseBodyStruct):
482
+ chassis_major_version: int = field(XmpInt())
483
+ """integer, the chassis firmware major version number."""
484
+ pci_driver_version: int = field(XmpInt())
485
+ """integer, the cXena PCI driver version."""
486
+
487
+ def get(self) -> Token[GetDataAttr]:
488
+ """Gets the major version numbers for the tester firmware and the Xena PCI driver installed on the chassis.
489
+
490
+ :return: the firmware major version number of the tester and the PCI driver version
491
+ :rtype: C_VERSIONNO.GetDataAttr
492
+ """
493
+
494
+ return Token(self._connection, build_get_request(self))
495
+
496
+
497
+ @register_command
498
+ @dataclass
499
+ class C_PORTCOUNTS:
500
+ """
501
+ Gets the number of ports in each module slot of the chassis, and indirectly
502
+ the number of slots and modules.
503
+
504
+ .. note::
505
+
506
+ CFP modules return the number 8 which is the maximum number of 10G ports, but the actual number of ports can be configured dynamically using the M_CFPCONFIGEXT` command.
507
+
508
+ """
509
+
510
+ code: typing.ClassVar[int] = 13
511
+ pushed: typing.ClassVar[bool] = False
512
+
513
+ _connection: 'interfaces.IConnection'
514
+
515
+ class GetDataAttr(ResponseBodyStruct):
516
+ port_counts: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
517
+ """list of bytes, the number of ports, typically 2 or 6, or 0 for an empty slot."""
518
+
519
+ def get(self) -> Token[GetDataAttr]:
520
+ """Get the number of ports in each module slot of the tester, and indirectly the number of slots and modules.
521
+
522
+ :return: the number of ports of each module slot of the tester, 0 for an empty slot.
523
+ :rtype: C_PORTCOUNTS.GetDataAttr
524
+ """
525
+
526
+ return Token(self._connection, build_get_request(self))
527
+
528
+
529
+ @register_command
530
+ @dataclass
531
+ class C_PORTERRORS:
532
+ """
533
+ Gets the number of errors detected across all streams on each port of each
534
+ test module of the chassis. The counts are ordered in sequence with those of
535
+ the module in the lowest numbered chassis slot first. Empty slots are skipped
536
+ so that a chassis with a 6-port and a 2-port test module will return eight
537
+ counts regardless of which slots they are in.
538
+
539
+ .. note::
540
+
541
+ CFP modules return eight error counts since they can be configured as up to eight 10G ports. When in 100G and 40G mode only the first one or two counts are significant.
542
+
543
+ .. note::
544
+
545
+ FCS errors are included, which leads to double-counting for streams detecting lost packets using the test payload mechanism.
546
+
547
+ """
548
+
549
+ code: typing.ClassVar[int] = 16
550
+ pushed: typing.ClassVar[bool] = False
551
+
552
+ _connection: 'interfaces.IConnection'
553
+
554
+ class GetDataAttr(ResponseBodyStruct):
555
+ error_count: typing.List[int] = field(XmpSequence(types_chunk=[XmpLong()]))
556
+ """list of long integers, the total number of errors across all streams, and including FCS errors."""
557
+
558
+ def get(self) -> Token[GetDataAttr]:
559
+ """Gets the number of errors detected across all streams on each port of each
560
+ test module of the chassis. The counts are ordered in sequence with those of
561
+ the module in the lowest numbered chassis slot first. Empty slots are skipped
562
+ so that a chassis with a 6-port and a 2-port test module will return eight
563
+ counts regardless of which slots they are in.
564
+
565
+ :return: the total number of errors across all streams, and including FCS errors.
566
+ :rtype: C_PORTERRORS.GetDataAttr
567
+ """
568
+
569
+ return Token(self._connection, build_get_request(self))
570
+
571
+
572
+ @register_command
573
+ @dataclass
574
+ class C_REMOTEPORTCOUNTS:
575
+ """
576
+ Gets the number of ports of each remote module. A remote module is a
577
+ relative to the xenaserver, for example, xenal47server. The first integer in
578
+ the returned list is always 0 because it represents the xenaserver, which is
579
+ not a remote module.
580
+ """
581
+
582
+ code: typing.ClassVar[int] = 17
583
+ pushed: typing.ClassVar[bool] = False
584
+
585
+ _connection: 'interfaces.IConnection'
586
+
587
+ class GetDataAttr(ResponseBodyStruct):
588
+ port_counts: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
589
+ """list of bytes, the number of ports, typically 2 or 6, or 0 for an empty slot."""
590
+
591
+ def get(self) -> Token[GetDataAttr]:
592
+ """Gets the number of ports of each remote module. A remote module is a
593
+ relative to the xenaserver, for example, xenal47server. The first integer in
594
+ the returned list is always 0 because it represents the xenaserver, which is
595
+ not a remote module.
596
+
597
+ :return: the number of ports of each module slot of the tester, 0 for an empty slot.
598
+ :rtype: C_REMOTEPORTCOUNTS.GetDataAttr
599
+ """
600
+
601
+ return Token(self._connection, build_get_request(self))
602
+
603
+
604
+ @register_command
605
+ @dataclass
606
+ class C_BUILDSTRING:
607
+ """
608
+ Identify the hostname of the PC that builds the xenaserver. It uniquely
609
+ identifies the build of a xenaserver.
610
+ """
611
+
612
+ code: typing.ClassVar[int] = 19
613
+ pushed: typing.ClassVar[bool] = False
614
+
615
+ _connection: 'interfaces.IConnection'
616
+
617
+ class GetDataAttr(ResponseBodyStruct):
618
+ build_string: str = field(XmpStr())
619
+ """string, identify the hostname of the PC that builds the xenaserver"""
620
+
621
+ def get(self) -> Token[GetDataAttr]:
622
+ """Get the build string of the xenaserver.
623
+
624
+ :return: build string that identifies the hostname of the PC that builds the xenaserver
625
+ :rtype: C_BUILDSTRING.GetDataAttr
626
+ """
627
+
628
+ return Token(self._connection, build_get_request(self))
629
+
630
+
631
+ @register_command
632
+ @dataclass
633
+ class C_NAME:
634
+ """
635
+ The name of the chassis, as it appears at various places in the user interface.
636
+ The name is also used to distinguish the various chassis contained within a
637
+ testbed and in files containing the configuration for an entire test case.
638
+ """
639
+
640
+ code: typing.ClassVar[int] = 20
641
+ pushed: typing.ClassVar[bool] = False
642
+
643
+ _connection: 'interfaces.IConnection'
644
+
645
+ class GetDataAttr(ResponseBodyStruct):
646
+ chassis_name: str = field(XmpStr())
647
+ """string, containing the name of the chassis."""
648
+
649
+ class SetDataAttr(RequestBodyStruct):
650
+ chassis_name: str = field(XmpStr())
651
+ """string, containing the name of the chassis."""
652
+
653
+ def get(self) -> Token[GetDataAttr]:
654
+ """Get the name of the tester
655
+
656
+ :return: the name of the tester
657
+ :rtype: C_NAME.GetDataAttr
658
+ """
659
+
660
+ return Token(self._connection, build_get_request(self))
661
+
662
+ def set(self, chassis_name: str) -> Token[None]:
663
+ """Set the name of the tester
664
+
665
+ :param chassis_name: the name of the tester
666
+ :type chassis_name: str
667
+ """
668
+
669
+ return Token(self._connection, build_set_request(self, chassis_name=chassis_name))
670
+
671
+
672
+ @register_command
673
+ @dataclass
674
+ class C_COMMENT:
675
+ """
676
+ The description of the chassis.
677
+ """
678
+
679
+ code: typing.ClassVar[int] = 21
680
+ pushed: typing.ClassVar[bool] = False
681
+
682
+ _connection: 'interfaces.IConnection'
683
+
684
+ class GetDataAttr(ResponseBodyStruct):
685
+ comment: str = field(XmpStr())
686
+ """string, containing the description of the chassis."""
687
+
688
+ class SetDataAttr(RequestBodyStruct):
689
+ comment: str = field(XmpStr())
690
+ """string, containing the description of the chassis."""
691
+
692
+ def get(self) -> Token[GetDataAttr]:
693
+ """Get the description of the tester.
694
+
695
+ :return: the description of the tester
696
+ :rtype: C_COMMENT.GetDataAttr
697
+ """
698
+
699
+ return Token(self._connection, build_get_request(self))
700
+
701
+ def set(self, comment: str) -> Token[None]:
702
+ """Set the description of the tester.
703
+
704
+ :param comment: the description of the tester
705
+ :type comment: str
706
+ """
707
+
708
+ return Token(self._connection, build_set_request(self, comment=comment))
709
+
710
+
711
+ @register_command
712
+ @dataclass
713
+ class C_PASSWORD:
714
+ """
715
+ The password of the chassis, which must be provided when logging on to the chassis.
716
+ """
717
+
718
+ code: typing.ClassVar[int] = 22
719
+ pushed: typing.ClassVar[bool] = False
720
+
721
+ _connection: 'interfaces.IConnection'
722
+
723
+ class GetDataAttr(ResponseBodyStruct):
724
+ password: str = field(XmpStr())
725
+ """string, containing the password for the chassis."""
726
+
727
+ class SetDataAttr(RequestBodyStruct):
728
+ password: str = field(XmpStr())
729
+ """string, containing the password for the chassis."""
730
+
731
+ def get(self) -> Token[GetDataAttr]:
732
+ """Get the password of the tester.
733
+
734
+ :return: the password of the tester
735
+ :rtype: C_PASSWORD.GetDataAttr
736
+ """
737
+
738
+ return Token(self._connection, build_get_request(self))
739
+
740
+ def set(self, password: str) -> Token[None]:
741
+ """Set the password of the tester.
742
+
743
+ :param password: the password of the tester
744
+ :type password: str
745
+ """
746
+
747
+ return Token(self._connection, build_set_request(self, password=password))
748
+
749
+
750
+ @register_command
751
+ @dataclass
752
+ class C_VERSIONSTR:
753
+ """
754
+ Returns xenaserver version number in the new format, e.g. "467.0.0+1.0"
755
+
756
+ Obsoletes C_VERSIONNO and C_VERSIONNO_MINOR
757
+ """
758
+
759
+ code: typing.ClassVar[int] = 23
760
+ pushed: typing.ClassVar[bool] = False
761
+
762
+ _connection: 'interfaces.IConnection'
763
+
764
+ class GetDataAttr(ResponseBodyStruct):
765
+ version_str: str = field(XmpStr())
766
+ """string, xenaserver version number in the new format."""
767
+
768
+ def get(self) -> Token[GetDataAttr]:
769
+ """Returns xenaserver version number in the new format.
770
+
771
+ :return: xenaserver version number in the new format
772
+ :rtype: C_VERSIONSTR.GetDataAttr
773
+ """
774
+
775
+ return Token(self._connection, build_get_request(self))
776
+
777
+
778
+ @register_command
779
+ @dataclass
780
+ class C_IPADDRESS:
781
+ """
782
+ The network configuration parameters of the chassis management port.
783
+ """
784
+
785
+ code: typing.ClassVar[int] = 24
786
+ pushed: typing.ClassVar[bool] = False
787
+
788
+ _connection: 'interfaces.IConnection'
789
+
790
+ class GetDataAttr(ResponseBodyStruct):
791
+ ipv4_address: ipaddress.IPv4Address = field(XmpIPv4Address())
792
+ """address, the static IP address of the chassis."""
793
+ subnet_mask: ipaddress.IPv4Address = field(XmpIPv4Address())
794
+ """address, the subnet mask of the local network segment."""
795
+ gateway: ipaddress.IPv4Address = field(XmpIPv4Address())
796
+ """address, the gateway of the local network segment."""
797
+
798
+ class SetDataAttr(RequestBodyStruct):
799
+ ipv4_address: ipaddress.IPv4Address = field(XmpIPv4Address())
800
+ """address, the static IP address of the chassis."""
801
+ subnet_mask: ipaddress.IPv4Address = field(XmpIPv4Address())
802
+ """address, the subnet mask of the local network segment."""
803
+ gateway: ipaddress.IPv4Address = field(XmpIPv4Address())
804
+ """address, the gateway of the local network segment."""
805
+
806
+ def get(self) -> Token[GetDataAttr]:
807
+ """Get the IP configuration information of the tester.
808
+
809
+ :return:
810
+ - the static IP address of the chassis
811
+ - the subnet mask of the local network segment
812
+ - the gateway of the local network segment
813
+ :rtype: C_IPADDRESS.GetDataAttr
814
+ """
815
+
816
+ return Token(self._connection, build_get_request(self))
817
+
818
+ def set(self, ipv4_address: ipaddress.IPv4Address, subnet_mask: ipaddress.IPv4Address, gateway: ipaddress.IPv4Address) -> Token[None]:
819
+ """the IP configuration information of the tester.
820
+
821
+ :param ipv4_address: the static IP address of the chassis
822
+ :type ipv4_address: ipaddress.IPv4Address
823
+ :param subnet_mask: the subnet mask of the local network segment
824
+ :type subnet_mask: ipaddress.IPv4Address
825
+ :param gateway: the gateway of the local network segment
826
+ :type gateway: ipaddress.IPv4Address
827
+ """
828
+
829
+ return Token(self._connection, build_set_request(self, ipv4_address=ipv4_address, subnet_mask=subnet_mask, gateway=gateway))
830
+
831
+
832
+ @register_command
833
+ @dataclass
834
+ class C_DHCP:
835
+ """
836
+ Controls whether the chassis will use DHCP to get the management IP address.
837
+ """
838
+
839
+ code: typing.ClassVar[int] = 25
840
+ pushed: typing.ClassVar[bool] = False
841
+
842
+ _connection: 'interfaces.IConnection'
843
+
844
+ class GetDataAttr(ResponseBodyStruct):
845
+ on_off: OnOff = field(XmpByte())
846
+ """coded byte, whether DHCP is enabled or disabled."""
847
+
848
+ class SetDataAttr(RequestBodyStruct):
849
+ on_off: OnOff = field(XmpByte())
850
+ """coded byte, whether DHCP is enabled or disabled."""
851
+
852
+ def get(self) -> Token[GetDataAttr]:
853
+ """Get whether DHCP is enabled for getting management IP.
854
+
855
+ :return: whether DHCP is enabled.
856
+ :rtype: C_DHCP.GetDataAttr
857
+ """
858
+
859
+ return Token(self._connection, build_get_request(self))
860
+
861
+ def set(self, on_off: OnOff) -> Token[None]:
862
+ """Set DHCP for getting management IP.
863
+
864
+ :param on_off: whether DHCP is enabled or disabled.
865
+ :type on_off: OnOff
866
+ """
867
+
868
+ return Token(self._connection, build_set_request(self, on_off=on_off))
869
+
870
+ set_off = functools.partialmethod(set, OnOff.OFF)
871
+ """Disable DHCP for for getting management IP.
872
+ """
873
+
874
+ set_on = functools.partialmethod(set, OnOff.ON)
875
+ """Enable on to DHCP for for getting management IP.
876
+ """
877
+
878
+
879
+ @register_command
880
+ @dataclass
881
+ class C_MACADDRESS:
882
+ """
883
+ Get the MAC address for the chassis management port.
884
+ """
885
+
886
+ code: typing.ClassVar[int] = 26
887
+ pushed: typing.ClassVar[bool] = False
888
+
889
+ _connection: 'interfaces.IConnection'
890
+
891
+ class GetDataAttr(ResponseBodyStruct):
892
+ mac_address: Hex = field(XmpMacAddress())
893
+ """six hex bytes, indicating the MAC address"""
894
+
895
+ def get(self) -> Token[GetDataAttr]:
896
+ """Get the MAC address for the chassis management port.
897
+
898
+ :return: the MAC address for the chassis management port
899
+ :rtype: C_MACADDRESS.GetDataAttr
900
+ """
901
+
902
+ return Token(self._connection, build_get_request(self))
903
+
904
+
905
+ @register_command
906
+ @dataclass
907
+ class C_HOSTNAME:
908
+ """
909
+ Get or set the chassis hostname used when DHCP is enabled.
910
+ """
911
+
912
+ code: typing.ClassVar[int] = 27
913
+ pushed: typing.ClassVar[bool] = False
914
+
915
+ _connection: 'interfaces.IConnection'
916
+
917
+ class GetDataAttr(ResponseBodyStruct):
918
+ hostname: str = field(XmpStr())
919
+ """string, hostname for chassis (default value "xena-")"""
920
+
921
+ class SetDataAttr(RequestBodyStruct):
922
+ hostname: str = field(XmpStr())
923
+ """string, hostname for chassis (default value "xena-")"""
924
+
925
+ def get(self) -> Token[GetDataAttr]:
926
+ """Get the chassis hostname used when DHCP is enabled.
927
+
928
+ :return: the chassis hostname
929
+ :rtype: C_HOSTNAME.GetDataAttr
930
+ """
931
+
932
+ return Token(self._connection, build_get_request(self))
933
+
934
+ def set(self, hostname: str) -> Token[None]:
935
+ """Set the chassis hostname.
936
+
937
+ :param hostname: the chassis hostname
938
+ :type hostname: str
939
+ """
940
+
941
+ return Token(self._connection, build_set_request(self, hostname=hostname))
942
+
943
+
944
+ @register_command
945
+ @dataclass
946
+ class C_FLASH:
947
+ """
948
+ Make all the test port LEDs flash on and off with a 1-second interval. This is
949
+ helpful if you have multiple chassis mounted side by side and you need to
950
+ identify a specific one.
951
+
952
+ NOTICE: Require Tester to be reserved before change value.
953
+ """
954
+
955
+ code: typing.ClassVar[int] = 28
956
+ pushed: typing.ClassVar[bool] = False
957
+
958
+ _connection: 'interfaces.IConnection'
959
+
960
+ class GetDataAttr(ResponseBodyStruct):
961
+ on_off: OnOff = field(XmpByte())
962
+ """coded byte, determines whether to blink all test port LEDs."""
963
+
964
+ class SetDataAttr(RequestBodyStruct):
965
+ on_off: OnOff = field(XmpByte())
966
+ """coded byte, determines whether to blink all test port LEDs."""
967
+
968
+ def get(self) -> Token[GetDataAttr]:
969
+ """Get the status of test port LEDs.
970
+
971
+ :return: the blinking status of test port LEDs
972
+ :rtype: C_FLASH.GetDataAttr
973
+ """
974
+
975
+ return Token(self._connection, build_get_request(self))
976
+
977
+ def set(self, on_off: OnOff) -> Token[None]:
978
+ """Set test ports LEDs blinking status.
979
+
980
+ :param on_off: determines whether to blink all test port LEDs.
981
+ :type on_off: OnOff
982
+ """
983
+
984
+ return Token(self._connection, build_set_request(self, on_off=on_off))
985
+
986
+ set_off = functools.partialmethod(set, OnOff.OFF)
987
+ """Disable flashing test port LEDs.
988
+ """
989
+
990
+ set_on = functools.partialmethod(set, OnOff.ON)
991
+ """Enable flashing test port LEDs.
992
+ """
993
+
994
+
995
+ @register_command
996
+ @dataclass
997
+ class C_DEBUGLOGS:
998
+ """
999
+ Allows to dump all the logs of a chassis.
1000
+ """
1001
+
1002
+ code: typing.ClassVar[int] = 30
1003
+ pushed: typing.ClassVar[bool] = False
1004
+
1005
+ _connection: 'interfaces.IConnection'
1006
+
1007
+ class GetDataAttr(ResponseBodyStruct):
1008
+ message_length: int = field(XmpInt())
1009
+ """integer, length of the message."""
1010
+ data: Hex = field(XmpHex())
1011
+ """list of hex bytes, all the logs of a chassis"""
1012
+
1013
+ def get(self) -> Token[GetDataAttr]:
1014
+ """Get chassis logs.
1015
+
1016
+ :return: length of the message and all the logs of the chassis
1017
+ :rtype: C_DEBUGLOGS.GetDataAttr
1018
+ """
1019
+
1020
+ return Token(self._connection, build_get_request(self))
1021
+
1022
+
1023
+ @register_command
1024
+ @dataclass
1025
+ class C_TEMPERATURE:
1026
+ """
1027
+ Get chassis temperature readings, if supported. Unit is millidegree Celsius.
1028
+ """
1029
+
1030
+ code: typing.ClassVar[int] = 31
1031
+ pushed: typing.ClassVar[bool] = False
1032
+
1033
+ _connection: 'interfaces.IConnection'
1034
+
1035
+ class GetDataAttr(ResponseBodyStruct):
1036
+ mb1_temperature: int = field(XmpInt())
1037
+ """integer, the temperature of motherboard 1. Unit is millidegree Celsius."""
1038
+ mb2_temperature: int = field(XmpInt())
1039
+ """integer, the temperature of motherboard 2. Unit is millidegree Celsius."""
1040
+ cpu_temperature: int = field(XmpInt())
1041
+ """integer, the temperature of CPU. Unit is millidegree Celsius."""
1042
+
1043
+ def get(self) -> Token[GetDataAttr]:
1044
+ """Get chassis temperature readings.
1045
+
1046
+ :return:
1047
+ - the temperature of motherboard 1 (millidegree Celsius)
1048
+ - the temperature of motherboard 2 (millidegree Celsius)
1049
+ - the temperature of CPU (millidegree Celsius)
1050
+ :rtype: C_TEMPERATURE.GetDataAttr
1051
+ """
1052
+
1053
+ return Token(self._connection, build_get_request(self))
1054
+
1055
+
1056
+ @register_command
1057
+ @dataclass
1058
+ class C_RESTPORT:
1059
+ """
1060
+ The TCP port used by the REST API server.
1061
+ """
1062
+
1063
+ code: typing.ClassVar[int] = 32
1064
+ pushed: typing.ClassVar[bool] = False
1065
+
1066
+ _connection: 'interfaces.IConnection'
1067
+
1068
+ class GetDataAttr(ResponseBodyStruct):
1069
+ tcp_port: int = field(XmpInt())
1070
+ """integer, containing the TCP port number (default 57911)"""
1071
+
1072
+ class SetDataAttr(RequestBodyStruct):
1073
+ tcp_port: int = field(XmpInt())
1074
+ """integer, containing the TCP port number (default 57911)"""
1075
+
1076
+ def get(self) -> Token[GetDataAttr]:
1077
+ """Get the TCP port number used by the REST API server.
1078
+
1079
+ :return: the TCP port number used by the REST API server
1080
+ :rtype: xt.XmpInt
1081
+ """
1082
+
1083
+ return Token(self._connection, build_get_request(self))
1084
+
1085
+ def set(self, tcp_port: int) -> Token[None]:
1086
+ """Set the TCP port number used by the REST API server.
1087
+
1088
+ :param tcp_port: the TCP port number (default 57911)
1089
+ :type tcp_port: int
1090
+ """
1091
+
1092
+ return Token(self._connection, build_set_request(self, tcp_port=tcp_port))
1093
+
1094
+
1095
+ @register_command
1096
+ @dataclass
1097
+ class C_RESTENABLE:
1098
+ """
1099
+ Controls whether the chassis will run REST API server or not. The command takes
1100
+ affect only after chassis reset. To start/stop REST API server use ``C_RESTCONTROL`` command.
1101
+ """
1102
+
1103
+ code: typing.ClassVar[int] = 33
1104
+ pushed: typing.ClassVar[bool] = False
1105
+
1106
+ _connection: 'interfaces.IConnection'
1107
+
1108
+ class GetDataAttr(ResponseBodyStruct):
1109
+ on_off: OnOff = field(XmpByte())
1110
+ """coded byte, determines whether REST API server should be enabled or disabled."""
1111
+
1112
+ class SetDataAttr(RequestBodyStruct):
1113
+ on_off: OnOff = field(XmpByte())
1114
+ """coded byte, determines whether REST API server should be enabled or disabled."""
1115
+
1116
+ def get(self) -> Token[GetDataAttr]:
1117
+ """Get the On/Off status of the REST API server.
1118
+
1119
+ :return: the status of the REST API server, whether it is enabled.
1120
+ :rtype: xt.XmpByte
1121
+ """
1122
+
1123
+ return Token(self._connection, build_get_request(self))
1124
+
1125
+ def set(self, on_off: OnOff) -> Token[None]:
1126
+ """Set the On/Off status of the REST API server.
1127
+
1128
+ :param on_off: determines whether REST API server should be enabled or disabled
1129
+ :type on_off: OnOff
1130
+ """
1131
+
1132
+ return Token(self._connection, build_set_request(self, on_off=on_off))
1133
+
1134
+ set_off = functools.partialmethod(set, OnOff.OFF)
1135
+ """Disable the REST API server.
1136
+ """
1137
+
1138
+ set_on = functools.partialmethod(set, OnOff.ON)
1139
+ """Enable the REST API server.
1140
+ """
1141
+
1142
+
1143
+ @register_command
1144
+ @dataclass
1145
+ class C_RESTCONTROL:
1146
+ """
1147
+ Controls REST API server. This command should be used with extra care as it can
1148
+ affect other users using the server.
1149
+ """
1150
+
1151
+ code: typing.ClassVar[int] = 34
1152
+ pushed: typing.ClassVar[bool] = False
1153
+
1154
+ _connection: 'interfaces.IConnection'
1155
+
1156
+ class SetDataAttr(RequestBodyStruct):
1157
+ operation: RESTControlAction = field(XmpByte())
1158
+ """coded byte, what to do with the REST API server."""
1159
+
1160
+ def set(self, operation: RESTControlAction) -> Token[None]:
1161
+ """Controlling the REST API server.
1162
+
1163
+ :param operation: what to do with the REST API server
1164
+ :type operation: RESTControlAction
1165
+ """
1166
+
1167
+ return Token(self._connection, build_set_request(self, operation=operation))
1168
+
1169
+
1170
+ @register_command
1171
+ @dataclass
1172
+ class C_RESTSTATUS:
1173
+ """
1174
+ Gets the REST API server operation status - whether it is active (running) or
1175
+ not. To get the admin status (whether the server is enabled or disabled) use
1176
+ ``C_RESTCONTROL`` command.
1177
+ """
1178
+
1179
+ code: typing.ClassVar[int] = 35
1180
+ pushed: typing.ClassVar[bool] = False
1181
+
1182
+ _connection: 'interfaces.IConnection'
1183
+
1184
+ class GetDataAttr(ResponseBodyStruct):
1185
+ status: ServiceStatus = field(XmpByte())
1186
+ """coded byte, determines the REST API server running status."""
1187
+
1188
+ def get(self) -> Token[GetDataAttr]:
1189
+ """Get the operation status of th REST API server.
1190
+
1191
+ :return: the operation status of th REST API server
1192
+ :rtype: C_RESTSTATUS.GetDataAttr
1193
+ """
1194
+
1195
+ return Token(self._connection, build_get_request(self))
1196
+
1197
+
1198
+ @register_command
1199
+ @dataclass
1200
+ class C_WATCHDOG:
1201
+ """
1202
+ If the chassis stalls for a long time, when the timer expires the chassis will
1203
+ be rebooted automatically.
1204
+ """
1205
+
1206
+ code: typing.ClassVar[int] = 36
1207
+ pushed: typing.ClassVar[bool] = False
1208
+
1209
+ _connection: 'interfaces.IConnection'
1210
+
1211
+ class GetDataAttr(ResponseBodyStruct):
1212
+ timer_value: int = field(XmpInt())
1213
+ """integer, the timer value that reboots the chassis. Unit = second."""
1214
+
1215
+ class SetDataAttr(RequestBodyStruct):
1216
+ timer_value: int = field(XmpInt())
1217
+ """integer, the timer value that reboots the chassis. Unit = second."""
1218
+
1219
+ def get(self) -> Token[GetDataAttr]:
1220
+ """Get the time value that reboots the chassis if it stalls for a long time.
1221
+
1222
+ :return: the timer value that reboots the chassis. Unit = second.
1223
+ :rtype: C_WATCHDOG.GetDataAttr
1224
+ """
1225
+
1226
+ return Token(self._connection, build_get_request(self))
1227
+
1228
+ def set(self, timer_value: int) -> Token[None]:
1229
+ """Set the time value that reboots the chassis if it stalls for a long time.
1230
+
1231
+ :param timer_value: the timer value that reboots the chassis
1232
+ :type timer_value: int
1233
+ """
1234
+
1235
+ return Token(self._connection, build_set_request(self, timer_value=timer_value))
1236
+
1237
+
1238
+ @register_command
1239
+ @dataclass
1240
+ class C_DEBUGCMD:
1241
+ """
1242
+ Chassis debug command
1243
+ """
1244
+
1245
+ code: typing.ClassVar[int] = 37
1246
+ pushed: typing.ClassVar[bool] = False
1247
+
1248
+ _connection: 'interfaces.IConnection'
1249
+ _cmd_xindex: int
1250
+
1251
+ class GetDataAttr(ResponseBodyStruct):
1252
+ data: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1253
+
1254
+ class SetDataAttr(RequestBodyStruct):
1255
+ data: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1256
+
1257
+ def get(self) -> Token[GetDataAttr]:
1258
+ return Token(self._connection, build_get_request(self, indices=[self._cmd_xindex]))
1259
+
1260
+ def set(self, data: typing.List[int]) -> Token[None]:
1261
+ return Token(self._connection, build_set_request(self, indices=[self._cmd_xindex], data=data))
1262
+
1263
+
1264
+ @register_command
1265
+ @dataclass
1266
+ class C_INDICES:
1267
+ """
1268
+ Gets the session indices for all current sessions on the chassis.
1269
+ """
1270
+
1271
+ code: typing.ClassVar[int] = 40
1272
+ pushed: typing.ClassVar[bool] = False
1273
+
1274
+ _connection: 'interfaces.IConnection'
1275
+
1276
+ class GetDataAttr(ResponseBodyStruct):
1277
+ session_ids: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1278
+ """list of integers, the session indices for all current sessions on the chassis."""
1279
+
1280
+ def get(self) -> Token[GetDataAttr]:
1281
+ """Gets the session indices for all current sessions on the chassis.
1282
+
1283
+ :return: the session indices for all current sessions on the chassis
1284
+ :rtype: C_INDICES.GetDataAttr
1285
+ """
1286
+
1287
+ return Token(self._connection, build_get_request(self))
1288
+
1289
+
1290
+ @register_command
1291
+ @dataclass
1292
+ class C_STATSESSION:
1293
+ """
1294
+ Gets information and statistics for a particular session on the chassis.
1295
+ """
1296
+
1297
+ code: typing.ClassVar[int] = 41
1298
+ pushed: typing.ClassVar[bool] = False
1299
+
1300
+ _connection: 'interfaces.IConnection'
1301
+ _session_xindex: int
1302
+
1303
+ class GetDataAttr(ResponseBodyStruct):
1304
+ session_type: ChassisSessionType = field(XmpInt())
1305
+ """coded integer, which kind of session."""
1306
+ ipv4_address: ipaddress.IPv4Address = field(XmpIPv4Address())
1307
+ """address, client IP address."""
1308
+ owner: str = field(XmpStr())
1309
+ """string, the name of the session owner."""
1310
+ operation_count: int = field(XmpLong())
1311
+ """long integer, number of operations done during the session."""
1312
+ requested_byte_count: int = field(XmpLong())
1313
+ """long integer, number of bytes received by the chassis."""
1314
+ responded_byte_count: int = field(XmpLong())
1315
+ """long integer, number of bytes sent by the chassis."""
1316
+
1317
+ def get(self) -> Token[GetDataAttr]:
1318
+ """Gets information and statistics for a particular session on the chassis.
1319
+
1320
+ :return:
1321
+ - type of session
1322
+ - client IP address
1323
+ - the name of the session owner
1324
+ - number of operations done during the session
1325
+ - number of bytes received by the chassis
1326
+ - number of bytes sent by the chassis
1327
+ :rtype: C_STATSESSION.GetDataAttr
1328
+ """
1329
+
1330
+ return Token(self._connection, build_get_request(self, indices=[self._session_xindex]))
1331
+
1332
+
1333
+ @register_command
1334
+ @dataclass
1335
+ class C_HEALTH:
1336
+ """
1337
+ Gets the chassis system health information.
1338
+ """
1339
+
1340
+ code: typing.ClassVar[int] = 47
1341
+ pushed: typing.ClassVar[bool] = False
1342
+
1343
+ _connection: 'interfaces.IConnection'
1344
+
1345
+ _sub_indices: typing.List[int]
1346
+
1347
+ class GetDataAttr(ResponseBodyStruct):
1348
+ info: str = field(XmpStr())
1349
+ """Chassis health information json string"""
1350
+
1351
+ def get(self) -> Token[GetDataAttr]:
1352
+ """Gets the Chassis health information.
1353
+
1354
+ :return: Chassis health information json string
1355
+ :rtype: C_HEALTH.GetDataAttr
1356
+ """
1357
+
1358
+ return Token(self._connection, build_get_request(self, indices=self._sub_indices))
1359
+
1360
+
1361
+ @register_command
1362
+ @dataclass
1363
+ class C_TKLICFILE:
1364
+ """
1365
+ Get Xena TimeKeeper license file content.
1366
+ """
1367
+
1368
+ code: typing.ClassVar[int] = 49
1369
+ pushed: typing.ClassVar[bool] = False
1370
+
1371
+ _connection: 'interfaces.IConnection'
1372
+
1373
+ class GetDataAttr(ResponseBodyStruct):
1374
+ license_content: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
1375
+
1376
+ class SetDataAttr(RequestBodyStruct):
1377
+ license_content: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
1378
+
1379
+ def get(self) -> Token[GetDataAttr]:
1380
+ """Get Xena TimeKeeper license file content.
1381
+
1382
+ :return: Xena TimeKeeper license file content
1383
+ :rtype: C_TKLICFILE.GetDataAttr
1384
+ """
1385
+
1386
+ return Token(self._connection, build_get_request(self))
1387
+
1388
+ def set(self, license_content: str) -> Token[None]:
1389
+ """Set Xena TimeKeeper license file content.
1390
+
1391
+ :param license_content: Xena TimeKeeper license file content
1392
+ :type license_content: str
1393
+ """
1394
+
1395
+ return Token(self._connection, build_set_request(self, license_content=license_content))
1396
+
1397
+
1398
+ @register_command
1399
+ @dataclass
1400
+ class C_TKLICSTATE:
1401
+ """
1402
+ Get the state of the Xena TimeKeeper license file content.
1403
+ """
1404
+
1405
+ code: typing.ClassVar[int] = 50
1406
+ pushed: typing.ClassVar[bool] = False
1407
+
1408
+ _connection: 'interfaces.IConnection'
1409
+
1410
+ class GetDataAttr(ResponseBodyStruct):
1411
+ license_file_state: TimeKeeperLicenseFileState = field(XmpByte())
1412
+ """coded byte, timekeeper license state."""
1413
+ license_type: TimeKeeperLicenseType = field(XmpByte())
1414
+ """coded byte, license type."""
1415
+ license_errors: typing.List[TimeKeeperLicenseError] = field(XmpSequence(types_chunk=[XmpInt()]))
1416
+ """coded integers, license errors."""
1417
+
1418
+ def get(self) -> Token[GetDataAttr]:
1419
+ """Get the state of the Xena TimeKeeper license file content.
1420
+
1421
+ :return:
1422
+ - timekeeper license state
1423
+ - license type
1424
+ - license errors
1425
+ :rtype: C_TKLICSTATE.GetDataAttr
1426
+ """
1427
+
1428
+ return Token(self._connection, build_get_request(self))
1429
+
1430
+
1431
+ @register_command
1432
+ @dataclass
1433
+ class C_FILESTART:
1434
+ """
1435
+ Initiates upload of a file to the chassis. This command should be followed by
1436
+ a sequence og ``C_FILEDATA`` parameters to provide the file content, and finally a
1437
+ ``C_FILEFINISH`` to commit the new file to the chassis.
1438
+ """
1439
+
1440
+ code: typing.ClassVar[int] = 51
1441
+ pushed: typing.ClassVar[bool] = False
1442
+
1443
+ _connection: 'interfaces.IConnection'
1444
+
1445
+ class SetDataAttr(RequestBodyStruct):
1446
+ file_type: Hex = field(XmpHex(size=4))
1447
+ """four hex bytes, little-endian integer, the file type, should be 1."""
1448
+ size: Hex = field(XmpHex(size=4))
1449
+ """four hex bytes, little-endian integer, the number of bytes in the file."""
1450
+ time: Hex = field(XmpHex(size=4))
1451
+ """four hex bytes, little-endian integer, the Linux date+time of the file."""
1452
+ mode: Hex = field(XmpHex(size=4))
1453
+ """four hex bytes, little-endian integer, the Linux permissions of the file."""
1454
+ checksum: Hex = field(XmpHex(size=4))
1455
+ """four hex bytes, little-endian integer, the checksum of the file."""
1456
+ name: str = field(XmpStr())
1457
+ """string, the name and location of the file, as a full path."""
1458
+
1459
+ def set(self, file_type: Hex, size: Hex, time: Hex, mode: Hex, checksum: Hex, name: str) -> Token[None]:
1460
+ """Initiates upload of a file to the chassis.
1461
+
1462
+ :param file_type: the file type, should be 1
1463
+ :type file_type: str
1464
+ :param size: the number of bytes in the file
1465
+ :type size: str
1466
+ :param time: he Linux date+time of the file
1467
+ :type time: str
1468
+ :param mode: the Linux permissions of the file
1469
+ :type mode: str
1470
+ :param checksum: the checksum of the file
1471
+ :type checksum: str
1472
+ :param name: the name and location of the file, as a full path
1473
+ :type name: str
1474
+ """
1475
+
1476
+ return Token(self._connection, build_set_request(self, file_type=file_type, size=size, time=time, mode=mode, checksum=checksum, name=name))
1477
+
1478
+
1479
+ @register_command
1480
+ @dataclass
1481
+ class C_FILEDATA:
1482
+ """
1483
+ Uploads a fragment of a file to the chassis.
1484
+ """
1485
+
1486
+ code: typing.ClassVar[int] = 52
1487
+ pushed: typing.ClassVar[bool] = False
1488
+
1489
+ _connection: 'interfaces.IConnection'
1490
+
1491
+ class SetDataAttr(RequestBodyStruct):
1492
+ offset: int = field(XmpInt())
1493
+ """integer, the position within the file."""
1494
+ data_bytes: Hex = field(XmpHex())
1495
+ """list of hex bytes, the data content of a section of the file."""
1496
+
1497
+ def set(self, offset: int, data_bytes: Hex) -> Token[None]:
1498
+ """Uploads a fragment of a file to the chassis.
1499
+
1500
+ :param offset: the position within the file
1501
+ :type offset: int
1502
+ :param data_bytes: the data content of a section of the file
1503
+ :type data_bytes: str
1504
+ """
1505
+
1506
+ return Token(self._connection, build_set_request(self, offset=offset, data_bytes=data_bytes))
1507
+
1508
+
1509
+ @register_command
1510
+ @dataclass
1511
+ class C_FILEFINISH:
1512
+ """
1513
+ Completes upload of a file to the chassis. After validation it will replace any
1514
+ existing file with the same name.
1515
+ """
1516
+
1517
+ code: typing.ClassVar[int] = 53
1518
+ pushed: typing.ClassVar[bool] = False
1519
+
1520
+ _connection: 'interfaces.IConnection'
1521
+
1522
+ class SetDataAttr(RequestBodyStruct):
1523
+ magic: int = field(XmpInt())
1524
+ """integer, must be the special value -1480937026."""
1525
+
1526
+ def set(self) -> Token[None]:
1527
+ """Completes upload of a file to the chassis. After validation it will replace any existing file with the same name.
1528
+ """
1529
+
1530
+ return Token(self._connection, build_set_request(self, magic=-1480937026))
1531
+
1532
+
1533
+ @register_command
1534
+ @dataclass
1535
+ class C_TRAFFIC:
1536
+ """
1537
+ Starts or stops the traffic on a number of ports on the chassis simultaneously.
1538
+ The ports are identified by pairs of integers (module port).
1539
+ """
1540
+
1541
+ code: typing.ClassVar[int] = 55
1542
+ pushed: typing.ClassVar[bool] = False
1543
+
1544
+ _connection: 'interfaces.IConnection'
1545
+
1546
+ class SetDataAttr(RequestBodyStruct):
1547
+ on_off: OnOff = field(XmpByte())
1548
+ """coded byte, determines whether to start or stop traffic generation."""
1549
+ module_ports: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1550
+ """list of integers, specifies ports on modules, which should stop or start generating traffic."""
1551
+
1552
+ def set(self, on_off: OnOff, module_ports: typing.List[int]) -> Token[None]:
1553
+ """Starts or stops the traffic on a number of ports on the chassis simultaneously.
1554
+
1555
+ :param on_off: determines whether to start or stop traffic generation
1556
+ :type on_off: OnOff
1557
+ :param module_ports: specifies ports on modules, which should stop or start generating traffic
1558
+ :type module_ports: typing.List[int]
1559
+ """
1560
+
1561
+ return Token(self._connection, build_set_request(self, on_off=on_off, module_ports=module_ports))
1562
+
1563
+ set_off = functools.partialmethod(set, OnOff.OFF)
1564
+ """Stop the traffic on a number of ports on the chassis simultaneously.
1565
+ """
1566
+
1567
+ set_on = functools.partialmethod(set, OnOff.ON)
1568
+ """Start the traffic on a number of ports on the chassis simultaneously.
1569
+ """
1570
+
1571
+
1572
+ @register_command
1573
+ @dataclass
1574
+ class C_VERSIONNO_MINOR:
1575
+ """
1576
+ Gets the minor version number for the chassis firmware. The full version of
1577
+ the chassis firmware is thus where the number is obtained with the ``C_VERSIONNO``
1578
+ command and the number is obtained with the ``C_VERSIONNO_MINOR`` command.
1579
+ """
1580
+
1581
+ code: typing.ClassVar[int] = 56
1582
+ pushed: typing.ClassVar[bool] = False
1583
+
1584
+ _connection: 'interfaces.IConnection'
1585
+
1586
+ class GetDataAttr(ResponseBodyStruct):
1587
+ chassis_minor_version: int = field(XmpInt())
1588
+ """integer, the chassis firmware minor version number."""
1589
+ reserved_1: int = field(XmpInt())
1590
+ """integer, reserved."""
1591
+ reserved_2: int = field(XmpInt())
1592
+ """integer, reserved."""
1593
+
1594
+ def get(self) -> Token[GetDataAttr]:
1595
+ """Get the minor version number for the chassis firmware.
1596
+
1597
+ :return:
1598
+ - the minor version number for the chassis firmware
1599
+ - reserved, 0
1600
+ - reserved, 0
1601
+ :rtype: C_VERSIONNO_MINOR.GetDataAttr
1602
+ """
1603
+
1604
+ return Token(self._connection, build_get_request(self))
1605
+
1606
+
1607
+ @register_command
1608
+ @dataclass
1609
+ class C_MULTIUSER:
1610
+ """
1611
+ Enable or disable the ability to control one resource from several different TCP
1612
+ connections.
1613
+ """
1614
+
1615
+ code: typing.ClassVar[int] = 62
1616
+ pushed: typing.ClassVar[bool] = False
1617
+
1618
+ _connection: 'interfaces.IConnection'
1619
+
1620
+ class GetDataAttr(ResponseBodyStruct):
1621
+ on_off: OnOff = field(XmpByte())
1622
+ """coded byte, enable or disable the ability to control one resource from several different TCP connections"""
1623
+
1624
+ class SetDataAttr(RequestBodyStruct):
1625
+ on_off: OnOff = field(XmpByte())
1626
+ """coded byte, enable or disable the ability to control one resource from several different TCP connections"""
1627
+
1628
+ def get(self) -> Token[GetDataAttr]:
1629
+ """Get the status of the ability to control one resource from several different TCP connections.
1630
+
1631
+ :return: the status of the ability to control one resource from several different TCP connections
1632
+ :rtype: C_MULTIUSER.GetDataAttr
1633
+ """
1634
+
1635
+ return Token(self._connection, build_get_request(self))
1636
+
1637
+ def set(self, on_off: OnOff) -> Token[None]:
1638
+ """Enable or disable the ability to control one resource from several different TCP connections.
1639
+
1640
+ :param on_off: enable or disable the ability to control one resource from several different TCP connections
1641
+ :type on_off: OnOff
1642
+ """
1643
+
1644
+ return Token(self._connection, build_set_request(self, on_off=on_off))
1645
+
1646
+ set_off = functools.partialmethod(set, OnOff.OFF)
1647
+ """Disable the ability to control one resource from several different TCP.
1648
+ """
1649
+
1650
+ set_on = functools.partialmethod(set, OnOff.ON)
1651
+ """Enable the ability to control one resource from several different TCP.
1652
+ """
1653
+
1654
+
1655
+ @register_command
1656
+ @dataclass
1657
+ class C_SCRIPT:
1658
+ """
1659
+ To load and save CLI commands e.g. port configuration, through the binary XMP session.
1660
+ """
1661
+
1662
+ code: typing.ClassVar[int] = 64
1663
+ pushed: typing.ClassVar[bool] = False
1664
+
1665
+ _connection: 'interfaces.IConnection'
1666
+
1667
+ class SetDataAttr(RequestBodyStruct):
1668
+ command_string: str = field(XmpStr())
1669
+ """string, text CLI command"""
1670
+
1671
+ def set(self, command_string: str) -> Token[None]:
1672
+ """Set the CLI commands through a binary XMP session.
1673
+
1674
+ :param command_string: text CLI command
1675
+ :type command_string: str
1676
+ """
1677
+
1678
+ return Token(self._connection, build_set_request(self, command_string=command_string))
1679
+
1680
+
1681
+ @register_command
1682
+ @dataclass
1683
+ class C_TKSTATUS:
1684
+ """
1685
+ Report TimeKeeper version and status.
1686
+ """
1687
+
1688
+ code: typing.ClassVar[int] = 65
1689
+ pushed: typing.ClassVar[bool] = False
1690
+
1691
+ _connection: 'interfaces.IConnection'
1692
+
1693
+ class GetDataAttr(ResponseBodyStruct):
1694
+ status_string: str = field(XmpStr())
1695
+ """string. Version, TimeKeeper license expiration, and TimeKeeper status.
1696
+ The string is formatted as shown in the example below. Each line is separated by.
1697
+ """
1698
+
1699
+ def get(self) -> Token[GetDataAttr]:
1700
+ """Get the version and status of TimeKeeper
1701
+
1702
+ :return:
1703
+ Version, TimeKeeper license expiration, and TimeKeeper status. The string is formatted as shown in the example below.
1704
+
1705
+ The format is shown below.
1706
+
1707
+ TimeKeeper Status
1708
+ TimeKeeper version 8.0.3
1709
+ License expires in 33 days (including grace period)
1710
+ TimeKeeper is not running
1711
+
1712
+ :rtype: C_TKSTATUS.GetDataAttr
1713
+ """
1714
+
1715
+ return Token(self._connection, build_get_request(self))
1716
+
1717
+
1718
+ @register_command
1719
+ @dataclass
1720
+ class C_TKSVCSTATE:
1721
+ """
1722
+ Get and control TimeKeeper service state.
1723
+ """
1724
+
1725
+ code: typing.ClassVar[int] = 66
1726
+ pushed: typing.ClassVar[bool] = False
1727
+
1728
+ _connection: 'interfaces.IConnection'
1729
+
1730
+ class GetDataAttr(ResponseBodyStruct):
1731
+ state: TimeKeeperServiceStatus = field(XmpByte())
1732
+ """coded byte, TimeKeeper service state"""
1733
+
1734
+ class SetDataAttr(RequestBodyStruct):
1735
+ state: TimeKeeperServiceAction = field(XmpByte())
1736
+ """coded byte, TimeKeeper service state"""
1737
+
1738
+ def get(self) -> Token[GetDataAttr]:
1739
+ """Get TimeKeeper service state
1740
+
1741
+ :return: TimeKeeper service state
1742
+ :rtype: C_TKSVCSTATE.GetDataAttr
1743
+ """
1744
+
1745
+ return Token(self._connection, build_get_request(self))
1746
+
1747
+ def set(self, state: TimeKeeperServiceAction) -> Token[None]:
1748
+ """Control TimeKeeper service state
1749
+
1750
+ :param state: TimeKeeper service state
1751
+ :type state: TimeKeeperServiceAction
1752
+ """
1753
+
1754
+ return Token(self._connection, build_set_request(self, state=state))
1755
+
1756
+ set_stop = functools.partialmethod(set, TimeKeeperServiceAction.STOP)
1757
+ """Stop the TimerKeeper service.
1758
+ """
1759
+
1760
+ set_start = functools.partialmethod(set, TimeKeeperServiceAction.START)
1761
+ """Start the TimerKeeper service.
1762
+ """
1763
+
1764
+ set_restart = functools.partialmethod(set, TimeKeeperServiceAction.RESTART)
1765
+ """Restart the TimerKeeper service.
1766
+ """
1767
+
1768
+
1769
+ @register_command
1770
+ @dataclass
1771
+ class C_TKCONFIG:
1772
+ """
1773
+ TimeKeeper config file content.
1774
+ """
1775
+
1776
+ code: typing.ClassVar[int] = 67
1777
+ pushed: typing.ClassVar[bool] = False
1778
+
1779
+ _connection: 'interfaces.IConnection'
1780
+
1781
+ class GetDataAttr(ResponseBodyStruct):
1782
+ config_file: str = field(XmpStr())
1783
+ """string, TimeKeeper config file content"""
1784
+
1785
+ class SetDataAttr(RequestBodyStruct):
1786
+ config_file: str = field(XmpStr())
1787
+ """string, TimeKeeper config file content"""
1788
+
1789
+ def get(self) -> Token[GetDataAttr]:
1790
+ """Get TimeKeeper config file content.
1791
+
1792
+ :return: TimeKeeper config file content
1793
+ :rtype: C_TKCONFIG.GetDataAttr
1794
+ """
1795
+
1796
+ return Token(self._connection, build_get_request(self))
1797
+
1798
+ def set(self, config_file: str) -> Token[None]:
1799
+ """Set TimeKeeper config file content.
1800
+
1801
+ :param config_file: TimeKeeper config file content
1802
+ :type config_file: str
1803
+ """
1804
+
1805
+ return Token(self._connection, build_set_request(self, config_file=config_file))
1806
+
1807
+
1808
+ @register_command
1809
+ @dataclass
1810
+ class C_TKGPSSTATE:
1811
+ """
1812
+ Get TimeKeeper GPS status.
1813
+ """
1814
+
1815
+ code: typing.ClassVar[int] = 68
1816
+ pushed: typing.ClassVar[bool] = False
1817
+
1818
+ _connection: 'interfaces.IConnection'
1819
+
1820
+ class GetDataAttr(ResponseBodyStruct):
1821
+ status: str = field(XmpStr())
1822
+ """string, TimeKeeper GPS status"""
1823
+
1824
+ def get(self) -> Token[GetDataAttr]:
1825
+ """Get TimeKeeper GPS status.
1826
+
1827
+ :return: TimeKeeper GPS status
1828
+ :rtype: C_TKGPSSTATE.GetDataAttr
1829
+ """
1830
+
1831
+ return Token(self._connection, build_get_request(self))
1832
+
1833
+
1834
+ @register_command
1835
+ @dataclass
1836
+ class C_TIME:
1837
+ """
1838
+ Get local chassis time in seconds.
1839
+ """
1840
+
1841
+ code: typing.ClassVar[int] = 69
1842
+ pushed: typing.ClassVar[bool] = False
1843
+
1844
+ _connection: 'interfaces.IConnection'
1845
+
1846
+ class GetDataAttr(ResponseBodyStruct):
1847
+ local_time: int = field(XmpLong())
1848
+ """long integer, local chassis time in seconds"""
1849
+
1850
+ def get(self) -> Token[GetDataAttr]:
1851
+ """Get local chassis time in seconds.
1852
+
1853
+ :return: local chassis time in seconds
1854
+ :rtype: C_TIME.GetDataAttr
1855
+ """
1856
+
1857
+ return Token(self._connection, build_get_request(self))
1858
+
1859
+
1860
+ @register_command
1861
+ @dataclass
1862
+ class C_TRAFFICSYNC:
1863
+ """
1864
+ Works just as the ``C_TRAFFIC`` command described above with an additional option to
1865
+ specify a point in time where traffic should be started. This can be used to
1866
+ start traffic simultaneously on multiple chassis. The ports are identified by
1867
+ pairs of integers (module port).
1868
+
1869
+ .. note::
1870
+
1871
+ This requires that the chassis in question all use the TimeKeeper option to keep their CPU clocks synchronized.
1872
+
1873
+ """
1874
+
1875
+ code: typing.ClassVar[int] = 70
1876
+ pushed: typing.ClassVar[bool] = False
1877
+
1878
+ _connection: 'interfaces.IConnection'
1879
+
1880
+ class GetDataAttr(ResponseBodyStruct):
1881
+ on_off: OnOff = field(XmpByte())
1882
+ """coded byte, status traffic generation."""
1883
+ timestamp: int = field(XmpLong())
1884
+ """long integer, the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00"""
1885
+ module_ports: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1886
+ """list of integers, specifies ports on modules, which should stop or start traffic generation."""
1887
+
1888
+ class SetDataAttr(RequestBodyStruct):
1889
+ on_off: OnOff = field(XmpByte())
1890
+ """coded byte, determines whether to start or stop traffic generation."""
1891
+ timestamp: int = field(XmpLong())
1892
+ """long integer, the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00"""
1893
+ module_ports: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1894
+ """list of integers, specifies ports on modules, which should stop or start traffic generation."""
1895
+
1896
+ def get(self) -> Token[GetDataAttr]:
1897
+ """Get the status of traffic generation.
1898
+
1899
+ :return:
1900
+ - status traffic generation
1901
+ - the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00
1902
+ - ports on modules, which should stop or start traffic generation
1903
+ :rtype: C_TRAFFICSYNC.GetDataAttr
1904
+ """
1905
+
1906
+ return Token(self._connection, build_get_request(self))
1907
+
1908
+ def set(self, on_off: OnOff, timestamp: int, module_ports: typing.List[int]) -> Token[None]:
1909
+ """Set the status of traffic generation.
1910
+
1911
+ :param on_off: determines whether to start or stop traffic generation
1912
+ :type on_off: OnOff
1913
+ :param timestamp: the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00
1914
+ :type timestamp: int
1915
+ :param module_ports: specifies ports on modules, which should stop or start traffic generation.
1916
+ :type module_ports: typing.List[int]
1917
+ """
1918
+
1919
+ return Token(self._connection, build_set_request(self, on_off=on_off, timestamp=timestamp, module_ports=module_ports))
1920
+
1921
+ set_off = functools.partialmethod(set, OnOff.OFF)
1922
+ """Stop traffic generation on the given ports simultaneously on different chassis.
1923
+ """
1924
+
1925
+ set_on = functools.partialmethod(set, OnOff.ON)
1926
+ """Start traffic generation on the given ports simultaneously on different chassis.
1927
+ """
1928
+
1929
+
1930
+ @register_command
1931
+ @dataclass
1932
+ class C_TKSTATUSEXT:
1933
+ """
1934
+ Report TimeKeeper version and status (extended version).
1935
+ """
1936
+
1937
+ code: typing.ClassVar[int] = 71
1938
+ pushed: typing.ClassVar[bool] = False
1939
+
1940
+ _connection: 'interfaces.IConnection'
1941
+
1942
+ class GetDataAttr(ResponseBodyStruct):
1943
+ status_string: str = field(XmpStr())
1944
+ """string, extended status in JSON format. The string is formatted as shown in the example below.
1945
+
1946
+ .. code-block::json
1947
+
1948
+ {
1949
+ "FormatVersion": 1,
1950
+ "ApplicationVersion": 452.0,
1951
+ "TimeKeeperStatus":
1952
+ {
1953
+ "systemtimingstatus": "Waiting for good time source",
1954
+ "syncsource": "NTP",
1955
+ "sourcestate": "NTP server 10.0.0.110",
1956
+ "sourceaccuracy": " No updates yet",
1957
+ "versioninfo": "8.0.3",
1958
+ "timesincestart": "0 day(s) 0 hours 1 minutes",
1959
+ "timesinceboot": "0 day(s) 0 hours 2 minutes",
1960
+ "updatetime": 1637916837
1961
+ }
1962
+ }
1963
+
1964
+ """
1965
+
1966
+ def get(self) -> Token[GetDataAttr]:
1967
+ """Get the TimeKeeper version and status.
1968
+
1969
+ :return: extended status in JSON format. The string is formatted as shown in the example below.
1970
+
1971
+ .. code-block::json
1972
+
1973
+ {
1974
+ "FormatVersion": 1,
1975
+ "ApplicationVersion": 452.0,
1976
+ "TimeKeeperStatus": {
1977
+ "systemtimingstatus": "Waiting for good time source",
1978
+ "syncsource": "NTP",
1979
+ "sourcestate": "NTP server 10.0.0.110",
1980
+ "versioninfo": "8.0.3",
1981
+ "timesincestart": "0 day(s) 0 hours 1 minutes",
1982
+ "timesinceboot": "0 day(s) 0 hours 2 minutes",
1983
+ "updatetime": 1637916837
1984
+ }
1985
+ }
1986
+
1987
+
1988
+ :rtype: C_TKSTATUSEXT.GetDataAttr
1989
+ """
1990
+
1991
+ return Token(self._connection, build_get_request(self))
1992
+
1993
+ @register_command
1994
+ @dataclass
1995
+ class C_MODEL_NAME:
1996
+ """
1997
+ Get the Xena chassis model name.
1998
+ """
1999
+
2000
+ code: typing.ClassVar[int] = 457
2001
+ pushed: typing.ClassVar[bool] = False
2002
+
2003
+ _connection: 'interfaces.IConnection'
2004
+
2005
+ class GetDataAttr(ResponseBodyStruct):
2006
+ name: ChassisModelName = field(XmpInt())
2007
+ """ChassisModelName, the model of the Xena tester"""
2008
+
2009
+ def get(self) -> Token[GetDataAttr]:
2010
+ """Get the Xena chassis model name.
2011
+
2012
+ :return: the model name of the Xena tester
2013
+ :rtype: C_MODEL_NAME.GetDataAttr
2014
+ """
2015
+
2016
+ return Token(self._connection, build_get_request(self))
2017
+
2018
+ @register_command
2019
+ @dataclass
2020
+ class C_MODEL_NUMBER:
2021
+ """
2022
+ Get the Xena chassis model number.
2023
+ """
2024
+
2025
+ code: typing.ClassVar[int] = 458
2026
+ pushed: typing.ClassVar[bool] = False
2027
+
2028
+ _connection: 'interfaces.IConnection'
2029
+
2030
+ class GetDataAttr(ResponseBodyStruct):
2031
+ number: ChassisModelNumber = field(XmpInt())
2032
+ """ChassisModelNumber, the model of the Xena tester"""
2033
+
2034
+ def get(self) -> Token[GetDataAttr]:
2035
+ """Get the Xena chassis model number.
2036
+
2037
+ :return: the model number of the Xena tester
2038
+ :rtype: C_MODEL_NUMBER.GetDataAttr
2039
+ """
2040
+
2041
+ return Token(self._connection, build_get_request(self))