Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions xoa_driver/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@
StreamOption,
DhcpState,
DhcpVlanState,
VlanType
VlanType,
ChassisModelNumber,
ChassisModelName,
ModuleModelName
)

__all__ = (
Expand Down Expand Up @@ -341,5 +344,8 @@
"StreamOption",
"DhcpState",
"DhcpVlanState",
"VlanType"
"VlanType",
"ChassisModelNumber",
"ChassisModelName",
"ModuleModelName"
)
54 changes: 53 additions & 1 deletion xoa_driver/internals/commands/c_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
TimeKeeperLicenseType,
TimeKeeperLicenseError,
TimeKeeperServiceStatus,
TimeKeeperServiceAction
TimeKeeperServiceAction,
ChassisModelNumber,
ChassisModelName
)


Expand Down Expand Up @@ -1905,3 +1907,53 @@ def get(self) -> Token[GetDataAttr]:
"""

return Token(self._connection, build_get_request(self))

@register_command
@dataclass
class C_MODEL_NAME:
"""
Get the Xena chassis model name.
"""

code: typing.ClassVar[int] = 457
pushed: typing.ClassVar[bool] = False

_connection: 'interfaces.IConnection'

class GetDataAttr(ResponseBodyStruct):
name: ChassisModelName = field(XmpInt())
"""ChassisModelName, the model of the Xena tester"""

def get(self) -> Token[GetDataAttr]:
"""Get the Xena chassis model name.

:return: the model name of the Xena tester
:rtype: C_MODEL_NAME.GetDataAttr
"""

return Token(self._connection, build_get_request(self))

@register_command
@dataclass
class C_MODEL_NUMBER:
"""
Get the Xena chassis model number.
"""

code: typing.ClassVar[int] = 458
pushed: typing.ClassVar[bool] = False

_connection: 'interfaces.IConnection'

class GetDataAttr(ResponseBodyStruct):
number: ChassisModelNumber = field(XmpInt())
"""ChassisModelNumber, the model of the Xena tester"""

def get(self) -> Token[GetDataAttr]:
"""Get the Xena chassis model number.

:return: the model number of the Xena tester
:rtype: C_MODEL_NUMBER.GetDataAttr
"""

return Token(self._connection, build_get_request(self))
90 changes: 90 additions & 0 deletions xoa_driver/internals/commands/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,4 +2666,94 @@ class VlanType(IntEnum):
TYPE_C = 0
TYPE_S = 1

class ChassisModelNumber(IntEnum):
NA = 0
XB1 = 1
XB2 = 2
XB3 = 3
XB4 = 4
XB5 = 5
XB6 = 6
XB7 = 7
XB8 = 8
XB9 = 9
XB10 = 10
XB10_5 = 11
XB11 = 12
XB12 = 13
XB13 = 14
XB14 = 15
XB15 = 16
XB16 = 17
XB17 = 18
XB18 = 19
XB19 = 20
XB20 = 21
XB21 = 22
XB22 = 23
XB23 = 24
XB33 = 25
XC1 = 26
XC2 = 27
XC3 = 28
XC4 = 29
XC5 = 30
XC6 = 31
XC7 = 32
XC8 = 33
XC9 = 34
XC10 = 35
XC11 = 36
XC12 = 37
XC13 = 38
XC14 = 39
XC15 = 40
XC16 = 41
XC17 = 42
XC18 = 43
XC19 = 44
XC20 = 45
XC21 = 46
XC22 = 47
XC23 = 48
XC24 = 49
XC25 = 50
XC26 = 51

class ChassisModelName(IntEnum):
NA = 0
B720 = 1
B720D = 2
B2400 = 3
Z_01_T_C_ODIN = 4
Z_100_Q_C_LOKI = 5
Z_10_S_C_ODIN = 6
Z_10_C_C_ODIN = 7
Z_10_R_C_ODIN = 8
Z_10_S_X_C_ODIN = 9
Z_01_S_C_ODIN = 10
Z_01_S_X_C_ODIN = 11
Z_400_Q_C_THOR = 12
Z_400_Q_LE_C_THOR = 13
Z_800_Q_C_FREYA = 14
Z_800_O_C_FREYA = 15
Z_800_Q_A_C_FREYA = 16
Z_800_O_A_C_FREYA = 17
E_100_Q_C_CHIMERA = 18

class ModuleModelName(IntEnum):
NA = 0
Z_01_T_ODIN = 1
Z_100_Q_LOKI = 2
Z_10_S_ODIN = 3
Z_10_R_ODIN = 4
Z_10_S_X_ODIN = 5
Z_01_S_ODIN = 6
Z_01_S_X_ODIN = 7
Z_400_Q_THOR = 8
Z_400_Q_LE_THOR = 9
Z_800_Q_FREYA = 10
Z_800_O_FREYA = 11
E_100_Q_CHIMERA = 12

# endregion
29 changes: 28 additions & 1 deletion xoa_driver/internals/commands/m_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
ImpairmentLatencyMode,
PPMSweepStatus,
PPMSweepMode,
ModuleModelName
)


Expand Down Expand Up @@ -1780,4 +1781,30 @@ def get(self) -> Token[GetDataAttr]:
:rtype: M_HEALTH.GetDataAttr
"""

return Token(self._connection, build_get_request(self, module=self._module))
return Token(self._connection, build_get_request(self, module=self._module))

@register_command
@dataclass
class M_MODEL_NAME:
"""
Get the model name of the module.
"""

code: typing.ClassVar[int] = 459
pushed: typing.ClassVar[bool] = False

_connection: 'interfaces.IConnection'
_module: int

class GetDataAttr(ResponseBodyStruct):
name: ModuleModelName = field(XmpInt())
"""ModuleModelName, model name of the Xena module."""

def get(self) -> Token[GetDataAttr]:
"""Get the Xena chassis model name.

:return: the model name of the Xena tester
:rtype: C_MODEL_NAME.GetDataAttr
"""

return Token(self._connection, build_get_request(self, module=self._module))