fn validate(self) -> Result<(ScConfig, CreateCustomSpuConfig), CliError> {
        // profile specific configurations (target server)
        let target_server = ScConfig::new(self.sc, self.profile)?;

        // create custom spu config
        let cfg = CreateCustomSpuConfig {
            id: self.id,
            name: self.name.unwrap_or(format!("custom-spu-{}", self.id)),
            public_server: TryFrom::try_from(self.public_server)?,
            private_server: TryFrom::try_from(self.private_server)?,
            rack: self.rack.clone(),
        };

        // return server separately from config
        Ok((target_server, cfg))
    }
/// Validate cli options. Generate target-server and create custom spu config.
Validate cli options. Generate target-server and create custom spu config.
Validate cli options . Generate target - server and create custom spu config .
fn validate(self) -> Result<(ScConfig, CreateCustomSpuConfig), CliError> {
        // profile specific configurations (target server)
        let target_server = ScConfig::new(self.sc, self.profile)?;
        // create custom spu config
        let cfg = CreateCustomSpuConfig {
            id: self.id,
            name: self.name.unwrap_or(format!("custom-spu-{}", self.id)),
            public_server: TryFrom::try_from(self.public_server)?,
            private_server: TryFrom::try_from(self.private_server)?,
            rack: self.rack.clone(),
        };
        // return server separately from config
        Ok((target_server, cfg))
    }
fn validate ( self ) -> Result < ( ScConfig , CreateCustomSpuConfig ) , CliError > { // profile specific configurations (target server) let target_server = ScConfig :: new ( self . sc , self . profile ) ? ; // create custom spu config let cfg = CreateCustomSpuConfig { id : self . id , name : self . name . unwrap_or ( format ! ( " " self id ) ) , public_server : TryFrom :: try_from ( self . public_server ) ? , private_server : TryFrom :: try_from ( self . private_server ) ? , rack : self . rack . clone ( ) , } ; // return server separately from config Ok ( ( target_server , cfg ) ) }
Validate cli options.
Validate cli options .
self
self