async fn create_nexus(container: &str, mut kiddos: Vec<String>) -> String {
    let mut h = DOCKER_COMPOSE
        .get()
        .unwrap()
        .grpc_handle(container)
        .await
        .unwrap();

    let bdev = h
        .bdev
        .create(BdevUri {
            uri: "malloc:///disk0?size_mb=64".into(),
        })
        .await
        .unwrap();

    kiddos.push(format!("bdev:///{}", bdev.into_inner().name));

    h.mayastor
        .create_nexus(CreateNexusRequest {
            uuid: NEXUS_UUID.to_string(),
            size: 60 * 1024 * 1024,
            children: kiddos,
        })
        .await
        .unwrap();

    let endpoint = h
        .mayastor
        .publish_nexus(PublishNexusRequest {
            uuid: NEXUS_UUID.into(),
            share: 1,
            ..Default::default()
        })
        .await
        .unwrap();

    endpoint.into_inner().device_uri
}
/// create a local malloc bdev, and then use it to create a nexus with the
/// remote targets added. This reflects the current approach where we have
/// children as: bdev:/// and nvmf:// we really should get rid of this
/// asymmetrical composition if we can.
create a local malloc bdev, and then use it to create a nexus with the
remote targets added.
create a local malloc bdev and then use it to create a nexus with the remote targets added .
async fn create_nexus(container: &str, mut kiddos: Vec<String>) -> String {
    let mut h = DOCKER_COMPOSE
        .get()
        .unwrap()
        .grpc_handle(container)
        .await
        .unwrap();
    let bdev = h
        .bdev
        .create(BdevUri {
            uri: "malloc:///disk0?size_mb=64".into(),
        })
        .await
        .unwrap();
    kiddos.push(format!("bdev:///{}", bdev.into_inner().name));
    h.mayastor
        .create_nexus(CreateNexusRequest {
            uuid: NEXUS_UUID.to_string(),
            size: 60 * 1024 * 1024,
            children: kiddos,
        })
        .await
        .unwrap();
    let endpoint = h
        .mayastor
        .publish_nexus(PublishNexusRequest {
            uuid: NEXUS_UUID.into(),
            share: 1,
            ..Default::default()
        })
        .await
        .unwrap();
    endpoint.into_inner().device_uri
}
async fn create_nexus ( container : & str , mut kiddos : Vec < String > ) -> String { let mut h = DOCKER_COMPOSE . get ( ) . unwrap ( ) . grpc_handle ( container ) . await . unwrap ( ) ; let bdev = h . bdev . create ( BdevUri { uri : " " . into ( ) , } ) . await . unwrap ( ) ; kiddos . push ( format ! ( " " bdev into_inner ( ) name ) ) ; h . mayastor . create_nexus ( CreateNexusRequest { uuid : NEXUS_UUID . to_string ( ) , size : 60 * 1024 * 1024 , children : kiddos , } ) . await . unwrap ( ) ; let endpoint = h . mayastor . publish_nexus ( PublishNexusRequest { uuid : NEXUS_UUID . into ( ) , share : 1 , .. Default :: default ( ) } ) . await . unwrap ( ) ; endpoint . into_inner ( ) . device_uri }
create a local malloc bdev, and then use it to create a nexus with the
remote targets added.
create a local malloc bdev and then use it to create a nexus with the remote targets added .
container
&str
kiddos
Vec<String>