manta_server/backend_dispatcher/
component_ethernet_interface.rs1use manta_backend_dispatcher::interfaces::hsm::component_ethernet_interface::ComponentEthernetInterfaceTrait;
15use manta_backend_dispatcher::types::hsm::inventory::ComponentEthernetInterface;
16use serde_json::Value;
17
18use super::*;
19
20impl ComponentEthernetInterfaceTrait for StaticBackendDispatcher {
21 async fn get_all_component_ethernet_interfaces(
23 &self,
24 auth_token: &str,
25 ) -> Result<Vec<ComponentEthernetInterface>, Error> {
26 dispatch!(self, get_all_component_ethernet_interfaces, auth_token)
27 }
28
29 async fn get_component_ethernet_interface(
31 &self,
32 auth_token: &str,
33 eth_interface_id: &str,
34 ) -> Result<ComponentEthernetInterface, Error> {
35 dispatch!(
36 self,
37 get_component_ethernet_interface,
38 auth_token,
39 eth_interface_id
40 )
41 }
42
43 async fn add_component_ethernet_interface(
45 &self,
46 auth_token: &str,
47 component_ethernet_interface: &ComponentEthernetInterface,
48 ) -> Result<(), Error> {
49 dispatch!(
50 self,
51 add_component_ethernet_interface,
52 auth_token,
53 component_ethernet_interface
54 )
55 }
56
57 async fn update_component_ethernet_interface(
61 &self,
62 auth_token: &str,
63 eth_interface_id: &str,
64 description: Option<&str>,
65 ip_address_mapping: (&str, &str),
66 ) -> Result<Value, Error> {
67 dispatch!(
68 self,
69 update_component_ethernet_interface,
70 auth_token,
71 eth_interface_id,
72 description,
73 ip_address_mapping
74 )
75 }
76
77 async fn delete_all_component_ethernet_interfaces(
80 &self,
81 auth_token: &str,
82 ) -> Result<Value, Error> {
83 dispatch!(self, delete_all_component_ethernet_interfaces, auth_token)
84 }
85
86 async fn delete_component_ethernet_interface(
88 &self,
89 auth_token: &str,
90 eth_interface_id: &str,
91 ) -> Result<Value, Error> {
92 dispatch!(
93 self,
94 delete_component_ethernet_interface,
95 auth_token,
96 eth_interface_id
97 )
98 }
99}