manta_shared/types/api/
analysis.rs

1//! Wire shape for `GET /api/v1/analysis/images`.
2//!
3//! Each `BackendSummary` is one row in an image-centric projection of
4//! the four backend resource lists. See the field-population rules in
5//! the implementation plan for how each column is derived.
6
7use serde::{Deserialize, Serialize};
8use utoipa::ToSchema;
9
10/// One row of the backend-data summary, anchored on an IMS image.
11///
12/// Every IMS image visible to the caller produces exactly one row.
13/// The row's `image_id` and `name` are always populated; the rest are
14/// `Option<String>` and are filled in only when the corresponding
15/// relation resolves.
16#[derive(Debug, Serialize, Deserialize, ToSchema)]
17pub struct BackendSummary {
18  /// IMS image id (`Image.id`). Row anchor.
19  pub image_id: String,
20  /// IMS image name (`Image.name`).
21  pub name: String,
22  /// IMS image `created` timestamp (`Image.created`).
23  pub image_created: Option<String>,
24  /// CFS configuration the image was built with
25  /// (`Image.configuration`).
26  pub configuration_name: Option<String>,
27  /// `true` if no BSS boot-parameter record references this image as
28  /// its boot image. An image referenced by BSS is currently booting
29  /// (or scheduled to boot) at least one node, so deleting it would
30  /// break that node's next boot.
31  pub safe_to_delete: bool,
32}