manta_server/backend_dispatcher/
pcs.rs1use manta_backend_dispatcher::types::pcs::power_status::types::PowerStatusAll;
10
11use super::*;
12
13impl PCSTrait for StaticBackendDispatcher {
14 async fn power_status(
15 &self,
16 auth_token: &str,
17 nodes: &[String],
18 power_status_filter: Option<&str>,
19 management_state_filter: Option<&str>,
20 ) -> Result<PowerStatusAll, Error> {
21 dispatch!(
22 self,
23 power_status,
24 auth_token,
25 nodes,
26 power_status_filter,
27 management_state_filter
28 )
29 }
30
31 async fn pcs_transitions_post(
32 &self,
33 auth_token: &str,
34 operation: &str,
35 nodes: &[String],
36 ) -> Result<TransitionStartOutput, Error> {
37 match self {
40 Self::CSM(b) => {
41 PCSTrait::pcs_transitions_post(b, auth_token, operation, nodes).await
42 }
43 Self::OCHAMI(b) => {
44 PCSTrait::pcs_transitions_post(b, auth_token, operation, nodes).await
45 }
46 }
47 }
48
49 async fn pcs_transitions_get(
50 &self,
51 auth_token: &str,
52 transition_id: &str,
53 ) -> Result<TransitionResponse, Error> {
54 match self {
59 Self::CSM(b) => {
60 PCSTrait::pcs_transitions_get(b, auth_token, transition_id).await
61 }
62 Self::OCHAMI(b) => {
63 PCSTrait::pcs_transitions_get(b, auth_token, transition_id).await
64 }
65 }
66 }
67}