libcloud.common.types module

exception libcloud.common.types.InvalidCredsError(value: str = 'Invalid credentials with the provider', driver: BaseDriver | None = None)[source]

Bases: ProviderError

Exception used when invalid credentials are used on a provider.

libcloud.common.types.InvalidCredsException

alias of InvalidCredsError

class libcloud.common.types.LazyList(get_more: Callable, value_dict: dict | None = None)[source]

Bases: object

exception libcloud.common.types.LibcloudError(value: str, driver: BaseDriver | None = None)[source]

Bases: Exception

The base class for other libcloud exceptions

exception libcloud.common.types.MalformedResponseError(value: str, body: str | None = None, driver: BaseDriver | None = None)[source]

Bases: LibcloudError

Exception for the cases when a provider returns a malformed response, e.g. you request JSON and provider returns ‘<h3>something</h3>’ due to some error on their side.

exception libcloud.common.types.ProviderError(value: str, http_code: int, driver: BaseDriver | None = None)[source]

Bases: LibcloudError

Exception used when provider gives back error response (HTTP 4xx, 5xx) for a request.

Specific sub types can be derived for errors like HTTP 401 : InvalidCredsError HTTP 404 : NodeNotFoundError, ContainerDoesNotExistError

class libcloud.common.types.Type(value)[source]

Bases: str, Enum

An enumeration.

classmethod fromstring(value: str) str | None[source]

Return the state object attribute that matches the string :param str value: the string to look up :return: the state object attribute that matches the string :rtype: str

classmethod tostring(value: Enum | str) str[source]

Return the string representation of the state object attribute :param str value: the state object to turn into string :return: the uppercase string that represents the state object :rtype: str