Skip to content

Storage Classes

albert.collections.storage_classes.StorageClassesCollection

StorageClassesCollection(*, session: AlbertSession)

Bases: BaseCollection

Collection for interacting with storage class compatibility endpoints.

Methods:

Name Description
get_all

Retrieve storage compatibility information for all storage classes.

Attributes:

Name Type Description
base_path
Source code in src/albert/collections/storage_classes.py
def __init__(self, *, session: AlbertSession):
    super().__init__(session=session)
    self.base_path = f"/api/{self._api_version}/static/storageclass"

base_path

base_path = f'/api/{_api_version}/static/storageclass'

get_all

get_all() -> list[StorageClass]

Retrieve storage compatibility information for all storage classes.

Source code in src/albert/collections/storage_classes.py
@validate_call
def get_all(self) -> list[StorageClass]:
    """Retrieve storage compatibility information for all storage classes."""
    response = self.session.get(self.base_path)
    return [StorageClass(**item) for item in response.json()]