1.1.4.1.2. test_automation.utils.device

1.1.4.1.2.1. Classes

Device

Abstract device manager API required for both local and

1.1.4.1.2.2. Module Contents

class test_automation.utils.device.Device[source]

Bases: abc.ABC

Abstract device manager API required for both local and hardware farm device connections.

Returns:

None.

abstract init()[source]

Prepare resources but do not power on/run yet.

Returns:

None.

Return type:

None

abstract start()[source]

Power on the DUT.

Returns:

None.

Return type:

None

abstract stop()[source]

Power off the DUT and clean up the resources.

Returns:

None.

Return type:

None

abstract reset()[source]

Power cycle DUT. Power on and off as per the current state.

Returns:

None.

Return type:

None

abstract wait_ready(timeout_s=None)[source]

Block until the DUT is ready (e.g., exported telnet ports detected).

Returns:

None.

Parameters:

timeout_s (Optional[int])

Return type:

None

abstract is_running()[source]

True if the model is alive.

Returns:

True if the device is running, else False.

Return type:

bool

abstract get_ports()[source]

Return discovered terminal name -> telnet port mappings.

Returns:

Dictionary mapping terminal names to telnet port numbers.

Return type:

Dict[str, int]

abstract log_path()[source]

Return path to the primary boot log.

Returns:

Path object pointing to the boot log file.

Return type:

pathlib.Path