Expand description
IMS image queries and safety-checked deletion.
Image-deletion has two failure modes that the service layer refuses to let through:
- Deleting the boot image of a currently-booted node would brick
the next boot.
validate_image_deletioncross-references every candidate id against the BSS boot-parameter records. - 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§
- GetImages
Params - Typed parameters for fetching IMS images.
Functions§
- delete_
images - Run
validate_image_deletionthen delete each image inimage_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.