mlos_bench.services.remote.azure.azure_saas module

A collection Service functions for configuring SaaS instances on Azure.

class mlos_bench.services.remote.azure.azure_saas.AzureSaaSConfigService(config: Dict[str, Any] | None = None, global_config: Dict[str, Any] | None = None, parent: Service | None = None, methods: Dict[str, Callable] | List[Callable] | None = None)

Bases: Service, SupportsRemoteConfig

Helper methods to configure Azure Flex services.

Attributes:
config_loader_service

Return a config loader service.

Methods

configure(config, params)

Update the parameters of an Azure DB service.

export()

Return a dictionary of functions available in this service.

is_config_pending(config)

Check if the configuration of an Azure DB service requires a reboot or restart.

merge_methods(ext_methods, local_methods)

Merge methods from the external caller with the local ones.

new(class_name[, config, global_config, parent])

Factory method for a new service with a given config.

pprint()

Produce a human-readable string listing all public methods of the service.

register(services)

Register new mix-in services.

configure(config: Dict[str, Any], params: Dict[str, Any]) Tuple[Status, dict]

Update the parameters of an Azure DB service.

Parameters:
configDict[str, Any]

Key/value pairs of configuration parameters (e.g., vmName).

paramsDict[str, Any]

Key/value pairs of the service parameters to update.

Returns:
result(Status, dict={})

A pair of Status and result. The result is always {}. Status is one of {PENDING, SUCCEEDED, FAILED}

is_config_pending(config: Dict[str, Any]) Tuple[Status, dict]

Check if the configuration of an Azure DB service requires a reboot or restart.

Parameters:
configDict[str, Any]

Key/value pairs of configuration parameters (e.g., vmName).

Returns:
result(Status, dict)

A pair of Status and result. A Boolean field “isConfigPendingRestart” indicates whether the service restart is required. If “isConfigPendingReboot” is set to True, rebooting a VM is necessary. Status is one of {PENDING, TIMED_OUT, SUCCEEDED, FAILED}