Module image

Module image 

Source
Expand description

IMS image queries and safety-checked deletion.

Image-deletion has two failure modes that the service layer refuses to let through:

  1. Deleting the boot image of a currently-booted node would brick the next boot. validate_image_deletion cross-references every candidate id against the BSS boot-parameter records.
  2. Deleting an image referenced by a node outside the caller’s accessible groups would let users indirectly remove resources they don’t own.

Read-only listing (get_images) validates the requested pattern glob and since/until range, filters on both, selects the newest limit images, and returns them oldest-first (newest last). IMS takes no query parameters of its own, so every filter runs here.

Structs§

GetImagesParams
Typed parameters for fetching IMS images.

Functions§

delete_images
Run validate_image_deletion then delete each image in image_id_vec, best-effort.
get_images
Fetch IMS images from the backend, oldest-first (newest last).
validate_image_deletion
Refuse a planned image delete that would orphan a live boot path or touch an image scoped to a group the caller can’t reach.