Base classes for PodmanResources and Manager’s.
- class Manager(client: APIClient = None)¶
Base class for representing a Manager of resources for a Podman service.
Initialize Manager() object.
client – APIClient() configured to connect to Podman service.
- abstract exists(key: str) bool ¶
Returns True if resource exists.
This method does _not_ provide any mutex mechanism.
- abstract get(key: str) PodmanResourceType ¶
Returns representation of resource.
- abstract list(**kwargs) List[PodmanResourceType] ¶
Returns list of resources.
- prepare_model(attrs: PodmanResource | Mapping[str, Any]) PodmanResourceType ¶
Create a model from a set of attributes.
- class PodmanResource(attrs: Mapping[str, Any] | None = None, client: APIClient | None = None, collection: Manager | None = None)¶
Base class for representing resource of a Podman service.
Mapping of attributes for resource from Podman service
Initialize base class for PodmanResource’s.
attrs – Mapping of attributes for resource from Podman service.
client – Configured connection to a Podman service.
collection – Manager of this category of resource, named collection for compatibility
- reload() None ¶
Refresh this object’s data from the service.
- property id¶
Returns the identifier for the object.
- property short_id¶
Returns truncated identifier. ‘sha256’ preserved when included in the id.
No attempt is made to ensure the returned value is semantically meaningful for all resources.