waft.waft module

class waft.waft.Waft(configuration_file: Path | str | None = None)

Bases: object

Waft is the way to interface with the WAFT framework. It bundles useful APIs from the framework into a single place. This is also where the configuration file gets loaded to memory.

Note: If using waft with remote systems you must set the active system e.g. the system from the config file that you want waft to interact with.

Example Usage:

waft = Waft() waft.active_system_name = ‘test_system_windows’

Then you can use the node or warp_actions properties waft.node.install_python(‘3.10’)

or

waft.warp_actions.install_management.install()

property active_system_name: str
Returns:

The active system name.

Raises:

ValueError – If the active system name is not set.

property connection_details: ConnectionDetails
Returns:

The connection details for the active system.

Raises:

ValueError – If no system configuration is found for the active system name.

property dashboard_actions: DashboardActions

Returns a DashboardActions instance for using the CF dashboard.

get_system_details()

Retrieve the details for the system that is active

load_settings_from_config() None

Loads settings from the configuration file.

property node: BaseNode

Returns the node object for the active system.

property restricted_user: Waft

Return a Waft class instance representing the framework API, executed from a non-privileged system account.

property system_actions: SystemActions

Returns an instance of SystemActions. System actions are for interacting with the system the warp client is installed on.

user(username: str) Waft

Return a Waft class instance representing the framework API, executed from an alternate system account.

Parameters:

username (str) – User account name

Returns:

class instance representing the framework API

Return type:

Waft

property warp_actions: WarpActions

Returns a WarpActions object initialized with the node.