manta_shared/shared/params/redfish_endpoints.rs
1//! Parameters for `GET`, `POST`, and `PUT` on `/redfish-endpoints`.
2
3/// Typed parameters for fetching Redfish endpoints.
4///
5/// All fields are optional filters; setting none returns every
6/// registered endpoint.
7pub struct GetRedfishEndpointsParams {
8 /// Exact endpoint ID (BMC xname).
9 pub id: Option<String>,
10 /// FQDN substring filter.
11 pub fqdn: Option<String>,
12 /// UUID exact match.
13 pub uuid: Option<String>,
14 /// MAC-address exact match (colon-separated hex).
15 pub macaddr: Option<String>,
16 /// IP-address exact match (IPv4 or IPv6).
17 pub ipaddress: Option<String>,
18}
19
20/// Typed parameters for updating/adding a Redfish endpoint.
21//
22// The four bool fields (`enabled`, `use_ssdp`, `mac_required`,
23// `rediscover_on_update`) are independent BMC feature toggles defined
24// by the upstream HSM Redfish-endpoints API; there is no enum that
25// captures them as a single mode, so the `struct_excessive_bools` lint
26// is silenced here.
27#[allow(clippy::struct_excessive_bools)]
28#[derive(serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
29pub struct UpdateRedfishEndpointParams {
30 /// Xname identifying the BMC (e.g. `x3000c0s1b0`).
31 pub id: String,
32 /// Optional human-readable name.
33 pub name: Option<String>,
34 /// Hostname portion of the BMC FQDN.
35 pub hostname: Option<String>,
36 /// Domain portion of the BMC FQDN.
37 pub domain: Option<String>,
38 /// Full FQDN; overrides hostname+domain when set.
39 pub fqdn: Option<String>,
40 /// Whether the endpoint is enabled for discovery.
41 pub enabled: bool,
42 /// BMC username for Redfish authentication.
43 pub user: Option<String>,
44 /// BMC password for Redfish authentication.
45 pub password: Option<String>,
46 /// Use SSDP for automatic endpoint discovery.
47 pub use_ssdp: bool,
48 /// Whether a MAC address is required for geolocation.
49 pub mac_required: bool,
50 /// BMC MAC address (colon-separated).
51 pub mac_addr: Option<String>,
52 /// BMC IP address (IPv4 or IPv6).
53 pub ip_address: Option<String>,
54 /// Trigger a rediscovery pass when the endpoint is updated.
55 pub rediscover_on_update: bool,
56 /// ID of a discovery template to apply.
57 pub template_id: Option<String>,
58}