Module api

Module api 

Source
Expand description

Single-namespace API types shared between manta-cli (Serialize side) and manta-server (Deserialize side).

Each submodule owns one resource end-to-end: HTTP request/response bodies, query-string structs, and CLI-built parameter structs all sit next to each other rather than being split across parallel wire/ and params/ namespaces. Cross-cutting query and response shapes live in queries and responses.

Convention:

  • Owned types (String, Vec<String>) throughout. The CLI pays a small allocation cost on the outbound build; in exchange there is exactly one type to keep in sync.
  • Derives are #[derive(Serialize, Deserialize, ToSchema)] (or IntoParams for query strings). The server uses Deserialize + the utoipa derives for OpenAPI; the CLI uses Serialize.
  • Field-level docs describe wire semantics. They show up in both the OpenAPI spec and the rustdoc the CLI consumes.

Types re-exported from manta-backend-dispatcher (response DTOs owned by upstream crates) live in super::dto, which is kept separate because it serves a different concern: types we don’t own.

Modules§

analysis
Aggregate summary of CFS configurations + sessions + BOS templates + IMS images flattened into image-centric rows (/api/v1/analysis/images). Wire shape for GET /api/v1/analysis/images.
boot_parameters
Boot-parameter request/response bodies (/api/v1/boot-config, /api/v1/boot-parameters). HTTP request/response bodies and CLI-built parameter structs for the boot-parameter endpoints (/api/v1/boot-config and /api/v1/boot-parameters).
cluster
CLI-built params for GET /clusters. Parameters for GET /clusters.
configuration
CLI-built params for GET /configurations. Parameters for GET /configurations.
configuration_analysis
Wire shape for the per-row configuration-deletion-safety verdict returned by /api/v1/configurations. Wire shape for GET /api/v1/configurations.
group
HSM group request/response bodies (/api/v1/groups, /api/v1/groups/{name}/members). HTTP request/response bodies and CLI-built parameter structs for the HSM group endpoints (/api/v1/groups, /api/v1/groups/{name}/members).
hardware
CLI-built params for GET /groups/hardware and the /hardware-nodes-list family. Parameters for GET /groups/hardware (and the deprecated /hardware-clusters alias) and GET /hardware-nodes-list.
hw_cluster
Wire types for the POST/DELETE /api/v1/hardware-clusters/{target}/* endpoints. HTTP request/response bodies and shared types for the POST /api/v1/hardware-clusters/{target}/* and DELETE /api/v1/hardware-clusters/{target}/members endpoints.
image
CLI-built params for GET /images. Parameters for GET /images.
kernel_parameters
Kernel-parameter request/response bodies (/api/v1/kernel-parameters/*). The internal KernelParamOperation enum is server-only and lives in service::kernel_parameters. HTTP request/response bodies and CLI-built parameter structs for the kernel-parameter endpoints (/api/v1/kernel-parameters/*).
migrate
Wire types for the POST /api/v1/migrate/* endpoints. Wire types for the POST /api/v1/migrate/* endpoints.
node
Node request/response bodies (/api/v1/nodes). HTTP request/response bodies and CLI-built parameter structs for the node endpoints (/api/v1/nodes).
power
Power request/response bodies (/api/v1/power). HTTP request/response bodies and CLI-built parameter structs for the power endpoints (/api/v1/power).
queries
Shared IntoParams query-string structs for every non-trivial GET and DELETE endpoint. Query-string parameter types for every GET and DELETE endpoint whose query parameters are non-trivial.
redfish_endpoints
CLI-built params for GET/POST/PUT /redfish-endpoints. Parameters for GET, POST, and PUT on /redfish-endpoints.
responses
Tiny response shapes ({ "created": true }, { "id": "..." }) so the OpenAPI spec carries real types instead of serde_json::Value. Lightweight response shapes for handlers that return ad-hoc JSON maps such as { "created": true } or { "id": "..." }.
sat_file
SAT-file element-apply request/response bodies (POST /api/v1/sat-file/*) and CLI-built params for the whole-file pass-through. HTTP request/response bodies for the per-element SAT-file apply endpoints under POST /api/v1/sat-file/*, plus CLI-built params for the backend’s whole-file apply_sat_file pass-through.
session
CFS session request/response bodies (/api/v1/sessions). HTTP request/response bodies and CLI-built parameter structs for the CFS session endpoints (/api/v1/sessions).
template
BOS session-template request/response bodies (/api/v1/templates, /api/v1/templates/{name}/sessions). HTTP request/response bodies and CLI-built parameter structs for the BOS session template endpoints (/api/v1/templates, /api/v1/templates/{name}/sessions).