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#[derive(serde::Deserialize, serde::Serialize, utoipa::ToSchema)]
22pub struct UpdateRedfishEndpointParams {
23 /// Xname identifying the BMC (e.g. `x3000c0s1b0`).
24 pub id: String,
25 /// Optional human-readable name.
26 pub name: Option<String>,
27 /// Hostname portion of the BMC FQDN.
28 pub hostname: Option<String>,
29 /// Domain portion of the BMC FQDN.
30 pub domain: Option<String>,
31 /// Full FQDN; overrides hostname+domain when set.
32 pub fqdn: Option<String>,
33 /// Whether the endpoint is enabled for discovery.
34 pub enabled: bool,
35 /// BMC username for Redfish authentication.
36 pub user: Option<String>,
37 /// BMC password for Redfish authentication.
38 pub password: Option<String>,
39 /// Use SSDP for automatic endpoint discovery.
40 pub use_ssdp: bool,
41 /// Whether a MAC address is required for geolocation.
42 pub mac_required: bool,
43 /// BMC MAC address (colon-separated).
44 pub mac_addr: Option<String>,
45 /// BMC IP address (IPv4 or IPv6).
46 pub ip_address: Option<String>,
47 /// Trigger a rediscovery pass when the endpoint is updated.
48 pub rediscover_on_update: bool,
49 /// ID of a discovery template to apply.
50 pub template_id: Option<String>,
51}