use manta_backend_dispatcher::types::pcs::power_status::types::PowerStatusAll;
use super::*;
impl PCSTrait for StaticBackendDispatcher {
async fn power_status(
&self,
auth_token: &str,
nodes: &[String],
power_status_filter: Option<&str>,
management_state_filter: Option<&str>,
) -> Result<PowerStatusAll, Error> {
dispatch!(
self,
power_status,
auth_token,
nodes,
power_status_filter,
management_state_filter
)
}
async fn pcs_transitions_post(
&self,
auth_token: &str,
operation: &str,
nodes: &[String],
) -> Result<TransitionStartOutput, Error> {
match self {
Self::CSM(b) => {
PCSTrait::pcs_transitions_post(b, auth_token, operation, nodes).await
}
Self::OCHAMI(b) => {
PCSTrait::pcs_transitions_post(b, auth_token, operation, nodes).await
}
}
}
async fn pcs_transitions_get(
&self,
auth_token: &str,
transition_id: &str,
) -> Result<TransitionResponse, Error> {
match self {
Self::CSM(b) => {
PCSTrait::pcs_transitions_get(b, auth_token, transition_id).await
}
Self::OCHAMI(b) => {
PCSTrait::pcs_transitions_get(b, auth_token, transition_id).await
}
}
}
}