ironicclient.common.apiclient.base module

Base utilities to build API operation managers and objects on top of.

class ironicclient.common.apiclient.base.ManagerProtocol(*args, **kwargs)[source]

Bases: Protocol

Minimal protocol for Resource’s manager dependency.

client: Any
class ironicclient.common.apiclient.base.Resource(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)[source]

Bases: object

Base class for OpenStack resources (tenant, user, etc.).

This is pretty much just a bag for attributes.

HUMAN_ID: bool = False
NAME_ATTR: str = 'name'
get() None[source]

Support for lazy loading details.

Some clients, such as novaclient have the option to lazy load the details, details which can be loaded with this function.

property human_id: str | None

Human-readable ID which can be used for bash completion.

is_loaded() bool[source]
set_loaded(val: bool) None[source]
to_dict() dict[str, Any][source]