manta_server/backend_dispatcher/
boot_parameters.rs

1//! Dispatches `BootParametersTrait` methods to csm-rs or ochami-rs.
2
3use manta_backend_dispatcher::{
4  error::Error, interfaces::bss::BootParametersTrait,
5  types::bss::BootParameters,
6};
7
8use StaticBackendDispatcher::*;
9
10use crate::manta_backend_dispatcher::StaticBackendDispatcher;
11
12impl BootParametersTrait for StaticBackendDispatcher {
13  async fn get_all_bootparameters(
14    &self,
15    auth_token: &str,
16  ) -> Result<Vec<BootParameters>, Error> {
17    dispatch!(self, get_all_bootparameters, auth_token)
18  }
19
20  async fn get_bootparameters(
21    &self,
22    auth_token: &str,
23    nodes: &[String],
24  ) -> Result<Vec<BootParameters>, Error> {
25    dispatch!(self, get_bootparameters, auth_token, nodes)
26  }
27
28  async fn add_bootparameters(
29    &self,
30    auth_token: &str,
31    boot_parameters: &BootParameters,
32  ) -> Result<(), Error> {
33    dispatch!(self, add_bootparameters, auth_token, boot_parameters)
34  }
35
36  async fn update_bootparameters(
37    &self,
38    auth_token: &str,
39    boot_parameters: &BootParameters,
40  ) -> Result<(), Error> {
41    dispatch!(self, update_bootparameters, auth_token, boot_parameters)
42  }
43
44  async fn delete_bootparameters(
45    &self,
46    auth_token: &str,
47    boot_parameters: &BootParameters,
48  ) -> Result<String, Error> {
49    dispatch!(self, delete_bootparameters, auth_token, boot_parameters)
50  }
51}