manta_server/backend_dispatcher/
component_ethernet_interface.rs

1//! `ComponentEthernetInterfaceTrait` impl for `StaticBackendDispatcher`.
2//!
3//! No HTTP handler currently calls these methods; this file exists so
4//! the dispatcher covers the full trait surface. Without it, a handler
5//! added later would silently hit the trait's "not implemented" default
6//! even when the backend actually does implement the method — the same
7//! class of bug that caused the `apply_sat_image_create_session` issue.
8
9use manta_backend_dispatcher::interfaces::hsm::component_ethernet_interface::ComponentEthernetInterfaceTrait;
10use manta_backend_dispatcher::types::hsm::inventory::ComponentEthernetInterface;
11use serde_json::Value;
12
13use super::*;
14
15impl ComponentEthernetInterfaceTrait for StaticBackendDispatcher {
16  async fn get_all_component_ethernet_interfaces(
17    &self,
18    auth_token: &str,
19  ) -> Result<Vec<ComponentEthernetInterface>, Error> {
20    dispatch!(self, get_all_component_ethernet_interfaces, auth_token)
21  }
22
23  async fn get_component_ethernet_interface(
24    &self,
25    auth_token: &str,
26    eth_interface_id: &str,
27  ) -> Result<ComponentEthernetInterface, Error> {
28    dispatch!(
29      self,
30      get_component_ethernet_interface,
31      auth_token,
32      eth_interface_id
33    )
34  }
35
36  async fn add_component_ethernet_interface(
37    &self,
38    auth_token: &str,
39    component_ethernet_interface: &ComponentEthernetInterface,
40  ) -> Result<(), Error> {
41    dispatch!(
42      self,
43      add_component_ethernet_interface,
44      auth_token,
45      component_ethernet_interface
46    )
47  }
48
49  async fn update_component_ethernet_interface(
50    &self,
51    auth_token: &str,
52    eth_interface_id: &str,
53    description: Option<&str>,
54    ip_address_mapping: (&str, &str),
55  ) -> Result<Value, Error> {
56    dispatch!(
57      self,
58      update_component_ethernet_interface,
59      auth_token,
60      eth_interface_id,
61      description,
62      ip_address_mapping
63    )
64  }
65
66  async fn delete_all_component_ethernet_interfaces(
67    &self,
68    auth_token: &str,
69  ) -> Result<Value, Error> {
70    dispatch!(self, delete_all_component_ethernet_interfaces, auth_token)
71  }
72
73  async fn delete_component_ethernet_interface(
74    &self,
75    auth_token: &str,
76    eth_interface_id: &str,
77  ) -> Result<Value, Error> {
78    dispatch!(
79      self,
80      delete_component_ethernet_interface,
81      auth_token,
82      eth_interface_id
83    )
84  }
85}