aistore.sdk.authn.cluster_manager
aistore.sdk.authn.cluster_manager
Module Contents
Classes
Data
API
ClusterManager class for handling operations on clusters within the context of authentication.
This class provides methods to list, get, register, update, and delete clusters on AuthN server.
Parameters:
The request client to make HTTP requests.
RequestClient: The client this cluster manager uses to make requests.
Delete a specific cluster by ID or alias.
Parameters:
The ID of the cluster to delete. Defaults to None.
The alias of the cluster to delete. Defaults to None.
Raises:
ValueError: If neither cluster_id nor cluster_alias is provided.AISError: If an error occurs while deleting the cluster
Retrieve a specific cluster by ID or alias.
Parameters:
The ID of the cluster. Defaults to None.
The alias of the cluster. Defaults to None.
Returns: ClusterInfo
Information about the specified cluster.
Raises:
ValueError: If neither cluster_id nor cluster_alias is provided.RuntimeError: If no cluster matches the provided ID or alias.AISError: If an error occurs while getting the cluster.
Retrieve all clusters.
Returns: ClusterList
A list of all clusters.
Raises:
AISError: If an error occurs while listing clusters.
Register a new cluster.
Parameters:
The alias for the new cluster.
A list of URLs for the new cluster.
Returns: ClusterInfo
Information about the registered cluster.
Raises:
ValueError: If no URLs are provided or an invalid URL is provided.AISError: If an error occurs while registering the cluster.
Update an existing cluster.
Parameters:
The ID of the cluster to update.
The new alias for the cluster. Defaults to None.
The new list of URLs for the cluster. Defaults to None.
Returns: ClusterInfo
Information about the updated cluster.
Raises:
ValueError: If neither cluster_alias nor urls are provided.AISError: If an error occurs while updating the cluster