tardis.adapters.batchsystems.fakebatchsystem module
- class tardis.adapters.batchsystems.fakebatchsystem.FakeBatchSystemAdapter[source]
Bases:
BatchSystemAdapterFakeBatchSystemAdapterimplements a batch system adapter that mocks the response of a hypothetical batch system. It can be used for testing purposes and as a demonstrator in workshops and tutorials.The mocked response to the
get_utilisation(),get_allocation()andget_machine_status()API calls is configurable statically.- async disintegrate_machine(drone_uuid: str) None[source]
FakeBatchSystemAdapter’s do nothing disintegrate_machine implementation
- Parameters
drone_uuid – Unique identifier of the drone
- async drain_machine(drone_uuid: str) None[source]
FakeBatchSystemAdapter’s do nothing drain_machine implementation
- Parameters
drone_uuid – Unique identifier of the drone
- async get_allocation(drone_uuid: str) float[source]
Returns the fake allocation according to the configuration of the FakeBatchSystem
- Parameters
drone_uuid – Unique identifier of the drone
- Returns
Allocation value specified in the FakeBatchSystem configuration
- async get_machine_status(drone_uuid: str) MachineStatus[source]
Returns a fake machine status according to the parameter set in the configuration of the FakeBatchSystem
- Parameters
drone_uuid – Unique identifier of the drone
- Returns
Machine status specified in the FakeBatchSystem configuration
- async get_utilisation(drone_uuid: str) float[source]
Returns the fake utilisation according to the configuration of the FakeBatchSystem
- Parameters
drone_uuid – Unique identifier of the drone
- Returns
utilisation value specified in the FakeBatchSystem configuration
- async integrate_machine(drone_uuid: str) None[source]
FakeBatchSystemAdapter’s do nothing integrate_machine implementation
- Parameters
drone_uuid – Unique identifier of the drone
- property machine_meta_data_translation_mapping: AttributeDict
The machine meta data translation mapping is used to translate units of the machine meta data in
TARDISto values expected by the FakeBatchSystem adapter.- Returns
Machine meta data translation mapping