Trait BackendTrait

Source
pub trait BackendTrait {
    // Required methods
    fn test_backend_trait(&self) -> String;
    fn get_api_token(
        &self,
        _site_name: &str,
    ) -> impl Future<Output = Result<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 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_inventory_hardware(
        &self,
        auth_token: &str,
        hardware: HWInventoryByLocationList,
    ) -> 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 nid_to_xname(
        &self,
        auth_token: &str,
        user_input_nid: &str,
        is_regex: bool,
    ) -> impl Future<Output = Result<Vec<String>, Error>> + Send;
}

Required Methods§

Source

fn test_backend_trait(&self) -> String

Source

fn get_api_token( &self, _site_name: &str, ) -> impl Future<Output = Result<String, Error>> + Send

Source

fn post_member( &self, auth_token: &str, group_label: &str, members: &str, ) -> impl Future<Output = Result<Value, Error>> + Send

Source

fn add_members_to_group( &self, auth_token: &str, group_label: &str, members: Vec<&str>, ) -> impl Future<Output = Result<Vec<String>, Error>> + Send

Source

fn delete_member_from_group( &self, auth_token: &str, group_label: &str, xname: &str, ) -> impl Future<Output = Result<(), Error>> + Send

Source

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

Source

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

Source

fn post_inventory_hardware( &self, auth_token: &str, hardware: HWInventoryByLocationList, ) -> impl Future<Output = Result<Value, Error>> + Send

Source

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

Source

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.

Implementors§