manager¶
Base classes for PodmanResources and Manager’s.
- class Manager(client: APIClient = None)[source]¶
Bases:
ABC
Base class for representing a Manager of resources for a Podman service.
Initialize Manager() object.
- Parameters:
client – APIClient() configured to connect to Podman service.
- abstract exists(key: str) bool [source]¶
Returns True if resource exists.
Podman only.
Notes
This method does _not_ provide any mutex mechanism.
- prepare_model(attrs: PodmanResource | Mapping[str, Any]) PodmanResourceType [source]¶
Create a model from a set of attributes.
- abstract property resource¶
Class which the factory method prepare_model() will use.
- Type:
Type[PodmanResource]
- class PodmanResource(attrs: Mapping[str, Any] | None = None, client: APIClient | None = None, collection: Manager | None = None)[source]¶
Bases:
ABC
Base class for representing resource of a Podman service.
- attrs¶
Mapping of attributes for resource from Podman service
Initialize base class for PodmanResource’s.
- Parameters:
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
- property id¶
Returns the identifier for the object.
- Type:
str
- 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.
- Type:
str