fn validate(self) -> Result<(ScConfig, FlvCreateSpuGroupRequest), CliError> {
        let target_server = ScConfig::new(self.sc, self.profile)?;

        let grp_config = self
            .storage
            .map(|storage| GroupConfig::with_storage(storage));

        let group = FlvCreateSpuGroupRequest {
            name: self.name,
            replicas: self.replicas,
            min_id: self.min_id,
            config: grp_config.map(|cf| cf.into()).unwrap_or_default(),
            rack: self.rack,
        };
        // return server separately from config

        Ok((target_server, group))
    }
/// Validate cli options. Generate target-server and create spu group config.
Validate cli options. Generate target-server and create spu group config.
Validate cli options . Generate target - server and create spu group config .
fn validate(self) -> Result<(ScConfig, FlvCreateSpuGroupRequest), CliError> {
        let target_server = ScConfig::new(self.sc, self.profile)?;
        let grp_config = self
            .storage
            .map(|storage| GroupConfig::with_storage(storage));
        let group = FlvCreateSpuGroupRequest {
            name: self.name,
            replicas: self.replicas,
            min_id: self.min_id,
            config: grp_config.map(|cf| cf.into()).unwrap_or_default(),
            rack: self.rack,
        };
        // return server separately from config
        Ok((target_server, group))
    }
fn validate ( self ) -> Result < ( ScConfig , FlvCreateSpuGroupRequest ) , CliError > { let target_server = ScConfig :: new ( self . sc , self . profile ) ? ; let grp_config = self . storage . map ( | storage | GroupConfig :: with_storage ( storage ) ) ; let group = FlvCreateSpuGroupRequest { name : self . name , replicas : self . replicas , min_id : self . min_id , config : grp_config . map ( | cf | cf . into ( ) ) . unwrap_or_default ( ) , rack : self . rack , } ; // return server separately from config Ok ( ( target_server , group ) ) }
Validate cli options.
Validate cli options .
self
self