Function brane_cli::instance::add

source ·
pub async fn add(
    name: String,
    hostname: Hostname,
    api_port: u16,
    drv_port: u16,
    user: String,
    use_immediately: bool,
    unchecked: bool,
    force: bool,
) -> Result<(), Error>
Expand description

Registers a new instance to which we can hot-swap using switch.

§Arguments

  • name: The name of the instance.
  • hostname: The hostname of the instance.
  • api_port: The port where we can find the API service.
  • drv_port: The port where we can find the driver service.
  • user: The name of the user to login as.
  • use_immediately: Whether to switch to it or not.
  • unchecked: Whether to skip instance alive checking (true) or not (false).
  • force: Whether to ask for permission before overwriting an existing instance.

§Errors

This function errors if we failed to generate any files, or if some check failed for this instance.