GARImagesManager#

class nublado.services.images.GARImagesManager(gar_client, logger)#

Bases: ImagesManager[GARSource]

Manage Nublado images using the Google Artifact Registry API.

Parameters:

Methods Summary

delete_tags(config, tags)

Delete the given tags.

list_tags(config)

List the available image tags in the repository.

prune_images(config, policy, *[, dry_run])

Prune the images excluded by a filter policy.

Methods Documentation

async delete_tags(config, tags)#

Delete the given tags.

The underlying image will be deleted, even if the image also has other tags, so this will also delete other tags attached to the same image. Use with caution for images that may be tagged with recommended or other alias tags.

Parameters:
Return type:

None

async list_tags(config)#

List the available image tags in the repository.

Parameters:

config (GARSource) – Configuration for the repository.

Returns:

Set of image tags.

Return type:

set of str

async prune_images(config, policy, *, dry_run=True)#

Prune the images excluded by a filter policy.

The images that are not accepted by the filter policy will be deleted, at least to the extent that is possible in the target image registry.

Parameters:
  • config (GARSource) – Configuration for the repository.

  • policy (ImageFilterPolicy) – Image filter policy describing what images to retain.

  • dry_run (bool, default: True) – If True, do not delete the images, only return which images would be deleted.

Returns:

Tags of deleted images, or images that would be deleted if dry_run is True, in standard sorted order.

Return type:

list of str