pub async fn default_with_network(
    aingle_path: &Path,
    create: Create,
    directory: Option<PathBuf>,
    happ: PathBuf,
    app_id: InstalledAppId,
) -> anyhow::Result<PathBuf> {
    let Create { network, root, .. } = create;
    let path = crate::generate::generate(network.map(|n| n.into_inner().into()), root, directory)?;
    let conductor = run_async(aingle_path, path.clone(), None).await?;
    let mut cmd = CmdRunner::new(conductor.0).await;
    let install_bundle = InstallAppBundle {
        app_id: Some(app_id),
        agent_key: None,
        path: happ,
        uid: None,
    };
    crate::calls::install_app_bundle(&mut cmd, install_bundle).await?;
    Ok(path)
}
/// Generates a new sandbox with a default [`ConductorConfig`]
/// and optional network.
/// Then installs the safs with a new app per saf.
Generates a new sandbox with a default [`ConductorConfig`]
and optional network.
Then installs the safs with a new app per saf.
Generates a new sandbox with a default [ ` ConductorConfig ` ] and optional network . Then installs the safs with a new app per saf .
pub async fn default_with_network(
    aingle_path: &Path,
    create: Create,
    directory: Option<PathBuf>,
    happ: PathBuf,
    app_id: InstalledAppId,
) -> anyhow::Result<PathBuf> {
    let Create { network, root, .. } = create;
    let path = crate::generate::generate(network.map(|n| n.into_inner().into()), root, directory)?;
    let conductor = run_async(aingle_path, path.clone(), None).await?;
    let mut cmd = CmdRunner::new(conductor.0).await;
    let install_bundle = InstallAppBundle {
        app_id: Some(app_id),
        agent_key: None,
        path: happ,
        uid: None,
    };
    crate::calls::install_app_bundle(&mut cmd, install_bundle).await?;
    Ok(path)
}
pub async fn default_with_network ( aingle_path : & Path , create : Create , directory : Option < PathBuf > , happ : PathBuf , app_id : InstalledAppId , ) -> anyhow :: Result < PathBuf > { let Create { network , root , .. } = create ; let path = crate :: generate :: generate ( network . map ( | n | n . into_inner ( ) . into ( ) ) , root , directory ) ? ; let conductor = run_async ( aingle_path , path . clone ( ) , None ) . await ? ; let mut cmd = CmdRunner :: new ( conductor . 0 ) . await ; let install_bundle = InstallAppBundle { app_id : Some ( app_id ) , agent_key : None , path : happ , uid : None , } ; crate :: calls :: install_app_bundle ( & mut cmd , install_bundle ) . await ? ; Ok ( path ) }
Generates a new sandbox with a default [`ConductorConfig`]
and optional network.
Generates a new sandbox with a default [ ` ConductorConfig ` ] and optional network .
aingle_path
&Path
create
Create
directory
Option<PathBuf>
happ
PathBuf
app_id
InstalledAppId
aingle_path
&Path
create
Create
directory
Option<PathBuf>
happ
PathBuf
app_id
InstalledAppId