manifests¶
Model and Manager for Manifest resources.
- class Manifest(attrs: Mapping[str, Any] | None = None, client: APIClient | None = None, collection: Manager | None = None, podman_client: PodmanClient | None = None)[source]¶
Bases:
PodmanResourceDetails and configuration for a manifest managed by the 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
podman_client – PodmanClient() configured to connect to Podman object.
- add(images: list[Image | str], **kwargs) None[source]¶
Add Image to manifest list.
- Parameters:
images – List of Images to be added to manifest.
- Keyword Arguments:
all (bool)
annotation (dict[str, str])
arch (str)
features (list[str])
os (str)
os_version (str)
variant (str)
- Raises:
ImageNotFound – when Image(s) could not be found
APIError – when service reports an error
- push(destination: str, all: bool | None = None, **kwargs) None[source]¶
Push a manifest list or image index to a registry.
- Parameters:
destination – Target for push.
all – Push all images.
- Keyword Arguments:
str] (auth_config (Mapping[str,) – Override configured credentials. Must include username and password keys.
- Raises:
NotFound – when the Manifest could not be found
APIError – when service reports an error
- remove(digest: str) None[source]¶
Remove Image digest from manifest list.
- Parameters:
digest – Image digest to be removed. Should a full Image reference be provided, the digest will be parsed out.
- Raises:
ImageNotFound – when the Image could not be found
APIError – when service reports an error
- property id¶
Returns the identifier of the manifest list.
- Type:
str
- property media_type¶
Returns the Media/MIME type for this manifest.
- Type:
Optional[str]
- property name¶
Returns the human-formatted identifier of the manifest list.
- Type:
str
- property names¶
Returns the identifier of the manifest.
- Type:
list[str]
- property quoted_name¶
name quoted as path parameter.
- 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
- property version¶
Returns the schema version type for this manifest.
- Type:
int
- class ManifestsManager(client: APIClient | None = None, podman_client: PodmanClient | None = None)[source]¶
Bases:
ManagerSpecialized Manager for Manifest resources.
Initialize Manager() object.
- Parameters:
client – APIClient() configured to connect to Podman service.
podman_client – PodmanClient() configured to connect to Podman object.
- create(name: str, images: list[Image | str] | None = None, all: bool | None = None) Manifest[source]¶
Create a Manifest.
- Parameters:
name – Name of manifest list.
images – Images or Image identifiers to be included in the manifest.
all – When True, add all contents from images given.
- Raises:
ValueError – when no names are provided
NotFoundImage – when a given image does not exist
- exists(key: str) bool[source]¶
Returns True if resource exists.
Podman only.
Notes
This method does _not_ provide any mutex mechanism.
- get(key: str) Manifest[source]¶
Returns the manifest by name.
To have Manifest conform with other PodmanResource’s, we use the key that retrieved the Manifest be its name.
- Parameters:
key – Manifest name for which to search
- Raises:
NotFound – when manifest could not be found
APIError – when service reports an error
- prepare_model(attrs: PodmanResource | Mapping[str, Any]) PodmanResourceType¶
Create a model from a set of attributes.