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,2221 @@
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
+ XmpHex,
19
+ XmpShort,
20
+ XmpInt,
21
+ XmpLong,
22
+ XmpSequence,
23
+ XmpStr,
24
+ XmpMacAddress,
25
+ XmpIPv4Address,
26
+ Hex,
27
+ )
28
+ from .enums import (
29
+ OnOff,
30
+ IsPermanent,
31
+ AutoOrManual,
32
+ L47TrafficState,
33
+ L47PortState,
34
+ L47PortSpeed,
35
+ IsPresent,
36
+ LicenseSpeed,
37
+ DhcpState,
38
+ DhcpVlanState
39
+ )
40
+ from . import subtypes
41
+
42
+
43
+ @register_command
44
+ @dataclass
45
+ class P4_TRAFFIC:
46
+ """
47
+ Gives a traffic state command to a L47 port.
48
+ """
49
+
50
+ code: typing.ClassVar[int] = 700
51
+ pushed: typing.ClassVar[bool] = False
52
+
53
+ _connection: 'interfaces.IConnection'
54
+ _module: int
55
+ _port: int
56
+
57
+ class SetDataAttr(RequestBodyStruct):
58
+ traffic_state: L47TrafficState = field(XmpByte())
59
+ """coded byte, the traffic state command issued to the port."""
60
+
61
+ def set(self, traffic_state: L47TrafficState) -> Token[None]:
62
+ """Set L47 port traffic state.
63
+
64
+ :param traffic_state: the traffic state command issued to the port
65
+ :type traffic_state: L47TrafficState
66
+ """
67
+
68
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, traffic_state=traffic_state))
69
+
70
+ set_off = functools.partialmethod(set, L47TrafficState.OFF)
71
+ """Set L47 port traffic state to Off."""
72
+
73
+ set_on = functools.partialmethod(set, L47TrafficState.ON)
74
+ """Set L47 port traffic state to On."""
75
+
76
+ set_stop = functools.partialmethod(set, L47TrafficState.STOP)
77
+ """Set L47 port traffic state to Stop."""
78
+
79
+ set_prepare = functools.partialmethod(set, L47TrafficState.PREPARE)
80
+ """Set L47 port traffic state to Prepare."""
81
+
82
+ set_prerun = functools.partialmethod(set, L47TrafficState.PRERUN)
83
+ """Set L47 port traffic state to Prerun."""
84
+
85
+
86
+ @register_command
87
+ @dataclass
88
+ class P4_STATE:
89
+ """
90
+ Display the current state of the L47 port.
91
+ """
92
+
93
+ code: typing.ClassVar[int] = 701
94
+ pushed: typing.ClassVar[bool] = True
95
+
96
+ _connection: 'interfaces.IConnection'
97
+ _module: int
98
+ _port: int
99
+
100
+ class GetDataAttr(ResponseBodyStruct):
101
+ state: L47PortState = field(XmpByte())
102
+ """coded byte, specifying the current state for this port."""
103
+
104
+ def get(self) -> Token[GetDataAttr]:
105
+ """Get the current state of the L47 port.
106
+
107
+ :return: the current state of the L47 port
108
+ :rtype: P4_STATE.GetDataAttr
109
+ """
110
+
111
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
112
+
113
+
114
+ @register_command
115
+ @dataclass
116
+ class P4_CAPABILITIES:
117
+ """
118
+ Report the speeds supported by the L47 port.
119
+ """
120
+
121
+ code: typing.ClassVar[int] = 702
122
+ pushed: typing.ClassVar[bool] = True
123
+
124
+ _connection: 'interfaces.IConnection'
125
+ _module: int
126
+ _port: int
127
+
128
+ class GetDataAttr(ResponseBodyStruct):
129
+ auto: int = field(XmpByte())
130
+ """byte, autoneg supported"""
131
+ N100_mbps: int = field(XmpByte())
132
+ """byte, 100M speed supported"""
133
+ N1_gbps: int = field(XmpByte())
134
+ """byte, 1G speed supported"""
135
+ N2_5_gbps: int = field(XmpByte())
136
+ """byte, 2.5G speed supported"""
137
+ N5_gbps: int = field(XmpByte())
138
+ """byte, 5G speed supported"""
139
+ N10_gbps: int = field(XmpByte())
140
+ """byte, 10G speed supported"""
141
+ N25_gbps: int = field(XmpByte())
142
+ """byte, 25G speed supported"""
143
+ N40_gbps: int = field(XmpByte())
144
+ """byte, 40G speed supported"""
145
+ N50_gbps: int = field(XmpByte())
146
+ """byte, 50G speed supported"""
147
+ N100_gbps: int = field(XmpByte())
148
+ """byte, 100G speed supported"""
149
+
150
+ def get(self) -> Token[GetDataAttr]:
151
+ """Get the speeds supported by the L47 port.
152
+
153
+ :return: the speeds supported by the L47 port
154
+ :rtype: P4_CAPABILITIES.GetDataAttr
155
+ """
156
+
157
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
158
+
159
+
160
+ @register_command
161
+ @dataclass
162
+ class P4_STATE_STATUS:
163
+ """
164
+ Returns status of the last port state change. If the port state has changed to
165
+ PREPARE_FAIL, the status contains information about the reason for the fail.
166
+ Currently the status will be "OK"in all other states.
167
+ """
168
+
169
+ code: typing.ClassVar[int] = 703
170
+ pushed: typing.ClassVar[bool] = False
171
+
172
+ _connection: 'interfaces.IConnection'
173
+ _module: int
174
+ _port: int
175
+
176
+ class GetDataAttr(ResponseBodyStruct):
177
+ status: str = field(XmpStr())
178
+ """string, status for the last port state change"""
179
+
180
+ def get(self) -> Token[GetDataAttr]:
181
+ """Get status of the last port state change.
182
+
183
+ :return: status of the last port state change
184
+ :rtype: P4_STATE_STATUS.GetDataAttr
185
+ """
186
+
187
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
188
+
189
+
190
+ @register_command
191
+ @dataclass
192
+ class P4_VLAN_OFFLOAD:
193
+ """
194
+ Specifies if 802.1Q VLAN tag should be inserted and stripped by the Ethernet
195
+ device. If VLAN Offload is switched ON, VLAN tags will not be present in frames
196
+ captured by the L47 Server.
197
+ """
198
+
199
+ code: typing.ClassVar[int] = 704
200
+ pushed: typing.ClassVar[bool] = False
201
+
202
+ _connection: 'interfaces.IConnection'
203
+ _module: int
204
+ _port: int
205
+
206
+ class GetDataAttr(ResponseBodyStruct):
207
+ offload: OnOff = field(XmpByte())
208
+ """coded byte, specifies if VLAN Offload is switched ON"""
209
+
210
+ class SetDataAttr(RequestBodyStruct):
211
+ offload: OnOff = field(XmpByte())
212
+ """coded byte, specifies if VLAN Offload is switched ON"""
213
+
214
+ def get(self) -> Token[GetDataAttr]:
215
+ """Get the VLAN offload status.
216
+
217
+ :return: VLAN offload status
218
+ :rtype: P4_VLAN_OFFLOAD.GetDataAttr
219
+ """
220
+
221
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
222
+
223
+ def set(self, offload: OnOff) -> Token[None]:
224
+ """Set the VLAN offload state.
225
+
226
+ :param offload: specifies if VLAN Offload is enabled
227
+ :type offload: OnOff
228
+ """
229
+
230
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, offload=offload))
231
+
232
+ set_off = functools.partialmethod(set, OnOff.OFF)
233
+ """Disable VLAN offload."""
234
+
235
+ set_on = functools.partialmethod(set, OnOff.ON)
236
+ """Enable VLAN offload."""
237
+
238
+
239
+ @register_command
240
+ @dataclass
241
+ class P4_ARP_CONFIG:
242
+ """
243
+ Configure the value of the ARP request transmission rate, retransmission timeout
244
+ and max. retries.
245
+ """
246
+
247
+ code: typing.ClassVar[int] = 705
248
+ pushed: typing.ClassVar[bool] = False
249
+
250
+ _connection: 'interfaces.IConnection'
251
+ _module: int
252
+ _port: int
253
+
254
+ class GetDataAttr(ResponseBodyStruct):
255
+ rate: int = field(XmpInt())
256
+ """integer, ARP Request transmission rate (requests / sec) - must be larger than 0"""
257
+ retrans_timeout: int = field(XmpInt())
258
+ """integer, ARP Request retransmission timeout [ms] - must be larger than 0"""
259
+ retries: int = field(XmpByte())
260
+ """byte, maximum ARP Request retransmission retries"""
261
+
262
+ class SetDataAttr(RequestBodyStruct):
263
+ rate: int = field(XmpInt())
264
+ """integer, ARP Request transmission rate (requests / sec) - must be larger than 0"""
265
+ retrans_timeout: int = field(XmpInt())
266
+ """integer, ARP Request retransmission timeout [ms] - must be larger than 0"""
267
+ retries: int = field(XmpByte())
268
+ """byte, maximum ARP Request retransmission retries"""
269
+
270
+ def get(self) -> Token[GetDataAttr]:
271
+ """Get the ARP configuration on the port.
272
+
273
+ :return: the ARP configuration on the port
274
+ :rtype: P4_ARP_CONFIG.GetDataAttr
275
+ """
276
+
277
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
278
+
279
+ def set(self, rate: int, retrans_timeout: int, retries: int) -> Token[None]:
280
+ """Set the ARP configuration on the port.
281
+
282
+ :param rate: ARP Request transmission rate (requests/sec) - must be larger than 0
283
+ :type rate: int
284
+ :param retrans_timeout: ARP Request retransmission timeout [ms] - must be larger than 0
285
+ :type retrans_timeout: int
286
+ :param retries: maximum ARP Request retransmission retries
287
+ :type retries: int
288
+ """
289
+
290
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, rate=rate, retrans_timeout=retrans_timeout, retries=retries))
291
+
292
+
293
+ @register_command
294
+ @dataclass
295
+ class P4_NDP_CONFIG:
296
+ """
297
+ Configure the value of the NDP Neighbor Solicitation transmission rate,
298
+ retransmission timeout and max. retries.
299
+ """
300
+
301
+ code: typing.ClassVar[int] = 706
302
+ pushed: typing.ClassVar[bool] = False
303
+
304
+ _connection: 'interfaces.IConnection'
305
+ _module: int
306
+ _port: int
307
+
308
+ class GetDataAttr(ResponseBodyStruct):
309
+ rate: int = field(XmpInt())
310
+ """integer, NDP Neighbor Solicitation transmission rate (requests / sec) - must be larger than 0"""
311
+ retrans_timeout: int = field(XmpInt())
312
+ """integer, NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0"""
313
+ retries: int = field(XmpByte())
314
+ """byte, Max. NDP Neighbor Solicitation retransmission retries"""
315
+
316
+ class SetDataAttr(RequestBodyStruct):
317
+ rate: int = field(XmpInt())
318
+ """integer, NDP Neighbor Solicitation transmission rate (requests / sec) - must be larger than 0"""
319
+ retrans_timeout: int = field(XmpInt())
320
+ """integer, NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0"""
321
+ retries: int = field(XmpByte())
322
+ """byte, Max. NDP Neighbor Solicitation retransmission retries"""
323
+
324
+ def get(self) -> Token[GetDataAttr]:
325
+ """Get the NDP configuration on the port.
326
+
327
+ :return: the NDP configuration on the port
328
+ :rtype: P4_NDP_CONFIG.GetDataAttr
329
+ """
330
+
331
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
332
+
333
+ def set(self, rate: int, retrans_timeout: int, retries: int) -> Token[None]:
334
+ """Set the NDP configuration on the port.
335
+
336
+ :param rate: NDP Neighbor Solicitation transmission rate (requests/sec) - must be larger than 0
337
+ :type rate: int
338
+ :param retrans_timeout: NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0
339
+ :type retrans_timeout: int
340
+ :param retries: maximum NDP Neighbor Solicitation retransmission retries
341
+ :type retries: int
342
+ """
343
+
344
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, rate=rate, retrans_timeout=retrans_timeout, retries=retries))
345
+
346
+
347
+ @register_command
348
+ @dataclass
349
+ class P4_CAPTURE:
350
+ """
351
+ Starts or stops packet capture on this port.
352
+ """
353
+
354
+ code: typing.ClassVar[int] = 707
355
+ pushed: typing.ClassVar[bool] = False
356
+
357
+ _connection: 'interfaces.IConnection'
358
+ _module: int
359
+ _port: int
360
+
361
+ class GetDataAttr(ResponseBodyStruct):
362
+ on_off: OnOff = field(XmpByte())
363
+ """coded byte, specifying whether to capture traffic on this port"""
364
+
365
+ class SetDataAttr(RequestBodyStruct):
366
+ on_off: OnOff = field(XmpByte())
367
+ """coded byte, specifying whether to capture traffic on this port"""
368
+
369
+ def get(self) -> Token[GetDataAttr]:
370
+ """Get packet capture state on this port.
371
+
372
+ :return: packet capture state on this port
373
+ :rtype: P4_CAPTURE.GetDataAttr
374
+ """
375
+
376
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
377
+
378
+ def set(self, on_off: OnOff) -> Token[None]:
379
+ """Set packet capture state on this port.
380
+
381
+ :param on_off: specifying whether to capture traffic on this port
382
+ :type on_off: OnOff
383
+ """
384
+
385
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, on_off=on_off))
386
+
387
+ set_off = functools.partialmethod(set, OnOff.OFF)
388
+ """Stop packet capture on this port."""
389
+
390
+ set_on = functools.partialmethod(set, OnOff.ON)
391
+ """Start packet capture on this port."""
392
+
393
+
394
+ @register_command
395
+ @dataclass
396
+ class P4_CAPTURE_GET_FIRST:
397
+ """
398
+ Returns the first captured frame on the port. Command is only valid when port is
399
+ in state STOPPED
400
+ """
401
+
402
+ code: typing.ClassVar[int] = 708
403
+ pushed: typing.ClassVar[bool] = False
404
+
405
+ _connection: 'interfaces.IConnection'
406
+ _module: int
407
+ _port: int
408
+
409
+ class GetDataAttr(ResponseBodyStruct):
410
+ index: int = field(XmpInt())
411
+ """integer, index of frame returned"""
412
+ second: int = field(XmpInt())
413
+ """integer, second value of frame capture timestamp"""
414
+ microsecond: int = field(XmpInt())
415
+ """integer, microsecond value of frame capture timestamp"""
416
+ capture_length: int = field(XmpInt())
417
+ """integer, length of captured portion of the frame"""
418
+ frame_length: int = field(XmpInt())
419
+ """integer, length of the frame"""
420
+ frame: Hex = field(XmpHex())
421
+ """list of hex bytes, the captured frame (capture_len bytes)"""
422
+
423
+ def get(self) -> Token[GetDataAttr]:
424
+ """Get the first captured frame on the port
425
+
426
+ :return: the first captured frame on the port
427
+ :rtype: P4_CAPTURE_GET_FIRST.GetDataAttr
428
+ """
429
+
430
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
431
+
432
+
433
+ @register_command
434
+ @dataclass
435
+ class P4_CAPTURE_GET_NEXT:
436
+ """
437
+ Returns the next captured frame on the port. Command is only valid when port is
438
+ in state STOPPED
439
+ """
440
+
441
+ code: typing.ClassVar[int] = 709
442
+ pushed: typing.ClassVar[bool] = False
443
+
444
+ _connection: 'interfaces.IConnection'
445
+ _module: int
446
+ _port: int
447
+
448
+ class GetDataAttr(ResponseBodyStruct):
449
+ index: int = field(XmpInt())
450
+ """integer, index of frame returned"""
451
+ second: int = field(XmpInt())
452
+ """integer, second value of frame capture timestamp"""
453
+ microsecond: int = field(XmpInt())
454
+ """integer, microsecond value of frame capture timestamp"""
455
+ capture_length: int = field(XmpInt())
456
+ """integer, length of captured portion of the frame"""
457
+ frame_length: int = field(XmpInt())
458
+ """integer, length of the frame"""
459
+ frame: Hex = field(XmpHex())
460
+ """hex data, the captured frame (capture_len bytes)"""
461
+
462
+ def get(self) -> Token[GetDataAttr]:
463
+ """Get the next captured frame on the port
464
+
465
+ :return: the next captured frame on the port
466
+ :rtype: P4_CAPTURE_GET_NEXT.GetDataAttr
467
+ """
468
+
469
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
470
+
471
+
472
+ @register_command
473
+ @dataclass
474
+ class P4_ETH_TX_COUNTERS:
475
+ """
476
+ Return total port Ethernet transmit statistics since last clear.
477
+ """
478
+
479
+ code: typing.ClassVar[int] = 710
480
+ pushed: typing.ClassVar[bool] = False
481
+
482
+ _connection: 'interfaces.IConnection'
483
+ _module: int
484
+ _port: int
485
+
486
+ class GetDataAttr(ResponseBodyStruct):
487
+ current_time: int = field(XmpLong())
488
+ """long integer, the current time (mSec since module restart)"""
489
+ ref_time: int = field(XmpLong())
490
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
491
+ bits_per_sec: int = field(XmpLong())
492
+ """long integer, bit/second of (layer 2) bytes transmitted"""
493
+ packets_per_sec: int = field(XmpLong())
494
+ """long integer, packets/second of packets transmitted"""
495
+ byte_count: int = field(XmpLong())
496
+ """long integer, total number of (layer 2) bytes transmitted"""
497
+ packet_count: int = field(XmpLong())
498
+ """long integer, total number of packets transmitted"""
499
+
500
+ def get(self) -> Token[GetDataAttr]:
501
+ """Get total port Ethernet transmit statistics since last clear.
502
+
503
+ :return: total port Ethernet transmit statistics since last clear.
504
+ :rtype: P4_ETH_TX_COUNTERS.GetDataAttr
505
+ """
506
+
507
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
508
+
509
+
510
+ @register_command
511
+ @dataclass
512
+ class P4_ETH_RX_COUNTERS:
513
+ """
514
+ Return total port Ethernet receive statistics since last clear.
515
+ """
516
+
517
+ code: typing.ClassVar[int] = 711
518
+ pushed: typing.ClassVar[bool] = False
519
+
520
+ _connection: 'interfaces.IConnection'
521
+ _module: int
522
+ _port: int
523
+
524
+ class GetDataAttr(ResponseBodyStruct):
525
+ current_time: int = field(XmpLong())
526
+ """long integer, the current time (mSec since module restart)"""
527
+ ref_time: int = field(XmpLong())
528
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
529
+ bits_per_sec: int = field(XmpLong())
530
+ """long integer, bit/second of (layer 2) bytes received"""
531
+ packets_per_sec: int = field(XmpLong())
532
+ """long, integer packets/second of received packets"""
533
+ byte_count: int = field(XmpLong())
534
+ """long integer, total number of (layer 2) bytes received"""
535
+ packet_count: int = field(XmpLong())
536
+ """long integer, total number of packets received"""
537
+
538
+ def get(self) -> Token[GetDataAttr]:
539
+ """Get total port Ethernet receive statistics since last clear.
540
+
541
+ :return: total port Ethernet receive statistics since last clear.
542
+ :rtype: P4_ETH_RX_COUNTERS.GetDataAttr
543
+ """
544
+
545
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
546
+
547
+
548
+ @register_command
549
+ @dataclass
550
+ class P4_PORT_TX_COUNTERS:
551
+ """
552
+ Return total port transmit statistics since last clear.
553
+ """
554
+
555
+ code: typing.ClassVar[int] = 712
556
+ pushed: typing.ClassVar[bool] = False
557
+
558
+ _connection: 'interfaces.IConnection'
559
+ _module: int
560
+ _port: int
561
+
562
+ class GetDataAttr(ResponseBodyStruct):
563
+ current_time: int = field(XmpLong())
564
+ """long integer, the current time (mSec since module restart)"""
565
+ ref_time: int = field(XmpLong())
566
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
567
+ vlan_packet_count: int = field(XmpLong())
568
+ """long integer, total number of 802.1Q VLAN tagged packets transmitted"""
569
+ bits_per_sec: int = field(XmpLong())
570
+ """long integer, bit/second of (layer 1) bits transmitted."""
571
+ byte_count: int = field(XmpLong())
572
+ """long integer, total number of (layer 1) bytes received."""
573
+
574
+ def get(self) -> Token[GetDataAttr]:
575
+ """Get total port transmit statistics since last clear.
576
+
577
+ :return: total port transmit statistics since last clear.
578
+ :rtype: P4_PORT_TX_COUNTERS.GetDataAttr
579
+ """
580
+
581
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
582
+
583
+
584
+ @register_command
585
+ @dataclass
586
+ class P4_PORT_RX_COUNTERS:
587
+ """
588
+ Return total port receive statistics since last clear.
589
+ """
590
+
591
+ code: typing.ClassVar[int] = 713
592
+ pushed: typing.ClassVar[bool] = False
593
+
594
+ _connection: 'interfaces.IConnection'
595
+ _module: int
596
+ _port: int
597
+
598
+ class GetDataAttr(ResponseBodyStruct):
599
+ current_time: int = field(XmpLong())
600
+ """long integer, the current time (mSec since module restart)"""
601
+ ref_time: int = field(XmpLong())
602
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
603
+ vlan_packet_count: int = field(XmpLong())
604
+ """long integer, total number of 802.1Q VLAN tagged packets received"""
605
+ bits_per_sec: int = field(XmpLong())
606
+ """long integer, bit/second of (layer 1) bits received."""
607
+ byte_count: int = field(XmpLong())
608
+ """long integer, total number of (layer 1) bytes received."""
609
+
610
+ def get(self) -> Token[GetDataAttr]:
611
+ """Get total port receive statistics since last clear.
612
+
613
+ :return: total port receive statistics since last clear.
614
+ :rtype: P4_PORT_RX_COUNTERS.GetDataAttr
615
+ """
616
+
617
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
618
+
619
+
620
+ @register_command
621
+ @dataclass
622
+ class P4_PORT_COUNTERS:
623
+ """
624
+ Return total port transmit error statistics since last clear.
625
+ """
626
+
627
+ code: typing.ClassVar[int] = 714
628
+ pushed: typing.ClassVar[bool] = False
629
+
630
+ _connection: 'interfaces.IConnection'
631
+ _module: int
632
+ _port: int
633
+
634
+ class GetDataAttr(ResponseBodyStruct):
635
+ current_time: int = field(XmpLong())
636
+ """long integer, the current time (mSec since module restart)"""
637
+ ref_time: int = field(XmpLong())
638
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
639
+ invalid_eth_count: int = field(XmpLong())
640
+ """long integer, total number of invalid (e.g. short) Ethernet packets received"""
641
+ unknown_eth_count: int = field(XmpLong())
642
+ """long integer, total number of unknown or unsupported Ethernet packets received"""
643
+ mismatch_vlan_error_count: int = field(XmpLong())
644
+ """long integer, total number of packets with mismatching vlan info received"""
645
+ pkt_rate_limit_count: int = field(XmpLong())
646
+ """long integer, number of times that number of packets transmitted has been limited by the maximum packet rate limiter."""
647
+
648
+ def get(self) -> Token[GetDataAttr]:
649
+ """Get total port transmit error statistics since last clear.
650
+
651
+ :return: total port transmit error statistics since last clear.
652
+ :rtype: P4_PORT_COUNTERS.GetDataAttr
653
+ """
654
+
655
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
656
+
657
+
658
+ @register_command
659
+ @dataclass
660
+ class P4_TX_PACKET_SIZE:
661
+ """
662
+ Return histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.
663
+ """
664
+
665
+ code: typing.ClassVar[int] = 715
666
+ pushed: typing.ClassVar[bool] = False
667
+
668
+ _connection: 'interfaces.IConnection'
669
+ _module: int
670
+ _port: int
671
+
672
+ class GetDataAttr(ResponseBodyStruct):
673
+ current_time: int = field(XmpLong())
674
+ """long integer, the current time (mSec since module restart)"""
675
+ ref_time: int = field(XmpLong())
676
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
677
+ bin_00: int = field(XmpLong())
678
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
679
+ bin_01: int = field(XmpLong())
680
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
681
+ bin_02: int = field(XmpLong())
682
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
683
+ bin_03: int = field(XmpLong())
684
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
685
+ bin_04: int = field(XmpLong())
686
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
687
+ bin_05: int = field(XmpLong())
688
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
689
+ bin_06: int = field(XmpLong())
690
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
691
+ bin_07: int = field(XmpLong())
692
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
693
+ bin_08: int = field(XmpLong())
694
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
695
+ bin_09: int = field(XmpLong())
696
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
697
+ bin_10: int = field(XmpLong())
698
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
699
+ bin_11: int = field(XmpLong())
700
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
701
+ bin_12: int = field(XmpLong())
702
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
703
+ bin_13: int = field(XmpLong())
704
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
705
+ bin_14: int = field(XmpLong())
706
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
707
+ bin_15: int = field(XmpLong())
708
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
709
+
710
+ def get(self) -> Token[GetDataAttr]:
711
+ """Get a histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.
712
+
713
+ :return: histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.
714
+ :rtype: P4_TX_PACKET_SIZE.GetDataAttr
715
+ """
716
+
717
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
718
+
719
+
720
+ @register_command
721
+ @dataclass
722
+ class P4_RX_PACKET_SIZE:
723
+ """
724
+ Return a histogram over received (layer 2) packets sizes in 100 bytes intervals.
725
+ """
726
+
727
+ code: typing.ClassVar[int] = 716
728
+ pushed: typing.ClassVar[bool] = False
729
+
730
+ _connection: 'interfaces.IConnection'
731
+ _module: int
732
+ _port: int
733
+
734
+ class GetDataAttr(ResponseBodyStruct):
735
+ current_time: int = field(XmpLong())
736
+ """long integer, the current time (mSec since module restart)"""
737
+ ref_time: int = field(XmpLong())
738
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
739
+ bin_00: int = field(XmpLong())
740
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
741
+ bin_01: int = field(XmpLong())
742
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
743
+ bin_02: int = field(XmpLong())
744
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
745
+ bin_03: int = field(XmpLong())
746
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
747
+ bin_04: int = field(XmpLong())
748
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
749
+ bin_05: int = field(XmpLong())
750
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
751
+ bin_06: int = field(XmpLong())
752
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
753
+ bin_07: int = field(XmpLong())
754
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
755
+ bin_08: int = field(XmpLong())
756
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
757
+ bin_09: int = field(XmpLong())
758
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
759
+ bin_10: int = field(XmpLong())
760
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
761
+ bin_11: int = field(XmpLong())
762
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
763
+ bin_12: int = field(XmpLong())
764
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
765
+ bin_13: int = field(XmpLong())
766
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
767
+ bin_14: int = field(XmpLong())
768
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
769
+ bin_15: int = field(XmpLong())
770
+ """long integer, number of packets received with a (layer 2) size in the given interval."""
771
+
772
+ def get(self) -> Token[GetDataAttr]:
773
+ """Get a histogram over received (layer 2) packets sizes in 100 bytes intervals.
774
+
775
+ :return: a histogram over received (layer 2) packets sizes in 100 bytes intervals.
776
+ :rtype: P4_RX_PACKET_SIZE.GetDataAttr
777
+ """
778
+
779
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
780
+
781
+
782
+ @register_command
783
+ @dataclass
784
+ class P4_TX_MTU:
785
+ """
786
+ Return histogram over transmitted (layer 3) packets sizes in 1 byte intervals.
787
+ Each bin represents a packet size in the interval [576..1500] bytes.
788
+ """
789
+
790
+ code: typing.ClassVar[int] = 717
791
+ pushed: typing.ClassVar[bool] = False
792
+
793
+ _connection: 'interfaces.IConnection'
794
+ _module: int
795
+ _port: int
796
+
797
+ class GetDataAttr(ResponseBodyStruct):
798
+ bins: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
799
+ """925 x byte, '1' if any packets were transmitted with the specified layer 3 size, otherwise '0'."""
800
+
801
+ def get(self) -> Token[GetDataAttr]:
802
+ """Get histogram over transmitted (layer 3) packets sizes in 1 byte intervals.
803
+
804
+ :return: histogram over transmitted (layer 3) packets sizes in 1 byte intervals.
805
+ :rtype: P4_TX_MTU.GetDataAttr
806
+ """
807
+
808
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
809
+
810
+
811
+ @register_command
812
+ @dataclass
813
+ class P4_RX_MTU:
814
+ """
815
+ Return histogram over received (layer 3) packets sizes in 1 byte intervals. Each
816
+ bin represents a packet size in the interval [576..1500] bytes.
817
+ """
818
+
819
+ code: typing.ClassVar[int] = 718
820
+ pushed: typing.ClassVar[bool] = False
821
+
822
+ _connection: 'interfaces.IConnection'
823
+ _module: int
824
+ _port: int
825
+
826
+ class GetDataAttr(ResponseBodyStruct):
827
+ bins: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
828
+ """925 x byte, '1' if any packets were received with the specified layer 3 size, otherwise '0'."""
829
+
830
+ def get(self) -> Token[GetDataAttr]:
831
+ """Get histogram over received (layer 3) packets sizes in 1 byte intervals.
832
+
833
+ :return: histogram over received (layer 3) packets sizes in 1 byte intervals.
834
+ :rtype: P4_RX_MTU.GetDataAttr
835
+ """
836
+
837
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
838
+
839
+
840
+ @register_command
841
+ @dataclass
842
+ class P4_IPV4_RX_COUNTERS:
843
+ """
844
+ Return total Port IPv4 protocol receive statistics since last clear.
845
+ """
846
+
847
+ code: typing.ClassVar[int] = 719
848
+ pushed: typing.ClassVar[bool] = False
849
+
850
+ _connection: 'interfaces.IConnection'
851
+ _module: int
852
+ _port: int
853
+
854
+ class GetDataAttr(ResponseBodyStruct):
855
+ current_time: int = field(XmpLong())
856
+ """long integer, the current time (mSec since module restart)"""
857
+ ref_time: int = field(XmpLong())
858
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
859
+ packet_count: int = field(XmpLong())
860
+ """long integer, total number of IPv4 packets received"""
861
+
862
+ def get(self) -> Token[GetDataAttr]:
863
+ """Get total Port IPv4 protocol receive statistics since last clear.
864
+
865
+ :return: total Port IPv4 protocol receive statistics since last clear.
866
+ :rtype: P4_IPV4_RX_COUNTERS.GetDataAttr
867
+ """
868
+
869
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
870
+
871
+
872
+ @register_command
873
+ @dataclass
874
+ class P4_IPV4_TX_COUNTERS:
875
+ """
876
+ Return total Port IPv4 protocol transmit statistics since last clear.
877
+ """
878
+
879
+ code: typing.ClassVar[int] = 720
880
+ pushed: typing.ClassVar[bool] = False
881
+
882
+ _connection: 'interfaces.IConnection'
883
+ _module: int
884
+ _port: int
885
+
886
+ class GetDataAttr(ResponseBodyStruct):
887
+ current_time: int = field(XmpLong())
888
+ """long integer, the current time (mSec since module restart)"""
889
+ ref_time: int = field(XmpLong())
890
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
891
+ packet_count: int = field(XmpLong())
892
+ """long integer, total number of IPv4 packets transmitted"""
893
+
894
+ def get(self) -> Token[GetDataAttr]:
895
+ """Get total Port IPv4 protocol transmit statistics since last clear.
896
+
897
+ :return: total Port IPv4 protocol transmit statistics since last clear.
898
+ :rtype: P4_IPV4_TX_COUNTERS.GetDataAttr
899
+ """
900
+
901
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
902
+
903
+
904
+ @register_command
905
+ @dataclass
906
+ class P4_IPV4_COUNTERS:
907
+ """
908
+ Return total Port IPv4 protocol error statistics since last clear.
909
+ """
910
+
911
+ code: typing.ClassVar[int] = 721
912
+ pushed: typing.ClassVar[bool] = False
913
+
914
+ _connection: 'interfaces.IConnection'
915
+ _module: int
916
+ _port: int
917
+
918
+ class GetDataAttr(ResponseBodyStruct):
919
+ current_time: int = field(XmpLong())
920
+ """long integer, the current time (mSec since module restart)"""
921
+ ref_time: int = field(XmpLong())
922
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
923
+ checksum_error_count: int = field(XmpLong())
924
+ """long integer, total number of IPv4 packets which ip header checksum error"""
925
+ invalid_packet_count: int = field(XmpLong())
926
+ """long integer, total number of IPv4 packets which are malformed"""
927
+ unknown_packet_count: int = field(XmpLong())
928
+ """long integer, total number of IPv4 packets with unknown protocol"""
929
+
930
+ def get(self) -> Token[GetDataAttr]:
931
+ """Get total Port IPv4 protocol error statistics since last clear.
932
+
933
+ :return: total Port IPv4 protocol error statistics since last clear.
934
+ :rtype: P4_IPV4_COUNTERS.GetDataAttr
935
+ """
936
+
937
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
938
+
939
+
940
+ @register_command
941
+ @dataclass
942
+ class P4_IPV6_RX_COUNTERS:
943
+ """
944
+ Return total Port IPv6 protocol receive statistics since last clear.
945
+ """
946
+
947
+ code: typing.ClassVar[int] = 722
948
+ pushed: typing.ClassVar[bool] = False
949
+
950
+ _connection: 'interfaces.IConnection'
951
+ _module: int
952
+ _port: int
953
+
954
+ class GetDataAttr(ResponseBodyStruct):
955
+ current_time: int = field(XmpLong())
956
+ """long integer, the current time (mSec since module restart)"""
957
+ ref_time: int = field(XmpLong())
958
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
959
+ packet_count: int = field(XmpLong())
960
+ """long integer, total number of IPv6 packets received"""
961
+
962
+ def get(self) -> Token[GetDataAttr]:
963
+ """Get total Port IPv6 protocol receive statistics since last clear.
964
+
965
+ :return: total Port IPv6 protocol receive statistics since last clear.
966
+ :rtype: P4_IPV6_RX_COUNTERS.GetDataAttr
967
+ """
968
+
969
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
970
+
971
+
972
+ @register_command
973
+ @dataclass
974
+ class P4_IPV6_TX_COUNTERS:
975
+ """
976
+ Return total Port IPv6 protocol transmit statistics since last clear.
977
+ """
978
+
979
+ code: typing.ClassVar[int] = 723
980
+ pushed: typing.ClassVar[bool] = False
981
+
982
+ _connection: 'interfaces.IConnection'
983
+ _module: int
984
+ _port: int
985
+
986
+ class GetDataAttr(ResponseBodyStruct):
987
+ current_time: int = field(XmpLong())
988
+ """long integer, the current time (mSec since module restart)"""
989
+ ref_time: int = field(XmpLong())
990
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
991
+ packet_count: int = field(XmpLong())
992
+ """long integer, total number of IPv6 packets transmitted"""
993
+
994
+ def get(self) -> Token[GetDataAttr]:
995
+ """Get total Port IPv6 protocol transmit statistics since last clear.
996
+
997
+ :return: total Port IPv6 protocol transmit statistics since last clear.
998
+ :rtype: P4_IPV6_TX_COUNTERS.GetDataAttr
999
+ """
1000
+
1001
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1002
+
1003
+
1004
+ @register_command
1005
+ @dataclass
1006
+ class P4_IPV6_COUNTERS:
1007
+ """
1008
+ Return total Port IPv6 protocol error statistics since last clear.
1009
+ """
1010
+
1011
+ code: typing.ClassVar[int] = 724
1012
+ pushed: typing.ClassVar[bool] = False
1013
+
1014
+ _connection: 'interfaces.IConnection'
1015
+ _module: int
1016
+ _port: int
1017
+
1018
+ class GetDataAttr(ResponseBodyStruct):
1019
+ current_time: int = field(XmpLong())
1020
+ """long integer, the current time (mSec since module restart)"""
1021
+ ref_time: int = field(XmpLong())
1022
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1023
+ invalid_packet_count: int = field(XmpLong())
1024
+ """long integer, total number of ipv6 packets which are malformed"""
1025
+ unknown_packet_count: int = field(XmpLong())
1026
+ """long integer, total number of ipv6 packets with unknown protocol"""
1027
+
1028
+ def get(self) -> Token[GetDataAttr]:
1029
+ """Get total Port IPv6 protocol error statistics since last clear.
1030
+
1031
+ :return: total Port IPv6 protocol error statistics since last clear.
1032
+ :rtype: P4_IPV6_COUNTERS.GetDataAttr
1033
+ """
1034
+
1035
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1036
+
1037
+
1038
+ @register_command
1039
+ @dataclass
1040
+ class P4_ARP_RX_COUNTERS:
1041
+ """
1042
+ Return total Port ARP protocol receive statistics since last clear.
1043
+ """
1044
+
1045
+ code: typing.ClassVar[int] = 725
1046
+ pushed: typing.ClassVar[bool] = False
1047
+
1048
+ _connection: 'interfaces.IConnection'
1049
+ _module: int
1050
+ _port: int
1051
+
1052
+ class GetDataAttr(ResponseBodyStruct):
1053
+ current_time: int = field(XmpLong())
1054
+ """long integer, the current time (mSec since module restart)"""
1055
+ ref_time: int = field(XmpLong())
1056
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1057
+ arp_request_count: int = field(XmpLong())
1058
+ """long integer, total number ARP Requests received"""
1059
+ arp_reply_count: int = field(XmpLong())
1060
+ """long integer, total number ARP Replies received"""
1061
+
1062
+ def get(self) -> Token[GetDataAttr]:
1063
+ """Get total Port ARP protocol receive statistics since last clear.
1064
+
1065
+ :return: total Port ARP protocol receive statistics since last clear.
1066
+ :rtype: P4_ARP_RX_COUNTERS.GetDataAttr
1067
+ """
1068
+
1069
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1070
+
1071
+
1072
+ @register_command
1073
+ @dataclass
1074
+ class P4_ARP_TX_COUNTERS:
1075
+ """
1076
+ Return total Port ARP protocol transmit statistics since last clear.
1077
+ """
1078
+
1079
+ code: typing.ClassVar[int] = 726
1080
+ pushed: typing.ClassVar[bool] = False
1081
+
1082
+ _connection: 'interfaces.IConnection'
1083
+ _module: int
1084
+ _port: int
1085
+
1086
+ class GetDataAttr(ResponseBodyStruct):
1087
+ current_time: int = field(XmpLong())
1088
+ """long integer, the current time (mSec since module restart)"""
1089
+ ref_time: int = field(XmpLong())
1090
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1091
+ arp_request_count: int = field(XmpLong())
1092
+ """long integer, total number ARP Requests transmitted"""
1093
+ arp_reply_count: int = field(XmpLong())
1094
+ """long integer, total number ARP Replies transmitted"""
1095
+
1096
+ def get(self) -> Token[GetDataAttr]:
1097
+ """Get total Port ARP protocol transmit statistics since last clear.
1098
+
1099
+ :return: total Port ARP protocol transmit statistics since last clear.
1100
+ :rtype: P4_ARP_TX_COUNTERS.GetDataAttr
1101
+ """
1102
+
1103
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1104
+
1105
+
1106
+ @register_command
1107
+ @dataclass
1108
+ class P4_ARP_COUNTERS:
1109
+ """
1110
+ Return total Port ARP protocol error statistics since last clear.
1111
+ """
1112
+
1113
+ code: typing.ClassVar[int] = 727
1114
+ pushed: typing.ClassVar[bool] = False
1115
+
1116
+ _connection: 'interfaces.IConnection'
1117
+ _module: int
1118
+ _port: int
1119
+
1120
+ class GetDataAttr(ResponseBodyStruct):
1121
+ current_time: int = field(XmpLong())
1122
+ """long integer, the current time (mSec since module restart)"""
1123
+ ref_time: int = field(XmpLong())
1124
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1125
+ invalid_arp_count: int = field(XmpLong())
1126
+ """long integer, total number of invalid ARP packets received"""
1127
+ arp_request_lookup_failure_count: int = field(XmpLong())
1128
+ """long integer, number of ARP requests received that could not be resolved"""
1129
+ arp_reply_lookup_failure_count: int = field(XmpLong())
1130
+ """long integer, number of ARP replies received that could not be resolved"""
1131
+ arp_request_retrans_count: int = field(XmpLong())
1132
+ """long integer, number of retransmitted ARP requests"""
1133
+ arp_resolved_count: int = field(XmpLong())
1134
+ """long integer, number of correct resolved IP addresses"""
1135
+ arp_failed_count: int = field(XmpLong())
1136
+ """long integer, number of IP address that was not resolved"""
1137
+ arp_table_lookup_failure_count: int = field(XmpLong())
1138
+ """long integer, number of dest IP addresses not found in the ARP table"""
1139
+
1140
+ def get(self) -> Token[GetDataAttr]:
1141
+ """Get total Port ARP protocol error statistics since last clear.
1142
+
1143
+ :return: total Port ARP protocol error statistics since last clear.
1144
+ :rtype: P4_ARP_COUNTERS.GetDataAttr
1145
+ """
1146
+
1147
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1148
+
1149
+
1150
+ @register_command
1151
+ @dataclass
1152
+ class P4_NDP_RX_COUNTERS:
1153
+ """
1154
+ Return total Port NDP protocol receive statistics since last clear.
1155
+ """
1156
+
1157
+ code: typing.ClassVar[int] = 728
1158
+ pushed: typing.ClassVar[bool] = False
1159
+
1160
+ _connection: 'interfaces.IConnection'
1161
+ _module: int
1162
+ _port: int
1163
+
1164
+ class GetDataAttr(ResponseBodyStruct):
1165
+ current_time: int = field(XmpLong())
1166
+ """long integer, the current time (mSec since module restart)"""
1167
+ ref_time: int = field(XmpLong())
1168
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1169
+ ndp_request_count: int = field(XmpLong())
1170
+ """long integer, total number NDP Requests received"""
1171
+ ndp_reply_count: int = field(XmpLong())
1172
+ """long integer, total number NDP Replies received"""
1173
+
1174
+ def get(self) -> Token[GetDataAttr]:
1175
+ """Get total Port NDP protocol receive statistics since last clear.
1176
+
1177
+ :return: total Port NDP protocol receive statistics since last clear.
1178
+ :rtype: P4_NDP_RX_COUNTERS.GetDataAttr
1179
+ """
1180
+
1181
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1182
+
1183
+
1184
+ @register_command
1185
+ @dataclass
1186
+ class P4_NDP_TX_COUNTERS:
1187
+ """
1188
+ Return total Port NDP protocol transmit statistics since last clear.
1189
+ """
1190
+
1191
+ code: typing.ClassVar[int] = 729
1192
+ pushed: typing.ClassVar[bool] = False
1193
+
1194
+ _connection: 'interfaces.IConnection'
1195
+ _module: int
1196
+ _port: int
1197
+
1198
+ class GetDataAttr(ResponseBodyStruct):
1199
+ current_time: int = field(XmpLong())
1200
+ """long integer, the current time (mSec since module restart)"""
1201
+ ref_time: int = field(XmpLong())
1202
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1203
+ ndp_request_count: int = field(XmpLong())
1204
+ """long integer, total number NDP Requests transmitted"""
1205
+ ndp_reply_count: int = field(XmpLong())
1206
+ """long integer, total number NDP Replies transmitted"""
1207
+
1208
+ def get(self) -> Token[GetDataAttr]:
1209
+ """Get total Port NDP protocol transmit statistics since last clear.
1210
+
1211
+ :return: total Port NDP protocol transmit statistics since last clear.
1212
+ :rtype: P4_NDP_TX_COUNTERS.GetDataAttr
1213
+ """
1214
+
1215
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1216
+
1217
+
1218
+ @register_command
1219
+ @dataclass
1220
+ class P4_NDP_COUNTERS:
1221
+ """
1222
+ Return total Port NDP protocol error statistics since last clear.
1223
+ """
1224
+
1225
+ code: typing.ClassVar[int] = 730
1226
+ pushed: typing.ClassVar[bool] = False
1227
+
1228
+ _connection: 'interfaces.IConnection'
1229
+ _module: int
1230
+ _port: int
1231
+
1232
+ class GetDataAttr(ResponseBodyStruct):
1233
+ current_time: int = field(XmpLong())
1234
+ """long integer, the current time (mSec since module restart)"""
1235
+ ref_time: int = field(XmpLong())
1236
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1237
+ invalid_ndp_count: int = field(XmpLong())
1238
+ """long integer, total number of invalid NDP packets received"""
1239
+ ndp_request_lookup_failure_count: int = field(XmpLong())
1240
+ """long integer, number of NDP requests received that could not be resolved"""
1241
+ ndp_reply_lookup_failure_count: int = field(XmpLong())
1242
+ """long integer, number of NDP replies received that could not be resolved"""
1243
+ ndp_request_retrans_count: int = field(XmpLong())
1244
+ """long integer, number of retransmitted NDP requests"""
1245
+ ndp_resolved_count: int = field(XmpLong())
1246
+ """long integer, number of correct resolved IP addresses"""
1247
+ ndp_failed_count: int = field(XmpLong())
1248
+ """long integer, number of IP address that was not resolved"""
1249
+ ndp_table_lookup_failure_count: int = field(XmpLong())
1250
+ """long integer, number of dest IP addresses not found in the NDP table"""
1251
+
1252
+ def get(self) -> Token[GetDataAttr]:
1253
+ """Get total Port NDP protocol error statistics since last clear.
1254
+
1255
+ :return: total Port NDP protocol error statistics since last clear.
1256
+ :rtype: P4_NDP_COUNTERS.GetDataAttr
1257
+ """
1258
+
1259
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1260
+
1261
+
1262
+ @register_command
1263
+ @dataclass
1264
+ class P4_ICMP_RX_COUNTERS:
1265
+ """
1266
+ Return total Port ICMP protocol receive statistics since last clear.
1267
+ """
1268
+
1269
+ code: typing.ClassVar[int] = 731
1270
+ pushed: typing.ClassVar[bool] = False
1271
+
1272
+ _connection: 'interfaces.IConnection'
1273
+ _module: int
1274
+ _port: int
1275
+
1276
+ class GetDataAttr(ResponseBodyStruct):
1277
+ current_time: int = field(XmpLong())
1278
+ """long integer, the current time (mSec since module restart)"""
1279
+ ref_time: int = field(XmpLong())
1280
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1281
+ icmp_echo_request_count: int = field(XmpLong())
1282
+ """long integer, total number of ICMP Echo requests received"""
1283
+ icmp_echo_reply_count: int = field(XmpLong())
1284
+ """long integer, total number of ICMP Echo replies received"""
1285
+ icmp_dest_unknown_count: int = field(XmpLong())
1286
+ """long integer, total number of ICMP Destination unknown received"""
1287
+ icmp_time_excessive_count: int = field(XmpLong())
1288
+ """long integer, total number of ICMP Time exceeded received"""
1289
+ icmpv6_count: int = field(XmpLong())
1290
+ """long integer, total number of ICMPv6 packets received"""
1291
+
1292
+ def get(self) -> Token[GetDataAttr]:
1293
+ """Get total Port ICMP protocol receive statistics since last clear.
1294
+
1295
+ :return: total Port ICMP protocol receive statistics since last clear.
1296
+ :rtype: P4_ICMP_RX_COUNTERS.GetDataAttr
1297
+ """
1298
+
1299
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1300
+
1301
+
1302
+ @register_command
1303
+ @dataclass
1304
+ class P4_ICMP_TX_COUNTERS:
1305
+ """
1306
+ Return total Port ICMP protocol transmit statistics since last clear.
1307
+ """
1308
+
1309
+ code: typing.ClassVar[int] = 732
1310
+ pushed: typing.ClassVar[bool] = False
1311
+
1312
+ _connection: 'interfaces.IConnection'
1313
+ _module: int
1314
+ _port: int
1315
+
1316
+ class GetDataAttr(ResponseBodyStruct):
1317
+ current_time: int = field(XmpLong())
1318
+ """long integer, the current time (mSec since module restart)"""
1319
+ ref_time: int = field(XmpLong())
1320
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1321
+ icmp_echo_request_count: int = field(XmpLong())
1322
+ """long integer, total number of ICMP Echo requests transmitted"""
1323
+ icmp_echo_reply_count: int = field(XmpLong())
1324
+ """long integer, total number of ICMP Echo replies transmitted"""
1325
+ icmp_dest_unknown_count: int = field(XmpLong())
1326
+ """long integer, total number of ICMP Destination unknown transmitted"""
1327
+ icmp_time_excessive_count: int = field(XmpLong())
1328
+ """long integer, total number of ICMP Time exceeded transmitted"""
1329
+ icmpv6_count: int = field(XmpLong())
1330
+ """long integer, total number of ICMPv6 packets transmitted"""
1331
+
1332
+ def get(self) -> Token[GetDataAttr]:
1333
+ """Get total Port ICMP protocol transmit statistics since last clear.
1334
+
1335
+ :return: total Port ICMP protocol transmit statistics since last clear.
1336
+ :rtype: P4_ICMP_TX_COUNTERS.GetDataAttr
1337
+ """
1338
+
1339
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1340
+
1341
+
1342
+ @register_command
1343
+ @dataclass
1344
+ class P4_ICMP_COUNTERS:
1345
+ """
1346
+ Return total Port ICMP protocol error statistics since last clear.
1347
+ """
1348
+
1349
+ code: typing.ClassVar[int] = 733
1350
+ pushed: typing.ClassVar[bool] = False
1351
+
1352
+ _connection: 'interfaces.IConnection'
1353
+ _module: int
1354
+ _port: int
1355
+
1356
+ class GetDataAttr(ResponseBodyStruct):
1357
+ current_time: int = field(XmpLong())
1358
+ """long integer, the current time (mSec since module restart)"""
1359
+ ref_time: int = field(XmpLong())
1360
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1361
+ invalid_icmp_count: int = field(XmpLong())
1362
+ """long integer, total number of unknown or invalid ICMP packets received"""
1363
+ unknown_icmp_count: int = field(XmpLong())
1364
+ """long integer, total number of unknown or unsupported ICMP packets received"""
1365
+ invalid_icmpv6_count: int = field(XmpLong())
1366
+ """long integer, total number of unknown or invalid ICMPv6 packets received"""
1367
+ unknown_icmpv6_count: int = field(XmpLong())
1368
+ """long integer, total number of unknown or unsupported ICMPv6 packets received"""
1369
+
1370
+ def get(self) -> Token[GetDataAttr]:
1371
+ """Get total Port ICMP protocol error statistics since last clear.
1372
+
1373
+ :return: total Port ICMP protocol error statistics since last clear.
1374
+ :rtype: P4_ICMP_COUNTERS.GetDataAttr
1375
+ """
1376
+
1377
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1378
+
1379
+
1380
+ @register_command
1381
+ @dataclass
1382
+ class P4_TCP_RX_COUNTERS:
1383
+ """
1384
+ Return total Port TCP protocol receive statistics since last clear.
1385
+ """
1386
+
1387
+ code: typing.ClassVar[int] = 734
1388
+ pushed: typing.ClassVar[bool] = False
1389
+
1390
+ _connection: 'interfaces.IConnection'
1391
+ _module: int
1392
+ _port: int
1393
+
1394
+ class GetDataAttr(ResponseBodyStruct):
1395
+ current_time: int = field(XmpLong())
1396
+ """long integer, the current time (mSec since module restart)"""
1397
+ ref_time: int = field(XmpLong())
1398
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1399
+ packet_count: int = field(XmpLong())
1400
+ """long integer, total number of TCP packets received"""
1401
+
1402
+ def get(self) -> Token[GetDataAttr]:
1403
+ """Get total Port TCP protocol receive statistics since last clear.
1404
+
1405
+ :return: total Port TCP protocol receive statistics since last clear.
1406
+ :rtype: P4_TCP_RX_COUNTERS.GetDataAttr
1407
+ """
1408
+
1409
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1410
+
1411
+
1412
+ @register_command
1413
+ @dataclass
1414
+ class P4_TCP_TX_COUNTERS:
1415
+ """
1416
+ Return total Port TCP protocol transmit statistics since last clear.
1417
+ """
1418
+
1419
+ code: typing.ClassVar[int] = 735
1420
+ pushed: typing.ClassVar[bool] = False
1421
+
1422
+ _connection: 'interfaces.IConnection'
1423
+ _module: int
1424
+ _port: int
1425
+
1426
+ class GetDataAttr(ResponseBodyStruct):
1427
+ current_time: int = field(XmpLong())
1428
+ """long integer, the current time (mSec since module restart)"""
1429
+ ref_time: int = field(XmpLong())
1430
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1431
+ packet_count: int = field(XmpLong())
1432
+ """long integer, total number of TCP packets transmitted"""
1433
+
1434
+ def get(self) -> Token[GetDataAttr]:
1435
+ """Get total Port TCP protocol transmit statistics since last clear.
1436
+
1437
+ :return: total Port TCP protocol transmit statistics since last clear.
1438
+ :rtype: P4_TCP_TX_COUNTERS.GetDataAttr
1439
+ """
1440
+
1441
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1442
+
1443
+
1444
+ @register_command
1445
+ @dataclass
1446
+ class P4_TCP_COUNTERS:
1447
+ """
1448
+ Return total Port TCP protocol error statistics since last clear.
1449
+ """
1450
+
1451
+ code: typing.ClassVar[int] = 736
1452
+ pushed: typing.ClassVar[bool] = False
1453
+
1454
+ _connection: 'interfaces.IConnection'
1455
+ _module: int
1456
+ _port: int
1457
+
1458
+ class GetDataAttr(ResponseBodyStruct):
1459
+ current_time: int = field(XmpLong())
1460
+ """long integer, the current time (mSec since module restart)"""
1461
+ ref_time: int = field(XmpLong())
1462
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1463
+ checksum_error_count: int = field(XmpLong())
1464
+ """long integer, total number of tcp packets which tcp header checksum error"""
1465
+ invalid_tcp_count: int = field(XmpLong())
1466
+ """long integer, total number of TCP packets which are malformed"""
1467
+ tcp_lookup_failure_count: int = field(XmpLong())
1468
+ """long integer, number of TCP packets received that could not be resolved"""
1469
+
1470
+ def get(self) -> Token[GetDataAttr]:
1471
+ """Get total Port TCP protocol error statistics since last clear.
1472
+
1473
+ :return: total Port TCP protocol error statistics since last clear.
1474
+ :rtype: P4_TCP_COUNTERS.GetDataAttr
1475
+ """
1476
+
1477
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1478
+
1479
+
1480
+ @register_command
1481
+ @dataclass
1482
+ class P4_UDP_RX_COUNTERS:
1483
+ """
1484
+ Return total Port UDP protocol receive statistics since last clear.
1485
+ """
1486
+
1487
+ code: typing.ClassVar[int] = 737
1488
+ pushed: typing.ClassVar[bool] = False
1489
+
1490
+ _connection: 'interfaces.IConnection'
1491
+ _module: int
1492
+ _port: int
1493
+
1494
+ class GetDataAttr(ResponseBodyStruct):
1495
+ current_time: int = field(XmpLong())
1496
+ """long integer, the current time (mSec since module restart)"""
1497
+ ref_time: int = field(XmpLong())
1498
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1499
+ packet_count: int = field(XmpLong())
1500
+ """long integer, total number of UDP packets received"""
1501
+
1502
+ def get(self) -> Token[GetDataAttr]:
1503
+ """Get total Port UDP protocol receive statistics since last clear.
1504
+
1505
+ :return: total Port UDP protocol receive statistics since last clear.
1506
+ :rtype: P4_UDP_RX_COUNTERS.GetDataAttr
1507
+ """
1508
+
1509
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1510
+
1511
+
1512
+ @register_command
1513
+ @dataclass
1514
+ class P4_UDP_TX_COUNTERS:
1515
+ """
1516
+ Return total Port UDP protocol transmit statistics since last clear.
1517
+ """
1518
+
1519
+ code: typing.ClassVar[int] = 738
1520
+ pushed: typing.ClassVar[bool] = False
1521
+
1522
+ _connection: 'interfaces.IConnection'
1523
+ _module: int
1524
+ _port: int
1525
+
1526
+ class GetDataAttr(ResponseBodyStruct):
1527
+ current_time: int = field(XmpLong())
1528
+ """long integer, the current time (mSec since module restart)"""
1529
+ ref_time: int = field(XmpLong())
1530
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1531
+ packet_count: int = field(XmpLong())
1532
+ """long integer, total number of UDP packets transmitted"""
1533
+
1534
+ def get(self) -> Token[GetDataAttr]:
1535
+ """Get total Port UDP protocol transmit statistics since last clear.
1536
+
1537
+ :return: total Port UDP protocol transmit statistics since last clear.
1538
+ :rtype: P4_UDP_TX_COUNTERS.GetDataAttr
1539
+ """
1540
+
1541
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1542
+
1543
+
1544
+ @register_command
1545
+ @dataclass
1546
+ class P4_UDP_COUNTERS:
1547
+ """
1548
+ Return total Port UDP protocol error statistics since last clear.
1549
+ """
1550
+
1551
+ code: typing.ClassVar[int] = 739
1552
+ pushed: typing.ClassVar[bool] = False
1553
+
1554
+ _connection: 'interfaces.IConnection'
1555
+ _module: int
1556
+ _port: int
1557
+
1558
+ class GetDataAttr(ResponseBodyStruct):
1559
+ current_time: int = field(XmpLong())
1560
+ """long integer, the current time (mSec since module restart)"""
1561
+ ref_time: int = field(XmpLong())
1562
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1563
+ checksum_error_count: int = field(XmpLong())
1564
+ """long integer, total number of udp packets which udp header checksum error"""
1565
+ invalid_udp_count: int = field(XmpLong())
1566
+ """long integer, total number of UDP packets which are malformed"""
1567
+ udp_lookup_failure_count: int = field(XmpLong())
1568
+ """long integer, number of UDP packets received that could not be resolved"""
1569
+
1570
+ def get(self) -> Token[GetDataAttr]:
1571
+ """Get total Port UDP protocol error statistics since last clear.
1572
+
1573
+ :return: total Port UDP protocol error statistics since last clear.
1574
+ :rtype: P4_UDP_COUNTERS.GetDataAttr
1575
+ """
1576
+
1577
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1578
+
1579
+
1580
+ @register_command
1581
+ @dataclass
1582
+ class P4_CLEAR_COUNTERS:
1583
+ """
1584
+ Clears all run-time port counters.
1585
+ """
1586
+
1587
+ code: typing.ClassVar[int] = 740
1588
+ pushed: typing.ClassVar[bool] = False
1589
+
1590
+ _connection: 'interfaces.IConnection'
1591
+ _module: int
1592
+ _port: int
1593
+
1594
+ class SetDataAttr(RequestBodyStruct):
1595
+ pass
1596
+
1597
+ def set(self) -> Token[None]:
1598
+ """Clears all run-time port counters.
1599
+ """
1600
+
1601
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
1602
+
1603
+
1604
+ @register_command
1605
+ @dataclass
1606
+ class P4_ETH_COUNTERS:
1607
+ """
1608
+ Return total port Ethernet statistics since last clear.
1609
+ """
1610
+
1611
+ code: typing.ClassVar[int] = 765
1612
+ pushed: typing.ClassVar[bool] = False
1613
+
1614
+ _connection: 'interfaces.IConnection'
1615
+ _module: int
1616
+ _port: int
1617
+
1618
+ class GetDataAttr(ResponseBodyStruct):
1619
+ current_time: int = field(XmpLong())
1620
+ """long integer, the current time (mSec since module restart)"""
1621
+ ref_time: int = field(XmpLong())
1622
+ """long integer, reference time (mSec for P4_TRAFFIC on)"""
1623
+ tx_error_count: int = field(XmpLong())
1624
+ """long integer, TX errors"""
1625
+ rx_error_count: int = field(XmpLong())
1626
+ """long integer, RX errors"""
1627
+ rx_packet_lost_count: int = field(XmpLong())
1628
+ """long integer, packets lost by the Ethernet driver due to RX queue overflow"""
1629
+
1630
+ def get(self) -> Token[GetDataAttr]:
1631
+ """Get total port Ethernet statistics since last clear.
1632
+
1633
+ :return: total port Ethernet statistics since last clear.
1634
+ :rtype: P4_ETH_COUNTERS.GetDataAttr
1635
+ """
1636
+
1637
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1638
+
1639
+
1640
+ @register_command
1641
+ @dataclass
1642
+ class P4_CLEAR:
1643
+ """
1644
+ Set the Port State to OFF and delete all configured Connection Groups for the port.
1645
+ """
1646
+
1647
+ code: typing.ClassVar[int] = 766
1648
+ pushed: typing.ClassVar[bool] = False
1649
+
1650
+ _connection: 'interfaces.IConnection'
1651
+ _module: int
1652
+ _port: int
1653
+
1654
+ class SetDataAttr(RequestBodyStruct):
1655
+ pass
1656
+
1657
+ def set(self) -> Token[None]:
1658
+ """Set the Port State to OFF and delete all configured Connection Groups for the port.
1659
+ """
1660
+
1661
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
1662
+
1663
+
1664
+ @register_command
1665
+ @dataclass
1666
+ class P4_SPEEDSELECTION:
1667
+ """
1668
+ Sets the port speed. The selected speed must be one of the speeds supported by
1669
+ the port, which can be retrieved with P4_CAPABILITIES.
1670
+ """
1671
+
1672
+ code: typing.ClassVar[int] = 767
1673
+ pushed: typing.ClassVar[bool] = True
1674
+
1675
+ _connection: 'interfaces.IConnection'
1676
+ _module: int
1677
+ _port: int
1678
+
1679
+ class GetDataAttr(ResponseBodyStruct):
1680
+ speed: L47PortSpeed = field(XmpByte())
1681
+ """coded byte, specifies the speed of the port"""
1682
+
1683
+ class SetDataAttr(RequestBodyStruct):
1684
+ speed: L47PortSpeed = field(XmpByte())
1685
+ """coded byte, specifies the speed of the port"""
1686
+
1687
+ def get(self) -> Token[GetDataAttr]:
1688
+ """Get the port speed mode.
1689
+
1690
+ :return: the port speed mode.
1691
+ :rtype: P4_SPEEDSELECTION.GetDataAttr
1692
+ """
1693
+
1694
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1695
+
1696
+ def set(self, speed: L47PortSpeed) -> Token[None]:
1697
+ """Set the port speed mode.
1698
+
1699
+ :param speed: specifies the speed mode of the port
1700
+ :type speed: L47PortSpeed
1701
+ """
1702
+
1703
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, speed=speed))
1704
+
1705
+ set_auto = functools.partialmethod(set, L47PortSpeed.AUTO)
1706
+ """Set the port speed mode to Auto."""
1707
+
1708
+ set_f100m = functools.partialmethod(set, L47PortSpeed.F100M)
1709
+ """Set the port speed mode to 100 Mbit/s."""
1710
+
1711
+ set_f1g = functools.partialmethod(set, L47PortSpeed.F1G)
1712
+ """Set the port speed mode to 1 Gbit/s."""
1713
+
1714
+ set_f2_5g = functools.partialmethod(set, L47PortSpeed.F2_5G)
1715
+ """Set the port speed mode to 2.5 Gbit/s."""
1716
+
1717
+ set_f5g = functools.partialmethod(set, L47PortSpeed.F5G)
1718
+ """Set the port speed mode to 5 Gbit/s."""
1719
+
1720
+ set_f10g = functools.partialmethod(set, L47PortSpeed.F10G)
1721
+ """Set the port speed mode to 10 Gbit/s."""
1722
+
1723
+ set_f25g = functools.partialmethod(set, L47PortSpeed.F25G)
1724
+ """Set the port speed mode to 25 Gbit/s."""
1725
+
1726
+ set_f40g = functools.partialmethod(set, L47PortSpeed.F40G)
1727
+ """Set the port speed mode to 40 Gbit/s."""
1728
+
1729
+ set_f50g = functools.partialmethod(set, L47PortSpeed.F50G)
1730
+ """Set the port speed mode to 50 Gbit/s."""
1731
+
1732
+ set_f100g = functools.partialmethod(set, L47PortSpeed.F100G)
1733
+ """Set the port speed mode to 100 Gbit/s."""
1734
+
1735
+ @register_command
1736
+ @dataclass
1737
+ class P4_ETH_QUEUE_COUNTERS:
1738
+ """
1739
+ Get the stats of the all active queues of the port
1740
+ """
1741
+
1742
+ code: typing.ClassVar[int] = 775
1743
+ pushed: typing.ClassVar[bool] = True
1744
+
1745
+ _connection: "interfaces.IConnection"
1746
+ _module: int
1747
+ _port: int
1748
+
1749
+ class GetDataAttr(ResponseBodyStruct):
1750
+ last_update: int = field(XmpLong()) # long integer, the current time (mSec since module restart)
1751
+ stat_ref_time: int = field(XmpLong()) # long integer, reference time (mSec for P4_TRAFFIC on)
1752
+ num_queues: int = field(XmpInt())
1753
+ queue_list: typing.List[subtypes.QueueStatsElem] = field(XmpSequence(types_chunk=[XmpLong(), XmpLong(), XmpLong(), XmpLong()]))
1754
+
1755
+ def get(self) -> "Token[GetDataAttr]":
1756
+ """Get the stats of the all active queues of the port
1757
+ :return: The current time (mSec since module restart)
1758
+ :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr
1759
+ :return: Reference time (mSec for P4_TRAFFIC on)
1760
+ :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr
1761
+ :return: Number of Active queues
1762
+ :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr
1763
+ :return: A list that each contains stats of a queue
1764
+ :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr
1765
+ """
1766
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1767
+
1768
+ @register_command
1769
+ @dataclass
1770
+ class P4_DHCP_CONFIG:
1771
+ """
1772
+ Configure DHCP Client in order to aquire a pool of ip addresses.
1773
+ """
1774
+
1775
+ code: typing.ClassVar[int] = 780
1776
+ pushed: typing.ClassVar[bool] = False
1777
+
1778
+ _connection: "interfaces.IConnection"
1779
+ _module: int
1780
+ _port: int
1781
+
1782
+ class SetDataAttr(RequestBodyStruct):
1783
+ num_requests: int = field(XmpInt(signed=False)) # Number of DHCP requests to be sent
1784
+ retransmit_retries: int = field(XmpInt(signed=False)) # Max Request retransmission retries
1785
+ timeout: int = field(XmpInt(signed=False)) # retransmission timeout [ms]
1786
+ base_hw_addr: Hex = field(XmpMacAddress()) # base hw address for generating DHCP requests (the first 3 bytes are being used)
1787
+
1788
+ class GetDataAttr(ResponseBodyStruct):
1789
+ num_requests: int = field(XmpInt(signed=False)) # Number of DHCP request to acuire IP addresses
1790
+ retransmit_retries: int = field(XmpInt(signed=False)) # Max Request retransmission retries
1791
+ timeout: int = field(XmpInt(signed=False)) # retransmission timeout [ms]
1792
+ base_hw_addr: Hex = field(XmpMacAddress()) # base hw address for generating DHCP requests (the first 3 bytes is being used)
1793
+
1794
+ def get(self) -> "Token[GetDataAttr]":
1795
+ """Get the DHCP configuration.
1796
+
1797
+ :return: the DHCP configuration
1798
+ :rtype: P4_DHCP_CONFIG.GetDataAttr
1799
+ """
1800
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1801
+
1802
+ def set(self, num_requests: int, retransmit_retries: int, timeout: int, base_hw_addr: str) -> "Token":
1803
+ """Set the DHCP configuration.
1804
+
1805
+ :param num_requests: Number of DHCP requests - must be larger than 0
1806
+ :type num_requests: unsigned int
1807
+ :param retransmit_retries: maximum DHCP Request retransmission retries - must be larger than 0
1808
+ :type retransmit_retries: unsigned int
1809
+ :param timeout: retransmission timeout [ms]
1810
+ :type timeout: unsigned int
1811
+ :param base_hw_addr: base hw address for generating DHCP requests (the first 3 bytes is being used)
1812
+ :type base_hw_addr: str
1813
+ """
1814
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, num_requests=num_requests,
1815
+ retransmit_retries=retransmit_retries, timeout=timeout, base_hw_addr=base_hw_addr))
1816
+
1817
+
1818
+ @register_command
1819
+ @dataclass
1820
+ class P4_DHCP_RUN:
1821
+ """
1822
+ Run DHCP Client process to obtain a pool of address.
1823
+ """
1824
+
1825
+ code: typing.ClassVar[int] = 781
1826
+ pushed: typing.ClassVar[bool] = False
1827
+
1828
+ _connection: "interfaces.IConnection"
1829
+ _module: int
1830
+ _port: int
1831
+
1832
+ class SetDataAttr(RequestBodyStruct):
1833
+ pass
1834
+
1835
+ def set(self) -> "Token":
1836
+ """Run DHCP Client Process.
1837
+
1838
+ """
1839
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
1840
+
1841
+
1842
+ @register_command
1843
+ @dataclass
1844
+ class P4_DHCP_STATE:
1845
+ """
1846
+ Get the last state of the DHCP Client Process.
1847
+ """
1848
+
1849
+ code: typing.ClassVar[int] = 782
1850
+ pushed: typing.ClassVar[bool] = False
1851
+
1852
+ _connection: "interfaces.IConnection"
1853
+ _module: int
1854
+ _port: int
1855
+
1856
+ class GetDataAttr(ResponseBodyStruct):
1857
+ dhcp_state: DhcpState = field(XmpByte()) # The last state of the DHCP Client Process.
1858
+ num_success: int = field(XmpInt()) # Current number of successfully optained ip addresses
1859
+ num_failure: int = field(XmpInt()) # Current number of failed dhcp requests
1860
+
1861
+ def get(self) -> "Token[GetDataAttr]":
1862
+ """Get the last state of the DHCP Client Process.
1863
+ The dhcp_state is an enum type of DhcpState{DHCP_STATE_UNKNOWN=0, DHCP_STATE_RUNNING=1, DHCP_STATE_COMPLETED=2, DHCP_STATE_FAILED=3}
1864
+
1865
+ :return: the last state of the DHCP Client Process.
1866
+ :rtype: P4_DHCP_STATE.GetDataAttr
1867
+ """
1868
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1869
+
1870
+
1871
+ @register_command
1872
+ @dataclass
1873
+ class P4_DHCP_RESULT:
1874
+ """
1875
+ Get the port's last DHCP client process result
1876
+ """
1877
+
1878
+ code: typing.ClassVar[int] = 783
1879
+ pushed: typing.ClassVar[bool] = True
1880
+
1881
+ _connection: "interfaces.IConnection"
1882
+ _module: int
1883
+ _port: int
1884
+
1885
+ class GetDataAttr(ResponseBodyStruct):
1886
+ dhcp_chunks: typing.List[subtypes.DhcpChunk] = field(XmpSequence(types_chunk=[XmpIPv4Address(), XmpIPv4Address(), XmpIPv4Address(), XmpIPv4Address(), XmpInt(), XmpMacAddress()]))
1887
+
1888
+ def get(self) -> "Token[GetDataAttr]":
1889
+ """Get the port's the result of the last DHCP client process
1890
+
1891
+ :return: A list that contains the response for each DHCP request that had lunched by the last DHCP client process
1892
+ :rtype: P4_DHCP_RESULT.GetDataAttr
1893
+ """
1894
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1895
+
1896
+
1897
+ @register_command
1898
+ @dataclass
1899
+ class P4_DHCP_VLAN:
1900
+ """
1901
+ Configure a set of VLAN tags for current DHCP Process.
1902
+ """
1903
+
1904
+ code: typing.ClassVar[int] = 784
1905
+ pushed: typing.ClassVar[bool] = True
1906
+
1907
+ _connection: "interfaces.IConnection"
1908
+ _module: int
1909
+ _port: int
1910
+
1911
+ class SetDataAttr(RequestBodyStruct):
1912
+ state: DhcpVlanState = field(XmpByte()) # Enable/Disable Vlan configuration
1913
+ vlans: typing.List[subtypes.VlanTag] = field(XmpSequence(types_chunk=[XmpShort(), XmpByte()])) # A list of vlans. up to 8 TCIs can be define
1914
+
1915
+ class GetDataAttr(ResponseBodyStruct):
1916
+ state: DhcpVlanState = field(XmpByte()) # Determines whether VLAN is configured or not.
1917
+ vlans: typing.List[subtypes.VlanTag] = field(XmpSequence(types_chunk=[XmpShort(), XmpByte()])) # A list of vlans. up to 8 TCIs can be define
1918
+
1919
+ def set(self, state: DhcpVlanState, vlans: typing.List[subtypes.VlanTag]) -> "Token":
1920
+ """Set a list of VLANs for current DHCP Process, up to 8 TCIs can be defined. The order of the VLANs is like the following: ethernet/vlan0/vlan1/../vlanN/uppler_layer(like IPv4)
1921
+
1922
+ :param state: Enable/Disable Vlan configuration
1923
+ :type state: DhcpVlanState
1924
+ :param vlans: specifying a list of VlanTag
1925
+ :type vlans: typing.List[subtypes.VlanTag]
1926
+ """
1927
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port,
1928
+ state=state, vlans=vlans))
1929
+ def get(self) -> "Token[GetDataAttr]":
1930
+ """Get the DHCP VLAN configuration
1931
+ :return: Whether DHCP VLAN is configured or not
1932
+ :rtype: P4_DHCP_RESULT.GetDataAttr
1933
+ :return: A list of vlans
1934
+ :rtype: P4_DHCP_RESULT.GetDataAttr
1935
+ """
1936
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1937
+
1938
+ @register_command
1939
+ @dataclass
1940
+ class P4_MAX_PACKET_RATE:
1941
+ """
1942
+ Specifies the maximum number of packets per second allowed to be transmitted on the port.
1943
+ """
1944
+
1945
+ code: typing.ClassVar[int] = 950
1946
+ pushed: typing.ClassVar[bool] = False
1947
+
1948
+ _connection: 'interfaces.IConnection'
1949
+ _module: int
1950
+ _port: int
1951
+
1952
+ class GetDataAttr(ResponseBodyStruct):
1953
+ mode: AutoOrManual = field(XmpByte())
1954
+ """coded byte, specifies the mode of the max. pps mechanism"""
1955
+ rate: int = field(XmpInt())
1956
+ """integer, maximum number of packets per second to transmit on this port"""
1957
+ time_window: int = field(XmpInt())
1958
+ """integer, time window [us] to measure the pps rate"""
1959
+
1960
+ class SetDataAttr(RequestBodyStruct):
1961
+ mode: AutoOrManual = field(XmpByte())
1962
+ """coded byte, specifies the mode of the max. pps mechanism"""
1963
+ rate: int = field(XmpInt())
1964
+ """integer, maximum number of packets per second to transmit on this port"""
1965
+ time_window: int = field(XmpInt())
1966
+ """integer, time window [us] to measure the pps rate"""
1967
+
1968
+ def get(self) -> Token[GetDataAttr]:
1969
+ """Get the maximum number of packets per second allowed to be transmitted on the port.
1970
+
1971
+ :return: the maximum number of packets per second allowed to be transmitted on the port.
1972
+ :rtype: P4_MAX_PACKET_RATE.GetDataAttr
1973
+ """
1974
+
1975
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1976
+
1977
+ def set(self, mode: AutoOrManual, rate: int, time_window: int) -> Token[None]:
1978
+ """Set the maximum number of packets per second allowed to be transmitted on the port.
1979
+
1980
+ :param mode: specifies the mode of the max. pps mechanism
1981
+ :type mode: AutoOrManual
1982
+ :param rate: maximum number of packets per second to transmit on this port
1983
+ :type rate: int
1984
+ :param time_window: time window [us] to measure the pps rate
1985
+ :type time_window: int
1986
+ """
1987
+
1988
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, mode=mode, rate=rate, time_window=time_window))
1989
+
1990
+ set_automatic = functools.partialmethod(set, AutoOrManual.AUTOMATIC)
1991
+ """Set port max packet rate mode to Automatic."""
1992
+
1993
+ set_manual = functools.partialmethod(set, AutoOrManual.MANUAL)
1994
+ """Set port max packet rate mode to Manual."""
1995
+
1996
+
1997
+ @register_command
1998
+ @dataclass
1999
+ class P4_PCI_INFO:
2000
+ """
2001
+ Report the port PCI info.
2002
+ """
2003
+
2004
+ code: typing.ClassVar[int] = 960
2005
+ pushed: typing.ClassVar[bool] = False
2006
+
2007
+ _connection: 'interfaces.IConnection'
2008
+ _module: int
2009
+ _port: int
2010
+
2011
+ class GetDataAttr(ResponseBodyStruct):
2012
+ vendor_id: Hex = field(XmpHex(size=4))
2013
+ """four hex bytes, PCI Vendor ID"""
2014
+ device_id: Hex = field(XmpHex(size=4))
2015
+ """four hex bytes, PCI Device ID"""
2016
+ sub_vendor_id: Hex = field(XmpHex(size=4))
2017
+ """four hex bytes, PCI Subsystem Vendor ID"""
2018
+ sub_device_id: Hex = field(XmpHex(size=4))
2019
+ """four hex bytes, PCI Subsystem Device ID"""
2020
+ rev: int = field(XmpInt())
2021
+ """integer, Revision"""
2022
+
2023
+ def get(self) -> Token[GetDataAttr]:
2024
+ """Get the port PCI info.
2025
+
2026
+ :return: the port PCI info
2027
+ :rtype: P4_PCI_INFO.GetDataAttr
2028
+ """
2029
+
2030
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2031
+
2032
+
2033
+ @register_command
2034
+ @dataclass
2035
+ class P4_FW_VER:
2036
+ """
2037
+ Report the firmware version of the port (NIC).
2038
+ """
2039
+
2040
+ code: typing.ClassVar[int] = 961
2041
+ pushed: typing.ClassVar[bool] = False
2042
+
2043
+ _connection: 'interfaces.IConnection'
2044
+ _module: int
2045
+ _port: int
2046
+
2047
+ class GetDataAttr(ResponseBodyStruct):
2048
+ major: int = field(XmpInt())
2049
+ """integer, Major firmware version"""
2050
+ minor: int = field(XmpInt())
2051
+ """integer, Minor firmware version"""
2052
+
2053
+ def get(self) -> Token[GetDataAttr]:
2054
+ """Get the firmware version of the port (NIC).
2055
+
2056
+ :return: the firmware version of the port (NIC)
2057
+ :rtype: P4_FW_VER.GetDataAttr
2058
+ """
2059
+
2060
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2061
+
2062
+
2063
+ @register_command
2064
+ @dataclass
2065
+ class P4_DEV_NAME:
2066
+ """
2067
+ Report the name of the device (NIC) on which the port is located.
2068
+ """
2069
+
2070
+ code: typing.ClassVar[int] = 962
2071
+ pushed: typing.ClassVar[bool] = False
2072
+
2073
+ _connection: 'interfaces.IConnection'
2074
+ _module: int
2075
+ _port: int
2076
+
2077
+ class GetDataAttr(ResponseBodyStruct):
2078
+ name: str = field(XmpStr())
2079
+ """string, name of the device (NIC) on which the port is located"""
2080
+
2081
+ def get(self) -> Token[GetDataAttr]:
2082
+ """Get the name of the device (NIC) on which the port is located.
2083
+
2084
+ :return: the name of the device (NIC) on which the port is located.
2085
+ :rtype: P4_DEV_NAME.GetDataAttr
2086
+ """
2087
+
2088
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2089
+
2090
+
2091
+ @register_command
2092
+ @dataclass
2093
+ class P4_PORT_TYPE:
2094
+ """
2095
+ Report the port type. The different possible ports are divided into types.
2096
+ """
2097
+
2098
+ code: typing.ClassVar[int] = 963
2099
+ pushed: typing.ClassVar[bool] = False
2100
+
2101
+ _connection: 'interfaces.IConnection'
2102
+ _module: int
2103
+ _port: int
2104
+
2105
+ class GetDataAttr(ResponseBodyStruct):
2106
+ type_number: int = field(XmpInt())
2107
+ """integer, enumerated port type"""
2108
+ type_string: str = field(XmpStr())
2109
+ """string, textual representation of the port type"""
2110
+
2111
+ def get(self) -> Token[GetDataAttr]:
2112
+ """Get the L47 port type.
2113
+
2114
+ :return: the L47 port type
2115
+ :rtype: P4_PORT_TYPE.GetDataAttr
2116
+ """
2117
+
2118
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2119
+
2120
+
2121
+ @register_command
2122
+ @dataclass
2123
+ class P4_LICENSE_INFO:
2124
+ """
2125
+ Returns the information on the license assigned to the port - if any.
2126
+ """
2127
+
2128
+ code: typing.ClassVar[int] = 964
2129
+ pushed: typing.ClassVar[bool] = True
2130
+
2131
+ _connection: 'interfaces.IConnection'
2132
+ _module: int
2133
+ _port: int
2134
+
2135
+ class GetDataAttr(ResponseBodyStruct):
2136
+ present: IsPresent = field(XmpByte())
2137
+ """coded byte, specifies if a license is assigned to the port"""
2138
+ speed: LicenseSpeed = field(XmpByte())
2139
+ """coded byte, if a license is assigned to the port, specifies the speed of the license"""
2140
+ permanency: IsPermanent = field(XmpByte())
2141
+ """coded byte, if a license is assigned to the port, specifies if the license is permanent"""
2142
+ expiration: int = field(XmpLong())
2143
+ """long integer, if a license is assigned to the port and it is not permanent, specifies the expiration date of the license - in seconds since Jan 1, 1970."""
2144
+
2145
+ def get(self) -> Token[GetDataAttr]:
2146
+ """Get the information on the license assigned to the port.
2147
+
2148
+ :return: the information on the license assigned to the port
2149
+ :rtype: P4_LICENSE_INFO.GetDataAttr
2150
+ """
2151
+
2152
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2153
+
2154
+
2155
+ @register_command
2156
+ @dataclass
2157
+ class P4_APTITUDES:
2158
+ """
2159
+ Returns the ports aptitudes - i.e. what is possible to configure on the port in
2160
+ terms of features and performance.
2161
+
2162
+ Current schema of the BSON document:
2163
+
2164
+ .. code-block::
2165
+
2166
+ schema = {
2167
+ 'chassis': {
2168
+ 'type': 'int32',
2169
+ 'required': True,
2170
+ 'enum': ['CHASSIS_TYPE_UNKNOWN',
2171
+ 'CHASSIS_TYPE_APPLIANCE',
2172
+ 'CHASSIS_TYPE_BAY',
2173
+ 'CHASSIS_TYPE_COMPACT',
2174
+ 'CHASSIS_TYPE_SAFIRE']
2175
+ },
2176
+ 'tcp_udp': {
2177
+ 'type': 'document',
2178
+ 'required': True,
2179
+ 'properties': {
2180
+ 'cc': {
2181
+ 'type': 'int32',
2182
+ 'required': True,
2183
+ },
2184
+ }
2185
+ },
2186
+ 'tls': {
2187
+ 'type': 'document',
2188
+ 'required': True,
2189
+ 'properties': {
2190
+ 'supported': {
2191
+ 'type': 'bool',
2192
+ 'required': True,
2193
+ },
2194
+ 'cc': {
2195
+ 'type': 'int32',
2196
+ 'required': True,
2197
+ }
2198
+ }
2199
+ }
2200
+ }
2201
+ """
2202
+
2203
+ code: typing.ClassVar[int] = 1200
2204
+ pushed: typing.ClassVar[bool] = False
2205
+
2206
+ _connection: 'interfaces.IConnection'
2207
+ _module: int
2208
+ _port: int
2209
+
2210
+ class GetDataAttr(ResponseBodyStruct):
2211
+ bson: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
2212
+ """list of hex bytes, bson document containing the ports aptitudes"""
2213
+
2214
+ def get(self) -> Token[GetDataAttr]:
2215
+ """Get the ports aptitudes
2216
+
2217
+ :return: the ports aptitudes in BSON format
2218
+ :rtype: P4_APTITUDES.GetDataAttr
2219
+ """
2220
+
2221
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))