mlos_bench.services.types.os_ops_type module¶
Protocol interface for Host/OS operations.
- class mlos_bench.services.types.os_ops_type.SupportsOSOps(*args, **kwargs)¶
Bases:
Protocol
Protocol interface for Host/OS operations.
Methods
reboot
(params[, force])Initiates a (graceful) shutdown of the Host/VM OS.
shutdown
(params[, force])Initiates a (graceful) shutdown of the Host/VM OS.
wait_os_operation
(params)Waits for a pending operation on an OS to resolve to SUCCEEDED or FAILED.
- reboot(params: dict, force: bool = False) Tuple[Status, dict] ¶
Initiates a (graceful) shutdown of the Host/VM OS.
- Parameters:
- params: dict
Flat dictionary of (key, value) pairs of tunable parameters.
- forcebool
If True, force restart the Host/VM.
- Returns:
- result(Status, dict={})
A pair of Status and result. The result is always {}. Status is one of {PENDING, SUCCEEDED, FAILED}
- shutdown(params: dict, force: bool = False) Tuple[Status, dict] ¶
Initiates a (graceful) shutdown of the Host/VM OS.
- Parameters:
- params: dict
Flat dictionary of (key, value) pairs of tunable parameters.
- forcebool
If True, force stop the Host/VM.
- Returns:
- result(Status, dict={})
A pair of Status and result. The result is always {}. Status is one of {PENDING, SUCCEEDED, FAILED}
- wait_os_operation(params: dict) Tuple[Status, dict] ¶
Waits for a pending operation on an OS to resolve to SUCCEEDED or FAILED. Return TIMED_OUT when timing out.
- Parameters:
- params: dict
Flat dictionary of (key, value) pairs of tunable parameters. Must have the “asyncResultsUrl” key to get the results. If the key is not present, return Status.PENDING.
- Returns:
- result(Status, dict)
A pair of Status and result. Status is one of {PENDING, SUCCEEDED, FAILED, TIMED_OUT} Result is info on the operation runtime if SUCCEEDED, otherwise {}.