manager¶
PodmanResources 和 Manager 的基类。
- class Manager(client: APIClient | None = None, podman_client: PodmanClient | None = None)[源]¶
基类:
ABC
表示 Podman 服务资源管理器 的基类。
初始化 Manager() 对象。
- 参数:
client – 配置为连接到 Podman 服务的 APIClient()。
podman_client – 配置为连接到 Podman 对象的 PodmanClient()。
- prepare_model(attrs: PodmanResource | Mapping[str, Any]) PodmanResourceType [源]¶
从一组属性创建模型。
- abstract property resource¶
工厂方法 prepare_model() 将使用的类。
- 类型:
Type[PodmanResource]
- class PodmanResource(attrs: Mapping[str, Any] | None = None, client: APIClient | None = None, collection: Manager | None = None, podman_client: PodmanClient | None = None)[源]¶
基类:
ABC
表示 Podman 服务资源的基类。
- attrs¶
Podman 服务资源的属性映射
初始化 PodmanResource 的基类。
- 参数:
attrs – Podman 服务资源属性的映射。
client – Podman 服务的配置连接。
collection – 此类资源的管理器,为了兼容性命名为 collection
podman_client – 配置为连接到 Podman 对象的 PodmanClient()。
- property id¶
返回对象的标识符。
- 类型:
str
- property short_id¶
返回截断的标识符。当包含在 id 中时,保留“sha256”。
不尝试确保返回的值对所有资源都具有语义意义。
- 类型:
str