Skip to main content

manta_shared/shared/params/
template.rs

1//! Parameters for `GET /templates` and `POST /templates/{name}/sessions`.
2
3/// Typed parameters for fetching BOS session templates.
4pub struct GetTemplateParams {
5  /// Exact template name.
6  pub name: Option<String>,
7  /// HSM group whose associated templates should be returned.
8  pub hsm_group: Option<String>,
9  /// Operator default from `cli.toml`'s `parent_hsm_group`, used
10  /// as a fallback for `hsm_group`.
11  pub settings_hsm_group_name: Option<String>,
12  /// Cap on the number of templates returned (most recent first).
13  pub limit: Option<u8>,
14}
15
16/// Parameters for applying a BOS session template.
17pub struct ApplyTemplateParams {
18  /// Optional explicit name for the created BOS session;
19  /// auto-generated when absent.
20  pub bos_session_name: Option<String>,
21  /// Name of an existing BOS session template to instantiate.
22  pub bos_sessiontemplate_name: String,
23  /// Operation to perform: `"boot"`, `"reboot"`, or `"shutdown"`.
24  pub bos_session_operation: String,
25  /// Ansible-style limit expression scoping which template nodes
26  /// are targeted (xnames, NIDs, groups, or roles).
27  pub limit: String,
28  /// When true, include nodes marked as disabled in the hardware
29  /// state manager.
30  pub include_disabled: bool,
31}