8.3.1.1. Chassis

This module contains the chassis classes that deal with basic information and configuration of the chassis itself (rather than its modules and test ports), as well as overall control of the scripting session. The chassis command names all have the form C_<xxx> and use neither a module index nor a port index.


class C_BUILDSTRING[source]

Bases: object

Identify the hostname of the PC that builds the xenaserver. It uniquely identifies the build of a xenaserver.

class GetDataAttr[source]

Bases: ResponseBodyStruct

build_string

string, identify the hostname of the PC that builds the xenaserver

get()[source]

Get the build string of the xenaserver.

Returns:

build string that identifies the hostname of the PC that builds the xenaserver

Return type:

C_BUILDSTRING.GetDataAttr

class C_CAPABILITIES[source]

Bases: object

A series of integer values specifying various internal limits (aka. capabilities) of the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

can_custom_defaults

integer, can server handle custom default values for XMP parameters?

can_latency_f2f

integer, can server handle first-to-first latency mode?

can_par_module_upgrade

integer, can server handle parallel module upgrades?

can_read_log_files

integer, can clients read debug log files from server?

can_read_temperatures

integer, can the server read out chassis and/or CPU temperatures? (C_TEMPERATURE ?)

can_stream_based_arp

integer, does server support stream-based ARP/NDP?

can_sync_traffic_start

integer, does server support synchronous traffic start?

can_upgrade_timekeeper

integer, is server capable of upgrading the TimeKeeper application?

max_chain_depth

integer, max chain index.

max_comment_len

integer, max ASCII characters in chassis comment.

max_ext_rate

integer, maximum rate for external traffic.

max_module_count

integer, maximum number of L23 modules.

max_name_len

integer, max ASCII characters in chassis name.

max_owner_name_length

integer, max number of ASCII characters in C_OWNER name

max_password_len

integer, max ASCII characters in chassis password.

max_protocol_count

integer, max protocol segments in a packet.

max_session_count

integer, max number of management and scripting sessions.

version

integer, chassis software build number.

get()[source]

Get the internal limits (capabilities) of the tester.

Returns:

A series of integer values specifying various internal limits - chassis software build number - max ASCII characters in chassis name - max ASCII characters in chassis comment - max ASCII characters in chassis password - maximum rate for external traffic - max number of management and scripting sessions - max chain index - maximum number of L23 modules - max protocol segments in a packet - does server support stream-based ARP/NDP? - does server support synchronous traffic start? - can clients read debug log files from server? - can server handle parallel module upgrades? - is server capable of upgrading the TimeKeeper application? - can server handle custom default values for XMP parameters? - can server handle first-to-first latency mode? - max number of ASCII characters in C_OWNER name - can the server read out chassis and/or CPU temperatures?

Return type:

C_CAPABILITIES.GetDataAttr

class C_COMMENT[source]

Bases: object

The description of the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

comment

string, containing the description of the chassis.

class SetDataAttr[source]

Bases: RequestBodyStruct

comment

string, containing the description of the chassis.

get()[source]

Get the description of the tester.

Returns:

the description of the tester

Return type:

C_COMMENT.GetDataAttr

set(comment)[source]

Set the description of the tester.

Parameters:

comment (str) – the description of the tester

class C_DEBUGCMD[source]

Bases: object

Chassis debug command

class GetDataAttr[source]

Bases: ResponseBodyStruct

class SetDataAttr[source]

Bases: RequestBodyStruct

class C_DEBUGLOGS[source]

Bases: object

Allows to dump all the logs of a chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

data

list of hex bytes, all the logs of a chassis

message_length

integer, length of the message.

get()[source]

Get chassis logs.

Returns:

length of the message and all the logs of the chassis

Return type:

C_DEBUGLOGS.GetDataAttr

class C_DHCP[source]

Bases: object

Controls whether the chassis will use DHCP to get the management IP address.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, whether DHCP is enabled or disabled.

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, whether DHCP is enabled or disabled.

get()[source]

Get whether DHCP is enabled for getting management IP.

Returns:

whether DHCP is enabled.

Return type:

C_DHCP.GetDataAttr

set(on_off)[source]

Set DHCP for getting management IP.

Parameters:

on_off (OnOff) – whether DHCP is enabled or disabled.

set_off()

Disable DHCP for for getting management IP.

set_on()

Enable on to DHCP for for getting management IP.

class C_DOWN[source]

Bases: object

Shuts down the chassis, and either restarts it in a clean state or leaves it powered off.

class SetDataAttr[source]

Bases: RequestBodyStruct

magic

integer, must be the special value -1480937026.

operation

coded byte, what to do after shutting chassis down.

set(operation)[source]

Shuts down the chassis, and either restarts it in a clean state or leaves it powered off.

Parameters:

operation (ChassisShutdownAction) – what to do after shutting chassis down.

set_poweroff()

Shuts down the tester and leaves it powered off.

set_restart()

Shuts down the tester and then restarts it.

class C_FILEDATA[source]

Bases: object

Uploads a fragment of a file to the chassis.

class SetDataAttr[source]

Bases: RequestBodyStruct

data_bytes

list of hex bytes, the data content of a section of the file.

offset

integer, the position within the file.

set(offset, data_bytes)[source]

Uploads a fragment of a file to the chassis.

Parameters:
  • offset (int) – the position within the file

  • data_bytes (str) – the data content of a section of the file

class C_FILEFINISH[source]

Bases: object

Completes upload of a file to the chassis. After validation it will replace any existing file with the same name.

class SetDataAttr[source]

Bases: RequestBodyStruct

magic

integer, must be the special value -1480937026.

set()[source]

Completes upload of a file to the chassis. After validation it will replace any existing file with the same name.

class C_FILESTART[source]

Bases: object

Initiates upload of a file to the chassis. This command should be followed by a sequence og C_FILEDATA parameters to provide the file content, and finally a C_FILEFINISH to commit the new file to the chassis.

class SetDataAttr[source]

Bases: RequestBodyStruct

checksum

four hex bytes, little-endian integer, the checksum of the file.

file_type

four hex bytes, little-endian integer, the file type, should be 1.

mode

four hex bytes, little-endian integer, the Linux permissions of the file.

name

string, the name and location of the file, as a full path.

size

four hex bytes, little-endian integer, the number of bytes in the file.

time

four hex bytes, little-endian integer, the Linux date+time of the file.

set(file_type, size, time, mode, checksum, name)[source]

Initiates upload of a file to the chassis.

Parameters:
  • file_type (str) – the file type, should be 1

  • size (str) – the number of bytes in the file

  • time (str) – he Linux date+time of the file

  • mode (str) – the Linux permissions of the file

  • checksum (str) – the checksum of the file

  • name (str) – the name and location of the file, as a full path

class C_FLASH[source]

Bases: object

Make all the test port LEDs flash on and off with a 1-second interval. This is helpful if you have multiple chassis mounted side by side and you need to identify a specific one.

NOTICE: Require Tester to be reserved before change value.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, determines whether to blink all test port LEDs.

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, determines whether to blink all test port LEDs.

get()[source]

Get the status of test port LEDs.

Returns:

the blinking status of test port LEDs

Return type:

C_FLASH.GetDataAttr

set(on_off)[source]

Set test ports LEDs blinking status.

Parameters:

on_off (OnOff) – determines whether to blink all test port LEDs.

set_off()

Disable flashing test port LEDs.

set_on()

Enable flashing test port LEDs.

class C_HEALTH[source]

Bases: object

Gets the chassis system health information.

class GetDataAttr[source]

Bases: ResponseBodyStruct

info

Chassis health information json string

get()[source]

Gets the Chassis health information.

Returns:

Chassis health information json string

Return type:

C_HEALTH.GetDataAttr

class C_HOSTNAME[source]

Bases: object

Get or set the chassis hostname used when DHCP is enabled.

class GetDataAttr[source]

Bases: ResponseBodyStruct

hostname

string, hostname for chassis (default value “xena-“)

class SetDataAttr[source]

Bases: RequestBodyStruct

hostname

string, hostname for chassis (default value “xena-“)

get()[source]

Get the chassis hostname used when DHCP is enabled.

Returns:

the chassis hostname

Return type:

C_HOSTNAME.GetDataAttr

set(hostname)[source]

Set the chassis hostname.

Parameters:

hostname (str) – the chassis hostname

class C_INDICES[source]

Bases: object

Gets the session indices for all current sessions on the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

session_ids

list of integers, the session indices for all current sessions on the chassis.

get()[source]

Gets the session indices for all current sessions on the chassis.

Returns:

the session indices for all current sessions on the chassis

Return type:

C_INDICES.GetDataAttr

class C_IPADDRESS[source]

Bases: object

The network configuration parameters of the chassis management port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

gateway

address, the gateway of the local network segment.

ipv4_address

address, the static IP address of the chassis.

subnet_mask

address, the subnet mask of the local network segment.

class SetDataAttr[source]

Bases: RequestBodyStruct

gateway

address, the gateway of the local network segment.

ipv4_address

address, the static IP address of the chassis.

subnet_mask

address, the subnet mask of the local network segment.

get()[source]

Get the IP configuration information of the tester.

Returns:

  • the static IP address of the chassis

  • the subnet mask of the local network segment

  • the gateway of the local network segment

Return type:

C_IPADDRESS.GetDataAttr

set(ipv4_address, subnet_mask, gateway)[source]

the IP configuration information of the tester.

Parameters:
class C_KEEPALIVE[source]

Bases: object

You can request this value from the chassis, simply to let it (as well as and any routers and proxies between you) know that the connection is still valid.

class GetDataAttr[source]

Bases: ResponseBodyStruct

tick_count

integer, an increasing number from the chassis.

get()[source]

Get the tick count value.

Returns:

an increasing number from the chassis.

Return type:

C_KEEPALIVE.GetDataAttr

class C_LOGOFF[source]

Bases: object

Terminates the current scripting session. Courtesy only, the chassis will also handle disconnection at the TCP/IP level

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Log off from the tester and close the management session.

class C_LOGON[source]

Bases: object

You log on to the chassis by setting the value of this command to the correct password for the chassis. All other commands will fail if the session has not been logged on.

class SetDataAttr[source]

Bases: RequestBodyStruct

password

string, containing the password value.

set(password)[source]

Set the password for creating a tester management session and logging on to the tester.

Parameters:

password (str) – password for creating a tester management session and logging on to the tester.

class C_MACADDRESS[source]

Bases: object

Get the MAC address for the chassis management port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mac_address

six hex bytes, indicating the MAC address

get()[source]

Get the MAC address for the chassis management port.

Returns:

the MAC address for the chassis management port

Return type:

C_MACADDRESS.GetDataAttr

class C_MODEL[source]

Bases: object

Gets the specific model of this Xena chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

model

string, the Xena model designation for the chassis.

get()[source]

Get the model of this Xena tester.

Returns:

the model of the Xena tester

Return type:

C_MODEL.GetDataAttr

class C_MODEL_NAME[source]

Bases: object

Get the Xena chassis model name.

class GetDataAttr[source]

Bases: ResponseBodyStruct

name

ChassisModelName, the model of the Xena tester

get()[source]

Get the Xena chassis model name.

Returns:

the model name of the Xena tester

Return type:

C_MODEL_NAME.GetDataAttr

class C_MODEL_NUMBER[source]

Bases: object

Get the Xena chassis model number.

class GetDataAttr[source]

Bases: ResponseBodyStruct

number

ChassisModelNumber, the model of the Xena tester

get()[source]

Get the Xena chassis model number.

Returns:

the model number of the Xena tester

Return type:

C_MODEL_NUMBER.GetDataAttr

class C_MULTIUSER[source]

Bases: object

Enable or disable the ability to control one resource from several different TCP connections.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, enable or disable the ability to control one resource from several different TCP connections

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, enable or disable the ability to control one resource from several different TCP connections

get()[source]

Get the status of the ability to control one resource from several different TCP connections.

Returns:

the status of the ability to control one resource from several different TCP connections

Return type:

C_MULTIUSER.GetDataAttr

set(on_off)[source]

Enable or disable the ability to control one resource from several different TCP connections.

Parameters:

on_off (OnOff) – enable or disable the ability to control one resource from several different TCP connections

set_off()

Disable the ability to control one resource from several different TCP.

set_on()

Enable the ability to control one resource from several different TCP.

class C_NAME[source]

Bases: object

The name of the chassis, as it appears at various places in the user interface. The name is also used to distinguish the various chassis contained within a testbed and in files containing the configuration for an entire test case.

class GetDataAttr[source]

Bases: ResponseBodyStruct

chassis_name

string, containing the name of the chassis.

class SetDataAttr[source]

Bases: RequestBodyStruct

chassis_name

string, containing the name of the chassis.

get()[source]

Get the name of the tester

Returns:

the name of the tester

Return type:

C_NAME.GetDataAttr

set(chassis_name)[source]

Set the name of the tester

Parameters:

chassis_name (str) – the name of the tester

class C_OWNER[source]

Bases: object

Identify the owner of the management session. The name can be any short quoted string up to eight characters long. This name will be used when reserving ports prior to updating their configuration. There is no authentication of the users, and the chassis does not have any actual user accounts. Multiple concurrent connections may use the same owner name, but only one connection can have any particular resource reserved at any given time. Until an owner is specified the chassis configuration can only be read. Once specified, the session can reserve ports for that owner, and will inherit any existing reservations for that owner retained at the chassis. Maximum 32 ASCII characters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

username

string, containing the name of the owner of this session.

class SetDataAttr[source]

Bases: RequestBodyStruct

username

string, containing the name of the owner of this session.

get()[source]

Get the username of this chassis management session.

Returns:

The username of this chassis management session.

Return type:

C_OWNER.GetDataAttr

set(username)[source]

Set the username of this chassis management session.

Parameters:

username (str) – the username of this chassis management session.

class C_PASSWORD[source]

Bases: object

The password of the chassis, which must be provided when logging on to the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

password

string, containing the password for the chassis.

class SetDataAttr[source]

Bases: RequestBodyStruct

password

string, containing the password for the chassis.

get()[source]

Get the password of the tester.

Returns:

the password of the tester

Return type:

C_PASSWORD.GetDataAttr

set(password)[source]

Set the password of the tester.

Parameters:

password (str) – the password of the tester

class C_PORTCOUNTS[source]

Bases: object

Gets the number of ports in each module slot of the chassis, and indirectly the number of slots and modules.

Note

CFP modules return the number 8 which is the maximum number of 10G ports, but the actual number of ports can be configured dynamically using the M_CFPCONFIGEXT` command.

class GetDataAttr[source]

Bases: ResponseBodyStruct

port_counts

list of bytes, the number of ports, typically 2 or 6, or 0 for an empty slot.

get()[source]

Get the number of ports in each module slot of the tester, and indirectly the number of slots and modules.

Returns:

the number of ports of each module slot of the tester, 0 for an empty slot.

Return type:

C_PORTCOUNTS.GetDataAttr

class C_PORTERRORS[source]

Bases: object

Gets the number of errors detected across all streams on each port of each test module of the chassis. The counts are ordered in sequence with those of the module in the lowest numbered chassis slot first. Empty slots are skipped so that a chassis with a 6-port and a 2-port test module will return eight counts regardless of which slots they are in.

Note

CFP modules return eight error counts since they can be configured as up to eight 10G ports. When in 100G and 40G mode only the first one or two counts are significant.

Note

FCS errors are included, which leads to double-counting for streams detecting lost packets using the test payload mechanism.

class GetDataAttr[source]

Bases: ResponseBodyStruct

error_count

list of long integers, the total number of errors across all streams, and including FCS errors.

get()[source]

Gets the number of errors detected across all streams on each port of each test module of the chassis. The counts are ordered in sequence with those of the module in the lowest numbered chassis slot first. Empty slots are skipped so that a chassis with a 6-port and a 2-port test module will return eight counts regardless of which slots they are in.

Returns:

the total number of errors across all streams, and including FCS errors.

Return type:

C_PORTERRORS.GetDataAttr

class C_REMOTEPORTCOUNTS[source]

Bases: object

Gets the number of ports of each remote module. A remote module is a relative to the xenaserver, for example, xenal47server. The first integer in the returned list is always 0 because it represents the xenaserver, which is not a remote module.

class GetDataAttr[source]

Bases: ResponseBodyStruct

port_counts

list of bytes, the number of ports, typically 2 or 6, or 0 for an empty slot.

get()[source]

Gets the number of ports of each remote module. A remote module is a relative to the xenaserver, for example, xenal47server. The first integer in the returned list is always 0 because it represents the xenaserver, which is not a remote module.

Returns:

the number of ports of each module slot of the tester, 0 for an empty slot.

Return type:

C_REMOTEPORTCOUNTS.GetDataAttr

class C_RESERVATION[source]

Bases: object

You set this command to reserve, release, or relinquish the chassis itself. The chassis must be reserved before any of the chassis-level parameters can be changed. The owner of the session must already have been specified. Reservation will fail if any modules or ports are reserved for other users.

NOTICE: Before reserve Tester need to reserve all the ports on it, otherwise <STATUS_NOTVALID>

class GetDataAttr[source]

Bases: ResponseBodyStruct

operation

coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get. When set, it contains the operation to perform. When get, it contains the status.

class SetDataAttr[source]

Bases: RequestBodyStruct

operation

coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get. When set, it contains the operation to perform. When get, it contains the status.

get()[source]

Get the chassis reservation status.

Returns:

the status of chassis reservation.

Return type:

C_RESERVATION.GetDataAttr

set(operation)[source]

Set the chassis reservation operation to be performed.

Parameters:

operation (ReservedAction) – reservation operation to be performed.

set_release()

Release the ownership of the tester.

set_relinquish()

Release the ownership of the tester from another user.

set_reserve()

Reserve the tester.

class C_RESERVEDBY[source]

Bases: object

Identify the user who has the chassis reserved. The empty string if the chassis is not currently reserved.

class GetDataAttr[source]

Bases: ResponseBodyStruct

username

string, containing the name of the current owner of the chassis.

get()[source]

Get the username of the current owner of the tester.

Returns:

the username of the current owner of the tester.

Return type:

C_RESERVEDBY.GetDataAttr

class C_RESTCONTROL[source]

Bases: object

Controls REST API server. This command should be used with extra care as it can affect other users using the server.

class SetDataAttr[source]

Bases: RequestBodyStruct

operation

coded byte, what to do with the REST API server.

set(operation)[source]

Controlling the REST API server.

Parameters:

operation (RESTControlAction) – what to do with the REST API server

class C_RESTENABLE[source]

Bases: object

Controls whether the chassis will run REST API server or not. The command takes affect only after chassis reset. To start/stop REST API server use C_RESTCONTROL command.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, determines whether REST API server should be enabled or disabled.

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, determines whether REST API server should be enabled or disabled.

get()[source]

Get the On/Off status of the REST API server.

Returns:

the status of the REST API server, whether it is enabled.

Return type:

xt.XmpByte

set(on_off)[source]

Set the On/Off status of the REST API server.

Parameters:

on_off (OnOff) – determines whether REST API server should be enabled or disabled

set_off()

Disable the REST API server.

set_on()

Enable the REST API server.

class C_RESTPORT[source]

Bases: object

The TCP port used by the REST API server.

class GetDataAttr[source]

Bases: ResponseBodyStruct

tcp_port

integer, containing the TCP port number (default 57911)

class SetDataAttr[source]

Bases: RequestBodyStruct

tcp_port

integer, containing the TCP port number (default 57911)

get()[source]

Get the TCP port number used by the REST API server.

Returns:

the TCP port number used by the REST API server

Return type:

xt.XmpInt

set(tcp_port)[source]

Set the TCP port number used by the REST API server.

Parameters:

tcp_port (int) – the TCP port number (default 57911)

class C_RESTSTATUS[source]

Bases: object

Gets the REST API server operation status - whether it is active (running) or not. To get the admin status (whether the server is enabled or disabled) use C_RESTCONTROL command.

class GetDataAttr[source]

Bases: ResponseBodyStruct

status

coded byte, determines the REST API server running status.

get()[source]

Get the operation status of th REST API server.

Returns:

the operation status of th REST API server

Return type:

C_RESTSTATUS.GetDataAttr

class C_SCRIPT[source]

Bases: object

To load and save CLI commands e.g. port configuration, through the binary XMP session.

class SetDataAttr[source]

Bases: RequestBodyStruct

command_string

string, text CLI command

set(command_string)[source]

Set the CLI commands through a binary XMP session.

Parameters:

command_string (str) – text CLI command

class C_SERIALNO[source]

Bases: object

Gets the unique serial number of this particular Xena chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

serial_number

integer, the serial number of this chassis.

get()[source]

Get the serial number of this Xena tester.

Returns:

the serial number of the Xena tester

Return type:

C_SERIALNO.GetDataAttr

class C_STATSESSION[source]

Bases: object

Gets information and statistics for a particular session on the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ipv4_address

address, client IP address.

operation_count

long integer, number of operations done during the session.

owner

string, the name of the session owner.

requested_byte_count

long integer, number of bytes received by the chassis.

responded_byte_count

long integer, number of bytes sent by the chassis.

session_type

coded integer, which kind of session.

get()[source]

Gets information and statistics for a particular session on the chassis.

Returns:

  • type of session

  • client IP address

  • the name of the session owner

  • number of operations done during the session

  • number of bytes received by the chassis

  • number of bytes sent by the chassis

Return type:

C_STATSESSION.GetDataAttr

class C_TEMPERATURE[source]

Bases: object

Get chassis temperature readings, if supported. Unit is millidegree Celsius.

class GetDataAttr[source]

Bases: ResponseBodyStruct

cpu_temperature

integer, the temperature of CPU. Unit is millidegree Celsius.

mb1_temperature

integer, the temperature of motherboard 1. Unit is millidegree Celsius.

mb2_temperature

integer, the temperature of motherboard 2. Unit is millidegree Celsius.

get()[source]

Get chassis temperature readings.

Returns:

  • the temperature of motherboard 1 (millidegree Celsius)

  • the temperature of motherboard 2 (millidegree Celsius)

  • the temperature of CPU (millidegree Celsius)

Return type:

C_TEMPERATURE.GetDataAttr

class C_TIME[source]

Bases: object

Get local chassis time in seconds.

class GetDataAttr[source]

Bases: ResponseBodyStruct

local_time

long integer, local chassis time in seconds

get()[source]

Get local chassis time in seconds.

Returns:

local chassis time in seconds

Return type:

C_TIME.GetDataAttr

class C_TIMEOUT[source]

Bases: object

The maximum number of idle seconds allowed before the connection is timed out by the tester.

class GetDataAttr[source]

Bases: ResponseBodyStruct

second_count

integer, the maximum idle interval, default is 130 seconds.

class SetDataAttr[source]

Bases: RequestBodyStruct

second_count

integer, the maximum idle interval, default is 130 seconds.

get()[source]

Get the timeout value.

Returns:

the maximum idle interval, default is 130 seconds.

Return type:

C_TIMEOUT.GetDataAttr

set(second_count)[source]

Set the timeout value.

Parameters:

second_count (int) – the maximum idle interval, default is 130 seconds.

class C_TKCONFIG[source]

Bases: object

TimeKeeper config file content.

class GetDataAttr[source]

Bases: ResponseBodyStruct

config_file

string, TimeKeeper config file content

class SetDataAttr[source]

Bases: RequestBodyStruct

config_file

string, TimeKeeper config file content

get()[source]

Get TimeKeeper config file content.

Returns:

TimeKeeper config file content

Return type:

C_TKCONFIG.GetDataAttr

set(config_file)[source]

Set TimeKeeper config file content.

Parameters:

config_file (str) – TimeKeeper config file content

class C_TKGPSSTATE[source]

Bases: object

Get TimeKeeper GPS status.

class GetDataAttr[source]

Bases: ResponseBodyStruct

status

string, TimeKeeper GPS status

get()[source]

Get TimeKeeper GPS status.

Returns:

TimeKeeper GPS status

Return type:

C_TKGPSSTATE.GetDataAttr

class C_TKLICFILE[source]

Bases: object

Get Xena TimeKeeper license file content.

class GetDataAttr[source]

Bases: ResponseBodyStruct

class SetDataAttr[source]

Bases: RequestBodyStruct

get()[source]

Get Xena TimeKeeper license file content.

Returns:

Xena TimeKeeper license file content

Return type:

C_TKLICFILE.GetDataAttr

set(license_content)[source]

Set Xena TimeKeeper license file content.

Parameters:

license_content (str) – Xena TimeKeeper license file content

class C_TKLICSTATE[source]

Bases: object

Get the state of the Xena TimeKeeper license file content.

class GetDataAttr[source]

Bases: ResponseBodyStruct

license_errors

coded integers, license errors.

license_file_state

coded byte, timekeeper license state.

license_type

coded byte, license type.

get()[source]

Get the state of the Xena TimeKeeper license file content.

Returns:

  • timekeeper license state

  • license type

  • license errors

Return type:

C_TKLICSTATE.GetDataAttr

class C_TKSTATUS[source]

Bases: object

Report TimeKeeper version and status.

class GetDataAttr[source]

Bases: ResponseBodyStruct

status_string

string. Version, TimeKeeper license expiration, and TimeKeeper status. The string is formatted as shown in the example below. Each line is separated by.

get()[source]

Get the version and status of TimeKeeper

Returns:

Version, TimeKeeper license expiration, and TimeKeeper status. The string is formatted as shown in the example below.

The format is shown below.

TimeKeeper Status TimeKeeper version 8.0.3 License expires in 33 days (including grace period) TimeKeeper is not running

Return type:

C_TKSTATUS.GetDataAttr

class C_TKSTATUSEXT[source]

Bases: object

Report TimeKeeper version and status (extended version).

class GetDataAttr[source]

Bases: ResponseBodyStruct

status_string

string, extended status in JSON format. The string is formatted as shown in the example below.

get()[source]

Get the TimeKeeper version and status.

Returns:

extended status in JSON format. The string is formatted as shown in the example below.

Return type:

C_TKSTATUSEXT.GetDataAttr

class C_TKSVCSTATE[source]

Bases: object

Get and control TimeKeeper service state.

class GetDataAttr[source]

Bases: ResponseBodyStruct

state

coded byte, TimeKeeper service state

class SetDataAttr[source]

Bases: RequestBodyStruct

state

coded byte, TimeKeeper service state

get()[source]

Get TimeKeeper service state

Returns:

TimeKeeper service state

Return type:

C_TKSVCSTATE.GetDataAttr

set(state)[source]

Control TimeKeeper service state

Parameters:

state (TimeKeeperServiceAction) – TimeKeeper service state

set_restart()

Restart the TimerKeeper service.

set_start()

Start the TimerKeeper service.

set_stop()

Stop the TimerKeeper service.

class C_TRAFFIC[source]

Bases: object

Starts or stops the traffic on a number of ports on the chassis simultaneously. The ports are identified by pairs of integers (module port).

class SetDataAttr[source]

Bases: RequestBodyStruct

module_ports

list of integers, specifies ports on modules, which should stop or start generating traffic.

on_off

coded byte, determines whether to start or stop traffic generation.

set(on_off, module_ports)[source]

Starts or stops the traffic on a number of ports on the chassis simultaneously.

Parameters:
  • on_off (OnOff) – determines whether to start or stop traffic generation

  • module_ports (List[int]) – specifies ports on modules, which should stop or start generating traffic

set_off(module_ports)

Stop the traffic on a number of ports on the chassis simultaneously.

set_on(module_ports)

Start the traffic on a number of ports on the chassis simultaneously.

class C_TRAFFICSYNC[source]

Bases: object

Works just as the C_TRAFFIC command described above with an additional option to specify a point in time where traffic should be started. This can be used to start traffic simultaneously on multiple chassis. The ports are identified by pairs of integers (module port).

Note

This requires that the chassis in question all use the TimeKeeper option to keep their CPU clocks synchronized.

class GetDataAttr[source]

Bases: ResponseBodyStruct

module_ports

list of integers, specifies ports on modules, which should stop or start traffic generation.

on_off

coded byte, status traffic generation.

timestamp

long integer, the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00

class SetDataAttr[source]

Bases: RequestBodyStruct

module_ports

list of integers, specifies ports on modules, which should stop or start traffic generation.

on_off

coded byte, determines whether to start or stop traffic generation.

timestamp

long integer, the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00

get()[source]

Get the status of traffic generation.

Returns:

  • status traffic generation

  • the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00

  • ports on modules, which should stop or start traffic generation

Return type:

C_TRAFFICSYNC.GetDataAttr

set(on_off, timestamp, module_ports)[source]

Set the status of traffic generation.

Parameters:
  • on_off (OnOff) – determines whether to start or stop traffic generation

  • timestamp (int) – the time where traffic should be started, expressed as the number of seconds since January 1 2010, 00

  • module_ports (List[int]) – specifies ports on modules, which should stop or start traffic generation.

set_off(timestamp, module_ports)

Stop traffic generation on the given ports simultaneously on different chassis.

set_on(timestamp, module_ports)

Start traffic generation on the given ports simultaneously on different chassis.

class C_VERSIONNO[source]

Bases: object

Gets the major version numbers for the chassis firmware and the Xena PCI driver installed on the chassis.

class GetDataAttr[source]

Bases: ResponseBodyStruct

chassis_major_version

integer, the chassis firmware major version number.

pci_driver_version

integer, the cXena PCI driver version.

get()[source]

Gets the major version numbers for the tester firmware and the Xena PCI driver installed on the chassis.

Returns:

the firmware major version number of the tester and the PCI driver version

Return type:

C_VERSIONNO.GetDataAttr

class C_VERSIONNO_MINOR[source]

Bases: object

Gets the minor version number for the chassis firmware. The full version of the chassis firmware is thus where the number is obtained with the C_VERSIONNO command and the number is obtained with the C_VERSIONNO_MINOR command.

class GetDataAttr[source]

Bases: ResponseBodyStruct

chassis_minor_version

integer, the chassis firmware minor version number.

reserved_1

integer, reserved.

reserved_2

integer, reserved.

get()[source]

Get the minor version number for the chassis firmware.

Returns:

  • the minor version number for the chassis firmware

  • reserved, 0

  • reserved, 0

Return type:

C_VERSIONNO_MINOR.GetDataAttr

class C_VERSIONSTR[source]

Bases: object

Returns xenaserver version number in the new format, e.g. “467.0.0+1.0”

Obsoletes C_VERSIONNO and C_VERSIONNO_MINOR

class GetDataAttr[source]

Bases: ResponseBodyStruct

version_str

string, xenaserver version number in the new format.

get()[source]

Returns xenaserver version number in the new format.

Returns:

xenaserver version number in the new format

Return type:

C_VERSIONSTR.GetDataAttr

class C_WATCHDOG[source]

Bases: object

If the chassis stalls for a long time, when the timer expires the chassis will be rebooted automatically.

class GetDataAttr[source]

Bases: ResponseBodyStruct

timer_value

integer, the timer value that reboots the chassis. Unit = second.

class SetDataAttr[source]

Bases: RequestBodyStruct

timer_value

integer, the timer value that reboots the chassis. Unit = second.

get()[source]

Get the time value that reboots the chassis if it stalls for a long time.

Returns:

the timer value that reboots the chassis. Unit = second.

Return type:

C_WATCHDOG.GetDataAttr

set(timer_value)[source]

Set the time value that reboots the chassis if it stalls for a long time.

Parameters:

timer_value (int) – the timer value that reboots the chassis