manta_server/backend_dispatcher/
hardware_inventory.rs

1//! `HardwareInventory` impl for `StaticBackendDispatcher`.
2
3use super::*;
4
5impl HardwareInventory for StaticBackendDispatcher {
6  async fn get_inventory_hardware(
7    &self,
8    auth_token: &str,
9    xname: &str,
10  ) -> Result<NodeSummary, Error> {
11    dispatch!(self, get_inventory_hardware, auth_token, xname)
12  }
13
14  async fn get_inventory_hardware_query(
15    &self,
16    auth_token: &str,
17    xname: &str,
18    r#type: Option<&str>,
19    children: Option<bool>,
20    parents: Option<bool>,
21    partition: Option<&str>,
22    format: Option<&str>,
23  ) -> Result<HWInventory, Error> {
24    dispatch!(
25      self,
26      get_inventory_hardware_query,
27      auth_token,
28      xname,
29      r#type,
30      children,
31      parents,
32      partition,
33      format
34    )
35  }
36
37  async fn post_inventory_hardware(
38    &self,
39    auth_token: &str,
40    hardware: HWInventoryByLocationList,
41  ) -> Result<HsmActionResponse, Error> {
42    dispatch!(self, post_inventory_hardware, auth_token, hardware)
43  }
44}