glance.async_.flows.api_image_import module

class glance.async_.flows.api_image_import.ImportActionWrapper(image_repo, image_id)[source]

Bases: object

Wrapper for all the image metadata operations we do during an import.

This is used to consolidate the changes we make to image metadata during an import operation, and can be used with an admin-capable repo to enable non-owner controlled modification of that data if desired.

Use this as a context manager to make multiple changes followed by a save of the image in one operation. An _ImportActions object is yielded from the context manager, which defines the available operations.

Parameters
  • image_repo – The ImageRepo we should use to fetch/save the image

  • image-id – The ID of the image we should be altering

glance.async_.flows.api_image_import.get_flow(**kwargs)[source]

Return task flow

Parameters
  • task_id – Task ID

  • task_type – Type of the task

  • task_repo – Task repo

  • image_repo – Image repository used

  • image_id – ID of the Image to be processed

  • uri – uri for the image file