mlos_bench.services.remote.azure.azure_auth module

A collection Service functions for managing VMs on Azure.

class mlos_bench.services.remote.azure.azure_auth.AzureAuthService(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, SupportsAuth[TokenCredential]

Helper methods to get access to Azure services.

Attributes:
config_loader_service

Return a config loader service.

Methods

export()

Return a dictionary of functions available in this service.

get_access_token()

Get the access token from Azure CLI, if expired.

get_auth_headers()

Get the authorization part of HTTP headers for REST API calls.

get_credential()

Return the Azure SDK credential object.

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.

get_access_token() str

Get the access token from Azure CLI, if expired.

get_auth_headers() dict

Get the authorization part of HTTP headers for REST API calls.

get_credential() TokenCredential

Return the Azure SDK credential object.