tardis.interfaces.batchsystemadapter module

class tardis.interfaces.batchsystemadapter.BatchSystemAdapter[source]

Bases: object

Abstract base class defining the interface for BatchSystemAdapters which handles integration and management of resources in the overlay batch system.

abstract async disintegrate_machine(drone_uuid: str) None[source]

Disintegrate a machine from the overlay batch system.

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

None

abstract async drain_machine(drone_uuid: str) None[source]

Drain a machine in the overlay batch system, which means that no new jobs will be accepted

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

None

abstract async get_allocation(drone_uuid: str) float[source]

Get the allocation of a worker node in the overlay batch system, which is defined as maximum of the ratios of requested over total resources (CPU, Memory, Disk, etc.).

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The allocation of a worker node as described above.

Return type

float

abstract async get_machine_status(drone_uuid: str) MachineStatus[source]

Get the status of a worker node in the overlay batch system (Available, Draining, Drained, NotAvailable)

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The machine status in HTCondor (Available, Draining, Drained, NotAvailable)

Return type

MachineStatus

abstract async get_utilisation(drone_uuid: str) float[source]

Get the utilisation of a worker node in the overlay batch system, which is defined as minimum of the ratios of requested over total resources (CPU, Memory, Disk, etc.).

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The utilisation of a worker node as described above.

Return type

float

abstract async integrate_machine(drone_uuid: str) None[source]

Integrate a machine into the overlay batch system.

Parameters

drone_uuid (str) – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

None

abstract property machine_meta_data_translation_mapping: AttributeDict

The machine meta data translation mapping is used to translate units of the machine meta data in TARDIS as expected by the overlay batch system.

Returns

machine meta data translation mapping

Return type

AttributeDict

class tardis.interfaces.batchsystemadapter.MachineStatus(value)[source]

Bases: Enum

An enumeration.

Available = 1
Drained = 3
Draining = 2
NotAvailable = 4