tdl-xoa-driver 1.5.1__py3-none-any.whl → 1.6.1__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 (110) hide show
  1. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/METADATA +1 -1
  2. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/RECORD +87 -88
  3. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/licenses/LICENSE +1 -1
  4. xoa_driver/__init__.py +2 -2
  5. xoa_driver/enums.py +10 -10
  6. xoa_driver/functions/anlt.py +60 -78
  7. xoa_driver/functions/cli/testbed_config.py +1 -1
  8. xoa_driver/functions/cmis/_replies.py +4 -4
  9. xoa_driver/functions/mgmt.py +206 -250
  10. xoa_driver/functions/tools.py +11 -6
  11. xoa_driver/internals/commands/c_commands.py +59 -0
  12. xoa_driver/internals/commands/enums.py +101 -90
  13. xoa_driver/internals/commands/m4_commands.py +25 -0
  14. xoa_driver/internals/commands/m4e_commands.py +6 -0
  15. xoa_driver/internals/commands/m_commands.py +51 -1
  16. xoa_driver/internals/commands/p4_commands.py +63 -1
  17. xoa_driver/internals/commands/p4e_commands.py +9 -0
  18. xoa_driver/internals/commands/p4g_commands.py +139 -0
  19. xoa_driver/internals/commands/p_commands.py +455 -61
  20. xoa_driver/internals/commands/pc_commands.py +9 -0
  21. xoa_driver/internals/commands/pd_commands.py +11 -0
  22. xoa_driver/internals/commands/pe_commands.py +27 -0
  23. xoa_driver/internals/commands/pec_commands.py +9 -0
  24. xoa_driver/internals/commands/ped_commands.py +23 -0
  25. xoa_driver/internals/commands/pef_commands.py +43 -0
  26. xoa_driver/internals/commands/pf_commands.py +11 -0
  27. xoa_driver/internals/commands/pl1_commands.py +315 -48
  28. xoa_driver/internals/commands/pl_commands.py +8 -0
  29. xoa_driver/internals/commands/pm_commands.py +11 -0
  30. xoa_driver/internals/commands/pp_commands.py +84 -27
  31. xoa_driver/internals/commands/pr_commands.py +25 -0
  32. xoa_driver/internals/commands/ps_commands.py +47 -1
  33. xoa_driver/internals/commands/pt_commands.py +15 -0
  34. xoa_driver/internals/commands/px_commands.py +180 -136
  35. xoa_driver/internals/commands/subtypes.py +4 -3
  36. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +1 -1
  37. xoa_driver/internals/hli/indices/macsecscs/base_macsecsc.py +41 -3
  38. xoa_driver/internals/hli/modules/modules_l23/family_combi.py +0 -64
  39. xoa_driver/internals/hli/modules/modules_l23/family_edun.py +0 -2
  40. xoa_driver/internals/hli/modules/modules_l23/{family_g.py → family_loki.py} +29 -1
  41. xoa_driver/internals/hli/modules/modules_l23/family_odin.py +412 -0
  42. xoa_driver/internals/hli/modules/modules_l23/{family_l.py → family_thor.py} +44 -0
  43. xoa_driver/internals/hli/ports/port_l23/chimera/port_chimera.py +3 -3
  44. xoa_driver/internals/hli/ports/port_l23/family_edun.py +8 -43
  45. xoa_driver/internals/hli/ports/port_l23/{family_l1.py → family_freya.py} +9 -44
  46. xoa_driver/internals/hli/ports/port_l23/{family_g.py → family_loki.py} +32 -31
  47. xoa_driver/internals/hli/ports/port_l23/family_odin.py +225 -0
  48. xoa_driver/internals/hli/ports/port_l23/family_thor.py +67 -0
  49. xoa_driver/internals/hli/ports/port_l23/layer1/anlt.py +512 -0
  50. xoa_driver/internals/hli/ports/port_l23/layer1/brr.py +26 -0
  51. xoa_driver/internals/hli/ports/port_l23/layer1/eye_diagram.py +71 -0
  52. xoa_driver/internals/hli/ports/port_l23/{pcs_pma_ijkl_chimera.py → layer1/impair.py} +7 -7
  53. xoa_driver/internals/hli/ports/port_l23/layer1/laser_power.py +28 -0
  54. xoa_driver/internals/hli/ports/port_l23/{family_e.py → layer1/lower_power.py} +1 -51
  55. xoa_driver/internals/hli/ports/port_l23/{freya_l1.py → layer1/medium.py} +38 -358
  56. xoa_driver/internals/hli/ports/port_l23/layer1/pcs_fec.py +219 -0
  57. xoa_driver/internals/hli/ports/port_l23/layer1/pma.py +43 -0
  58. xoa_driver/internals/hli/ports/port_l23/layer1/prbs.py +39 -0
  59. xoa_driver/internals/hli/ports/port_l23/layer1/preamble.py +25 -0
  60. xoa_driver/internals/hli/ports/port_l23/{fault_jkl.py → layer1/rs_fault.py} +2 -2
  61. xoa_driver/internals/hli/ports/port_l23/layer1/siv.py +69 -0
  62. xoa_driver/internals/hli/ports/port_l23/layer1_edun.py +103 -0
  63. xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +103 -0
  64. xoa_driver/internals/hli/ports/port_l23/layer1_loki.py +74 -0
  65. xoa_driver/internals/hli/ports/port_l23/layer1_thor.py +70 -0
  66. xoa_driver/internals/hli/ports/port_l23/sec/__init__.py +0 -0
  67. xoa_driver/internals/hli/ports/port_l23/sec/macsec.py +108 -0
  68. xoa_driver/internals/hli/ports/port_l23/tcvr/__init__.py +0 -0
  69. xoa_driver/internals/hli/ports/port_l23/{bases/port_transceiver.py → tcvr/cmis.py} +4 -118
  70. xoa_driver/internals/hli/ports/port_l23/tcvr/transceiver.py +124 -0
  71. xoa_driver/internals/hli/ports/port_l23/trafficgen/__init__.py +0 -0
  72. xoa_driver/internals/hli/ports/port_l23/trafficgen/runt.py +32 -0
  73. xoa_driver/internals/hli/ports/port_l23/{bases/port_reception_statistics.py → trafficgen/rx_stats.py} +0 -21
  74. xoa_driver/internals/hli/ports/port_l23/{bases/port_l23.py → trafficgen/tgen.py} +31 -213
  75. xoa_driver/internals/hli/ports/port_l23/{bases/port_transmission_statistics.py → trafficgen/tx_stats.py} +2 -22
  76. xoa_driver/internals/hli/testers/l23_tester.py +1 -3
  77. xoa_driver/internals/utils/indices/_interfaces.py +18 -6
  78. xoa_driver/internals/utils/indices/index_manager.py +8 -2
  79. xoa_driver/internals/utils/managers/ports_manager.py +5 -2
  80. xoa_driver/misc.py +6 -6
  81. xoa_driver/modules.py +31 -47
  82. xoa_driver/ports.py +10 -29
  83. xoa_driver/internals/hli/modules/modules_l23/family_d.py +0 -75
  84. xoa_driver/internals/hli/modules/modules_l23/family_e.py +0 -85
  85. xoa_driver/internals/hli/modules/modules_l23/family_f.py +0 -145
  86. xoa_driver/internals/hli/modules/modules_l23/family_h.py +0 -40
  87. xoa_driver/internals/hli/modules/modules_l23/family_i.py +0 -25
  88. xoa_driver/internals/hli/modules/modules_l23/family_j.py +0 -25
  89. xoa_driver/internals/hli/modules/modules_l23/family_k.py +0 -39
  90. xoa_driver/internals/hli/modules/modules_l23/family_m.py +0 -25
  91. xoa_driver/internals/hli/modules/modules_l23/family_n.py +0 -40
  92. xoa_driver/internals/hli/ports/port_l23/bases/port_l23_genuine.py +0 -229
  93. xoa_driver/internals/hli/ports/port_l23/edun_l1.py +0 -181
  94. xoa_driver/internals/hli/ports/port_l23/family_combi.py +0 -37
  95. xoa_driver/internals/hli/ports/port_l23/family_d.py +0 -51
  96. xoa_driver/internals/hli/ports/port_l23/family_f.py +0 -151
  97. xoa_driver/internals/hli/ports/port_l23/family_h.py +0 -67
  98. xoa_driver/internals/hli/ports/port_l23/family_i.py +0 -84
  99. xoa_driver/internals/hli/ports/port_l23/family_j.py +0 -68
  100. xoa_driver/internals/hli/ports/port_l23/family_k.py +0 -73
  101. xoa_driver/internals/hli/ports/port_l23/family_l.py +0 -82
  102. xoa_driver/internals/hli/ports/port_l23/family_m.py +0 -29
  103. xoa_driver/internals/hli/ports/port_l23/pcs_pma_ghijkl.py +0 -369
  104. xoa_driver/internals/hli/ports/port_l23/pcs_pma_l.py +0 -78
  105. xoa_driver/internals/hli/ports/port_l23/port_l23ve.py +0 -101
  106. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/WHEEL +0 -0
  107. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/top_level.txt +0 -0
  108. /xoa_driver/internals/hli/modules/modules_l23/{family_l1.py → family_freya.py} +0 -0
  109. /xoa_driver/internals/hli/ports/port_l23/{bases → layer1}/__init__.py +0 -0
  110. /xoa_driver/internals/hli/ports/port_l23/{bases/port_capture.py → trafficgen/capture.py} +0 -0
@@ -62,7 +62,7 @@ from xoa_driver.internals.state_storage import ports_state
62
62
  from xoa_driver.internals.hli.indices.length_term import LengthTermIdx
63
63
  from xoa_driver.internals.hli.indices.match_term import MatchTermIdx
64
64
 
65
- from .port_capture import PortCapture
65
+ from .capture import PortCapture
66
66
 
67
67
  LengthTermIndices = idx_mgr.IndexManager[LengthTermIdx]
68
68
  MatchTermIndices = idx_mgr.IndexManager[MatchTermIdx]
@@ -138,7 +138,7 @@ class TxConfiguration:
138
138
  """
139
139
 
140
140
 
141
- class Rate:
141
+ class TxRate:
142
142
  """L23 port TX rate"""
143
143
 
144
144
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
@@ -161,6 +161,24 @@ class Rate:
161
161
  """
162
162
 
163
163
 
164
+ class MacControl:
165
+ """MAC control configuration
166
+ """
167
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
168
+
169
+ self.address = P_MACADDRESS(conn, module_id, port_id)
170
+ """MAC address configuration. This attribute allows the user to configure the MAC address for the port.
171
+
172
+ :type: P_MACADDRESS
173
+ """
174
+
175
+ self.autotrain = P_AUTOTRAIN(conn, module_id, port_id)
176
+ """Interval between MAC auto training packets. This attribute allows the user to configure the interval at which MAC auto training packets are sent. Auto training packets are used to optimize the performance of the MAC layer and to ensure proper communication between devices.
177
+
178
+ :type: P_AUTOTRAIN
179
+ """
180
+
181
+
164
182
  class Multicast:
165
183
  """L23 port multicast configuration"""
166
184
 
@@ -240,23 +258,26 @@ class IPv6:
240
258
  :type: P_PINGV6REPLY
241
259
  """
242
260
 
243
-
244
- class NetworkConfiguration: # will be extended in genuine ports
245
- """L23 port networking configuration"""
261
+ class NetConfig:
262
+ """L23 port network interface configuration"""
246
263
 
247
264
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
248
- self.mac_address = P_MACADDRESS(conn, module_id, port_id)
249
- """L23 port MAC address.
265
+ self.mac = MacControl(conn, module_id, port_id)
266
+ """L23 port MAC address and control.
250
267
 
251
- :type: P_MACADDRESS
268
+ :type: P_IPV6ADDRESS
252
269
  """
253
270
 
254
271
  self.ipv4 = IPv4(conn, module_id, port_id)
255
- """L23 port IPv4 address configuration.
272
+ """L23 port IPv4 configuration.
273
+
274
+ :type: IPv4
256
275
  """
257
276
 
258
277
  self.ipv6 = IPv6(conn, module_id, port_id)
259
- """L23 port IPv6 address configuration.
278
+ """L23 port IPv6 configuration.
279
+
280
+ :type: IPv6
260
281
  """
261
282
 
262
283
 
@@ -329,206 +350,3 @@ class Traffic:
329
350
 
330
351
  :type: P_TRAFFICERR
331
352
  """
332
-
333
-
334
- class BasePortL23(base_port.BasePort[ports_state.PortL23LocalState]):
335
- """L23 port layout which is relevant to all L23 ports."""
336
-
337
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
338
- super().__init__(conn, module_id, port_id)
339
- self.capabilities = P_CAPABILITIES(conn, module_id, port_id)
340
- """L23 port capabilities.
341
-
342
- :type: P_CAPABILITIES
343
- """
344
-
345
- self.capabilities_ext = P_CAPABILITIES_EXT(conn, module_id, port_id)
346
- """L23 port capabilities ext.
347
-
348
- :type: P_CAPABILITIES_EXT
349
- """
350
-
351
- self.pause = P_PAUSE(conn, module_id, port_id)
352
- """L23 port response to Ethernet PAUSE frames.
353
-
354
- :type: P_PAUSE
355
- """
356
-
357
- self.loop_back = P_LOOPBACK(conn, module_id, port_id)
358
- """L23 port loopback mode.
359
-
360
- :type: P_LOOPBACK
361
- """
362
-
363
- self.errors_count = P_ERRORS(conn, module_id, port_id)
364
- """L23 port errors.
365
-
366
- :type: P_ERRORS
367
- """
368
-
369
- self.interframe_gap = P_INTERFRAMEGAP(conn, module_id, port_id)
370
- """L23 port interframe gap.
371
-
372
- :type: P_INTERFRAMEGAP
373
- """
374
-
375
- self.max_header_length = P_MAXHEADERLENGTH(conn, module_id, port_id)
376
- """L23 port maximum header length.
377
-
378
- :type: P_MAXHEADERLENGTH
379
- """
380
-
381
- self.tpld_mode = P_TPLDMODE(conn, module_id, port_id)
382
- """L23 port test payload mode.
383
-
384
- :type: P_TPLDMODE
385
- """
386
-
387
- self.pfc_enable = P_PFCENABLE(conn, module_id, port_id)
388
- """L23 port Ethernet Priority Flow Control (PFC).
389
-
390
- :type: P_PFCENABLE
391
- """
392
-
393
- self.random_seed = P_RANDOMSEED(conn, module_id, port_id)
394
- """L23 port seed value.
395
-
396
- :type: P_RANDOMSEED
397
- """
398
-
399
- self.payload_mode = P_PAYLOADMODE(conn, module_id, port_id)
400
- """L23 port payload mode.
401
-
402
- :type: P_PAYLOADMODE
403
- """
404
-
405
- self.autotrain = P_AUTOTRAIN(conn, module_id, port_id)
406
- """L23 port interval between auto training packets.
407
-
408
- :type: P_AUTOTRAIN
409
- """
410
-
411
- self.gap_monitor = P_GAPMONITOR(conn, module_id, port_id)
412
- """L23 port gap monitor.
413
-
414
- :type: P_GAPMONITOR
415
- """
416
-
417
- self.checksum = P_CHECKSUM(conn, module_id, port_id)
418
- """L23 port extra payload integrity checksum.
419
-
420
- :type: P_CHECKSUM
421
- """
422
-
423
- self.arp_rx_table = P_ARPRXTABLE(conn, module_id, port_id)
424
- """L23 port ARP table.
425
-
426
- :type: P_ARPRXTABLE
427
- """
428
-
429
- self.ndp_rx_table = P_NDPRXTABLE(conn, module_id, port_id)
430
- """L23 port NDP table.
431
-
432
- :type: P_NDPRXTABLE
433
- """
434
-
435
- self.capturer = PortCapture(conn, module_id, port_id)
436
- """L23 port capturer configuration.
437
-
438
- :type: PortCapture
439
- """
440
-
441
- self.speed = Speed(conn, module_id, port_id)
442
- """L23 port speed configuration.
443
-
444
- :type: Speed
445
- """
446
-
447
- self.traffic = Traffic(conn, module_id, port_id)
448
- """L23 port traffic configuration.
449
-
450
- :type: Traffic
451
- """
452
-
453
- self.mix = Mix(conn, module_id, port_id)
454
- """L23 port IMIX configuration.
455
-
456
- :type: Mix
457
- """
458
-
459
- self.latency_config = LatencyConfiguration(conn, module_id, port_id)
460
- """L23 port latency configuration.
461
-
462
- self.latency_config = LatencyConfiguration(conn, module_id, port_id)
463
- :type:
464
- """
465
-
466
- self.rate = Rate(conn, module_id, port_id)
467
- """L23 port rate.
468
-
469
- :type: Rate
470
- """
471
-
472
- self.tx_config = TxConfiguration(conn, module_id, port_id)
473
- """L23 port TX configuration.
474
-
475
- :type: TxConfiguration
476
- """
477
-
478
- self.tx_single_pkt = TxSinglePacket(conn, module_id, port_id)
479
- """L23 port single-packet TX configuration.
480
-
481
- :type: TxSinglePacket
482
- """
483
-
484
- self.multicast = Multicast(conn, module_id, port_id)
485
- """L23 port multicast configuration.
486
-
487
- :type: Multicast
488
- """
489
-
490
- self.net_config = NetworkConfiguration(conn, module_id, port_id)
491
- """L23 port network configuration.
492
-
493
- :type: NetworkConfiguration
494
- """
495
-
496
- self.local_states = ports_state.PortL23LocalState()
497
- """L23 port local states.
498
-
499
- :type: PortL23LocalState
500
- """
501
-
502
- self.length_terms: LengthTermIndices = idx_mgr.IndexManager(
503
- conn,
504
- LengthTermIdx,
505
- module_id,
506
- port_id
507
- )
508
- """L23 port's length term index manager.
509
-
510
- :type: LengthTermIndices
511
- """
512
-
513
- self.match_terms: MatchTermIndices = idx_mgr.IndexManager(
514
- conn,
515
- MatchTermIdx,
516
- module_id,
517
- port_id
518
- )
519
- """L23 port's match term index manager.
520
-
521
- :type: MatchTermIndices
522
- """
523
-
524
- self.used_tpld_ids = P_USED_TPLDID(conn, module_id, port_id)
525
- """TG port's used TPLD IDs.
526
-
527
- :type: P_USED_TPLDID
528
- """
529
-
530
- on_speed_change = functools.partialmethod(utils.on_event, P_SPEED)
531
- """Register a callback to the event that the port's speed changes."""
532
-
533
- on_traffic_change = functools.partialmethod(utils.on_event, P_TRAFFIC)
534
- """Register a callback to the event that the port's traffic status changes."""
@@ -14,13 +14,11 @@ from xoa_driver.internals.commands import (
14
14
  PT_TOTALEXT,
15
15
  PT_NOTPLDEXT,
16
16
  PT_STREAMEXT,
17
- P_MACSEC_TX_STATS,
18
- P_MACSEC_TX_CLEAR,
19
17
  )
20
18
 
21
19
  # region All Ports
22
20
 
23
- class PortTransmissionStatistics:
21
+ class PortTxStats:
24
22
  """L23 port TX statistics"""
25
23
 
26
24
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
@@ -101,31 +99,13 @@ class PortTransmissionStatistics:
101
99
 
102
100
  # region Genuine Ports
103
101
 
104
- class MACSecTxStats:
105
- """MACSec TX SC Statistics"""
106
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
107
-
108
- self.total = P_MACSEC_TX_STATS(conn, module_id, port_id)
109
- """Port's total MACsec TX statistics
110
-
111
- :type: P_MACSEC_TX_STATS
112
- """
113
102
 
114
- self.clear = P_MACSEC_TX_CLEAR(conn, module_id, port_id)
115
- """Clear Port's MACsec TX statistics
116
103
 
117
- :type: P_MACSEC_TX_CLEAR
118
- """
119
-
120
-
121
- class GenuinePortTransmissionStatistics(PortTransmissionStatistics):
104
+ class GenuinePortTransmissionStatistics(PortTxStats):
122
105
  """L23 port RX statistics."""
123
106
 
124
107
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
125
108
  super().__init__(conn, module_id, port_id)
126
109
 
127
- self.macsec = MACSecTxStats(conn, module_id, port_id)
128
- """L23 port's MACsec TX statistics.
129
- """
130
110
 
131
111
  # endregion
@@ -57,9 +57,7 @@ def get_module_type(revision: str) -> Type:
57
57
 
58
58
  class L23Tester(BaseTester["testers_state.GenuineTesterLocalState"]):
59
59
  """
60
- This is a conceptual class of Xena Valkyrie Tester.
61
- It is essentially an extended :class:`BaseTester`.
62
-
60
+ Create an instanace to connect to a Xena chassis.
63
61
 
64
62
  :param host: tester's address/hostname
65
63
  :type host: str
@@ -1,18 +1,19 @@
1
1
  from typing import (
2
2
  Protocol,
3
3
  List,
4
- Type,
4
+ TypeVar,
5
+ Self,
5
6
  TYPE_CHECKING,
6
7
  )
7
8
 
8
9
  if TYPE_CHECKING:
9
10
  from xoa_driver.internals.core import interfaces as itf
10
- from .. import kind
11
- from . import observer
11
+ from .. import kind as kind_module
12
+ from . import observer as idx_obs
12
13
 
13
14
 
14
15
  class IIndexType(Protocol):
15
- def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "observer.IndicesObserver") -> None: ... # noqa: E704
16
+ def __init__(self, conn: "itf.IConnection", kind: "kind_module.IndicesKind", observer: "idx_obs.IndicesObserver") -> None: ... # noqa: E704
16
17
 
17
18
  async def delete(self) -> None: ... # noqa: E704
18
19
 
@@ -20,7 +21,18 @@ class IIndexType(Protocol):
20
21
  def idx(self) -> int: ... # noqa: E704
21
22
 
22
23
  @classmethod
23
- async def _fetch(cls, conn, module_id, port_id) -> List[int]: ... # noqa: E704
24
+ async def _fetch(
25
+ cls,
26
+ conn: "itf.IConnection",
27
+ module_id: int,
28
+ port_id: int) -> List[int]: ... # noqa: E704
24
29
 
25
30
  @classmethod
26
- async def _new(cls, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "observer.IndicesObserver") -> Type: ... # noqa: E704
31
+ async def _new(
32
+ cls,
33
+ conn: "itf.IConnection",
34
+ kind: "kind_module.IndicesKind",
35
+ observer: "idx_obs.IndicesObserver"
36
+ ) -> Self: ... # noqa: E704
37
+
38
+ IT = TypeVar("IT", bound=IIndexType)
@@ -60,7 +60,13 @@ class IndexManager(Generic[IT]):
60
60
  return self._indices[key]
61
61
 
62
62
  def obtain_multiple(self, *keys: int):
63
- """Obtain multiple resources as a tuple of indices"""
63
+ """Obtain multiple index objects
64
+
65
+ :param keys: Indices of the desired index objects
66
+ :type keys: int
67
+ :return: Tuple of index objects corresponding to the provided keys
68
+ :rtype: tuple[IT, ...]
69
+ """
64
70
  return tuple(self._indices[k] for k in keys)
65
71
 
66
72
  def __detect_empty_idx_slot(self) -> int:
@@ -74,7 +80,7 @@ class IndexManager(Generic[IT]):
74
80
  ]
75
81
  return min(empties) if empties else len(existing_indices)
76
82
 
77
- def __remove_from_slot(self, index_inst: Type) -> None:
83
+ def __remove_from_slot(self, index_inst: IT) -> None:
78
84
  # throws ValueError if element is not exists in list of indices
79
85
  self._indices.remove(index_inst)
80
86
 
@@ -111,6 +111,9 @@ class PortsCombiManager(PortBaseManager[PT]):
111
111
  for port_id in range(self._ports_count)
112
112
  )
113
113
  ports = await asyncio.gather(*coros)
114
- self._items = OrderedDict(
115
- (port.kind.port_id, port) for port in ports
114
+ self._items = cast(
115
+ OrderedDict[int, PT],
116
+ OrderedDict(
117
+ (port.kind.port_id, port) for port in ports
118
+ )
116
119
  )
xoa_driver/misc.py CHANGED
@@ -5,9 +5,9 @@
5
5
  from .internals.core.token import Token
6
6
  from .internals.core.transporter.protocol.payload.types import Hex
7
7
  from .internals.commands.subtypes import (
8
- ArpChunk,
9
- NdpChunk,
10
- DhcpChunk,
8
+ ArpEntry,
9
+ NdpEntry,
10
+ DhcpEntry,
11
11
  GroupAddressElem,
12
12
  VlanTag,
13
13
  QueueStatsElem,
@@ -31,9 +31,9 @@ from xoa_driver.internals.hli.indices.macsecscs.genuine_macsecsc import GenuineM
31
31
  __all__ = (
32
32
  "Token",
33
33
  "Hex",
34
- "ArpChunk",
35
- "NdpChunk",
36
- "DhcpChunk",
34
+ "ArpEntry",
35
+ "NdpEntry",
36
+ "DhcpEntry",
37
37
  "GroupAddressElem",
38
38
  "VlanTag",
39
39
  "QueueStatsElem",
xoa_driver/modules.py CHANGED
@@ -1,21 +1,26 @@
1
1
  #: All available test module types.
2
2
  """Xena test module types."""
3
-
3
+ from typing import Union
4
4
  from .internals.hli.modules.modules_l23.module_l23_base import ModuleL23
5
- from .internals.hli.modules.modules_l23.family_d import (
5
+ from .internals.hli.modules.module_l23ve import ModuleL23VE
6
+ from .internals.hli.modules.module_chimera import (
7
+ ModuleChimera,
8
+ MChi100G5S2P,
9
+ MChi100G5S2P_b,
10
+ MChi40G2S2P,
11
+ )
12
+ from .internals.hli.modules.module_l47 import ModuleL47
13
+ from .internals.hli.modules.module_l47ve import ModuleL47VE
14
+ from .internals.hli.modules.modules_l23.family_odin import (
6
15
  MOdin1G3S2PT,
7
16
  MOdin1G3S6P,
8
17
  MOdin1G3S6P_b,
9
18
  MOdin1G3S6PE,
10
- )
11
- from .internals.hli.modules.modules_l23.family_e import (
12
19
  MOdin5G4S6PCU,
13
20
  MOdin10G3S2PCU,
14
21
  MOdin10G3S6PCU,
15
22
  MOdin10G5S6PCU,
16
23
  MOdin10G5S6PCU_b,
17
- )
18
- from .internals.hli.modules.modules_l23.family_f import (
19
24
  MOdin10G1S2P,
20
25
  MOdin10G1S2P_b,
21
26
  MOdin10G1S2P_c,
@@ -25,31 +30,32 @@ from .internals.hli.modules.modules_l23.family_f import (
25
30
  MOdin10G1S6P_b,
26
31
  MOdin10G1S12P,
27
32
  MOdin10G6S6P_a,
33
+ MOdin100G3S1P,
34
+ MOdin1G3S6PT1RJ45,
35
+ MOdin10G4S2PCombi,
36
+ MOdin10G4S2PCombi_b,
37
+ MOdin40G2S2P,
38
+ MOdin40G2S2PB,
28
39
  )
29
- from .internals.hli.modules.modules_l23.family_g import (
40
+ from .internals.hli.modules.modules_l23.family_loki import (
30
41
  MLoki100G3S1P,
31
42
  MLoki100G3S1P_b,
32
43
  MLoki100G3S1PSE,
33
44
  MLoki100G3S1PB,
34
45
  MLoki100G3S1PB_b,
35
46
  MLoki100G5S4P_a,
36
- )
37
- from .internals.hli.modules.modules_l23.family_h import (
38
47
  MLoki100G5S1P,
39
- MOdin100G3S1P,
48
+ MLoki100G5S2P,
40
49
  )
41
- from .internals.hli.modules.modules_l23.family_i import MLoki100G5S2P
42
- from .internals.hli.modules.modules_l23.family_j import MThor100G5S4P
43
- from .internals.hli.modules.modules_l23.family_k import (
50
+ from .internals.hli.modules.modules_l23.family_thor import (
51
+ MThor100G5S4P,
44
52
  MThor400G7S1P,
45
53
  MThor400G7S1PLE,
46
- )
47
- from .internals.hli.modules.modules_l23.family_l import (
48
54
  MThor400G7S1P_b,
49
55
  MThor400G7S1P_c,
50
56
  MThor400G7S1P_d,
51
57
  )
52
- from .internals.hli.modules.modules_l23.family_l1 import (
58
+ from .internals.hli.modules.modules_l23.family_freya import (
53
59
  MFreya800G1S1P_a,
54
60
  MFreya800G1S1P_b,
55
61
  MFreya800G1S1POSFP_a,
@@ -99,33 +105,11 @@ from .internals.hli.modules.modules_l23.family_l1 import (
99
105
  MFreya800G4S1POSFP_e_g2,
100
106
  MFreya800G4S1POSFP_f_g2,
101
107
  )
102
- from .internals.hli.modules.modules_l23.family_m import MOdin1G3S6PT1RJ45
103
- from .internals.hli.modules.modules_l23.family_n import (
104
- MOdin40G2S2P,
105
- MOdin40G2S2PB,
106
- )
107
- from .internals.hli.modules.modules_l23.family_combi import (
108
- MOdin10G4S2PCombi,
109
- MOdin10G4S2PCombi_b,
110
- )
111
- from .internals.hli.modules.module_l23ve import ModuleL23VE
112
- from .internals.hli.modules.module_chimera import (
113
- ModuleChimera,
114
- MChi100G5S2P,
115
- MChi100G5S2P_b,
116
- MChi40G2S2P,
117
- )
118
- from .internals.hli.modules.module_l47 import ModuleL47
119
- from .internals.hli.modules.module_l47ve import ModuleL47VE
120
-
121
108
  from .internals.hli.modules.modules_l23.family_edun import (
122
109
  MEdun800G3S1PSMPX_a,
123
110
  MEdun1600G4S1POSFP_a
124
111
  )
125
-
126
- import typing
127
-
128
- Z10OdinModule = typing.Union[
112
+ Z10OdinModule = Union[
129
113
  MOdin1G3S2PT,
130
114
  MOdin1G3S6P,
131
115
  MOdin1G3S6P_b,
@@ -152,7 +136,7 @@ Z10OdinModule = typing.Union[
152
136
  MOdin100G3S1P,
153
137
  ]
154
138
 
155
- Z100LokiModule = typing.Union[
139
+ Z100LokiModule = Union[
156
140
  MLoki100G3S1P,
157
141
  MLoki100G3S1P_b,
158
142
  MLoki100G3S1PSE,
@@ -163,7 +147,7 @@ Z100LokiModule = typing.Union[
163
147
  MLoki100G5S4P_a,
164
148
  ]
165
149
 
166
- Z400ThorModule = typing.Union[
150
+ Z400ThorModule = Union[
167
151
  MThor100G5S4P,
168
152
  MThor400G7S1P,
169
153
  MThor400G7S1PLE,
@@ -172,7 +156,7 @@ Z400ThorModule = typing.Union[
172
156
  MThor400G7S1P_d,
173
157
  ]
174
158
 
175
- Z800FreyaModule = typing.Union[
159
+ Z800FreyaModule = Union[
176
160
  MFreya800G1S1P_a,
177
161
  MFreya800G1S1P_b,
178
162
  MFreya800G1S1POSFP_a,
@@ -223,25 +207,25 @@ Z800FreyaModule = typing.Union[
223
207
  MFreya800G4S1POSFP_f_g2,
224
208
  ]
225
209
 
226
- Z1600EdunModule = typing.Union[
210
+ Z1600EdunModule = Union[
227
211
  MEdun800G3S1PSMPX_a,
228
212
  MEdun1600G4S1POSFP_a
229
213
  ]
230
214
 
231
- E100ChimeraModule = typing.Union[
215
+ E100ChimeraModule = Union[
232
216
  ModuleChimera,
233
217
  MChi100G5S2P,
234
218
  MChi100G5S2P_b,
235
219
  MChi40G2S2P,
236
220
  ]
237
221
 
238
- LegacyModule = typing.Union[
222
+ LegacyModule = Union[
239
223
  ModuleL23VE,
240
224
  ModuleL47,
241
225
  ModuleL47VE,
242
226
  ]
243
227
 
244
- GenericL23Module = typing.Union[
228
+ GenericL23Module = Union[
245
229
  "MOdin1G3S2PT",
246
230
  "MOdin1G3S6P",
247
231
  "MOdin1G3S6P_b",
@@ -336,7 +320,7 @@ GenericL23Module = typing.Union[
336
320
  "MEdun1600G4S1POSFP_a",
337
321
  ]
338
322
 
339
- GenericAnyModule = typing.Union[
323
+ GenericAnyModule = Union[
340
324
  GenericL23Module,
341
325
 
342
326
  "ModuleL23VE",