pub trait BackendTrait {
Show 25 methods
// Required methods
fn test_backend_trait(&self) -> String;
fn get_api_token(
&self,
_site_name: &str,
) -> impl Future<Output = Result<String, Error>> + Send;
fn get_group_name_available(
&self,
_jwt_token: &str,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send;
fn get_member_vec_from_group_name_vec(
&self,
_auth_token: &str,
_hsm_group_name_vec: Vec<String>,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send;
fn get_group_map_and_filter_by_group_vec(
&self,
_auth_token: &str,
_hsm_name_vec: Vec<&str>,
) -> impl Future<Output = Result<HashMap<String, Vec<String>>, Error>> + Send;
fn post_member(
&self,
auth_token: &str,
group_label: &str,
members: &str,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn add_members_to_group(
&self,
auth_token: &str,
group_label: &str,
members: Vec<&str>,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send;
fn delete_member_from_group(
&self,
auth_token: &str,
group_label: &str,
xname: &str,
) -> impl Future<Output = Result<(), Error>> + Send;
fn update_group_members(
&self,
auth_token: &str,
group_name: &str,
members_to_remove: &Vec<String>,
members_to_add: &Vec<String>,
) -> impl Future<Output = Result<(), Error>> + Send;
fn get_all_groups(
&self,
_auth_token: &str,
) -> impl Future<Output = Result<Vec<Group>, Error>> + Send;
fn get_group(
&self,
_auth_token: &str,
_hsm_name: &str,
) -> impl Future<Output = Result<Group, Error>> + Send;
fn add_group(
&self,
_auth_token: &str,
_hsm_name: Group,
) -> impl Future<Output = Result<Group, Error>> + Send;
fn delete_group(
&self,
_auth_token: &str,
_hsm_group_label: &str,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn migrate_group_members(
&self,
shasta_token: &str,
target_hsm_group_name: &str,
parent_hsm_group_name: &str,
new_target_hsm_members: Vec<&str>,
) -> impl Future<Output = Result<(Vec<String>, Vec<String>), Error>> + Send;
fn post_nodes(
&self,
auth_token: &str,
component: ComponentArrayPostArray,
) -> impl Future<Output = Result<(), Error>> + Send;
fn delete_node(
&self,
auth_token: &str,
id: &str,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn get_inventory_hardware_query(
&self,
auth_token: &str,
xname: &str,
type: Option<&str>,
children: Option<bool>,
parents: Option<bool>,
partition: Option<&str>,
format: Option<&str>,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn post_inventory_hardware(
&self,
auth_token: &str,
hardware: HWInventoryByLocationList,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn power_on_sync(
&self,
_auth_token: &str,
_nodes: &[String],
) -> impl Future<Output = Result<Value, Error>> + Send;
fn power_off_sync(
&self,
_auth_token: &str,
_nodes: &[String],
_force: bool,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn power_reset_sync(
&self,
_auth_token: &str,
_nodes: &[String],
_force: bool,
) -> impl Future<Output = Result<Value, Error>> + Send;
fn get_bootparameters(
&self,
_auth_token: &str,
_nodes: &[String],
) -> impl Future<Output = Result<Vec<BootParameters>, Error>> + Send;
fn update_bootparameters(
&self,
_auth_token: &str,
_boot_parameters: &BootParameters,
) -> impl Future<Output = Result<(), Error>> + Send;
fn get_hsm_map_and_filter_by_hsm_name_vec(
&self,
auth_token: &str,
hsm_name_vec: Vec<&str>,
) -> impl Future<Output = Result<HashMap<String, Vec<String>>, Error>> + Send;
fn nid_to_xname(
&self,
auth_token: &str,
user_input_nid: &str,
is_regex: bool,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send;
}Required Methods§
fn test_backend_trait(&self) -> String
fn get_api_token( &self, _site_name: &str, ) -> impl Future<Output = Result<String, Error>> + Send
fn get_group_name_available( &self, _jwt_token: &str, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send
fn get_member_vec_from_group_name_vec( &self, _auth_token: &str, _hsm_group_name_vec: Vec<String>, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send
fn get_group_map_and_filter_by_group_vec( &self, _auth_token: &str, _hsm_name_vec: Vec<&str>, ) -> impl Future<Output = Result<HashMap<String, Vec<String>>, Error>> + Send
fn post_member( &self, auth_token: &str, group_label: &str, members: &str, ) -> impl Future<Output = Result<Value, Error>> + Send
fn add_members_to_group( &self, auth_token: &str, group_label: &str, members: Vec<&str>, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send
fn delete_member_from_group( &self, auth_token: &str, group_label: &str, xname: &str, ) -> impl Future<Output = Result<(), Error>> + Send
fn update_group_members( &self, auth_token: &str, group_name: &str, members_to_remove: &Vec<String>, members_to_add: &Vec<String>, ) -> impl Future<Output = Result<(), Error>> + Send
fn get_all_groups( &self, _auth_token: &str, ) -> impl Future<Output = Result<Vec<Group>, Error>> + Send
fn get_group( &self, _auth_token: &str, _hsm_name: &str, ) -> impl Future<Output = Result<Group, Error>> + Send
fn add_group( &self, _auth_token: &str, _hsm_name: Group, ) -> impl Future<Output = Result<Group, Error>> + Send
fn delete_group( &self, _auth_token: &str, _hsm_group_label: &str, ) -> impl Future<Output = Result<Value, Error>> + Send
fn migrate_group_members( &self, shasta_token: &str, target_hsm_group_name: &str, parent_hsm_group_name: &str, new_target_hsm_members: Vec<&str>, ) -> impl Future<Output = Result<(Vec<String>, Vec<String>), Error>> + Send
fn post_nodes( &self, auth_token: &str, component: ComponentArrayPostArray, ) -> impl Future<Output = Result<(), Error>> + Send
fn delete_node( &self, auth_token: &str, id: &str, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_inventory_hardware_query( &self, auth_token: &str, xname: &str, type: Option<&str>, children: Option<bool>, parents: Option<bool>, partition: Option<&str>, format: Option<&str>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn post_inventory_hardware( &self, auth_token: &str, hardware: HWInventoryByLocationList, ) -> impl Future<Output = Result<Value, Error>> + Send
fn power_on_sync( &self, _auth_token: &str, _nodes: &[String], ) -> impl Future<Output = Result<Value, Error>> + Send
fn power_off_sync( &self, _auth_token: &str, _nodes: &[String], _force: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn power_reset_sync( &self, _auth_token: &str, _nodes: &[String], _force: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_bootparameters( &self, _auth_token: &str, _nodes: &[String], ) -> impl Future<Output = Result<Vec<BootParameters>, Error>> + Send
fn update_bootparameters( &self, _auth_token: &str, _boot_parameters: &BootParameters, ) -> impl Future<Output = Result<(), Error>> + Send
fn get_hsm_map_and_filter_by_hsm_name_vec( &self, auth_token: &str, hsm_name_vec: Vec<&str>, ) -> impl Future<Output = Result<HashMap<String, Vec<String>>, Error>> + Send
Sourcefn nid_to_xname(
&self,
auth_token: &str,
user_input_nid: &str,
is_regex: bool,
) -> impl Future<Output = Result<Vec<String>, Error>> + Send
fn nid_to_xname( &self, auth_token: &str, user_input_nid: &str, is_regex: bool, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send
Get list of xnames from NIDs The list of NIDs can be: - comma separated list of NIDs (eg: nid000001,nid000002,nid000003) - regex (eg: nid00000.*) - hostlist (eg: nid0000[01-15])
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.