MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / insert_test_record

Function insert_test_record

crates/openshell-driver-vm/src/driver.rs:6766–6795  ·  view source on GitHub ↗
(
        driver: &VmDriver,
        sandbox_id: &str,
        state_dir: PathBuf,
        child: Child,
    )

Source from the content-addressed store, hash-verified

6764 }
6765
6766 async fn insert_test_record(
6767 driver: &VmDriver,
6768 sandbox_id: &str,
6769 state_dir: PathBuf,
6770 child: Child,
6771 ) {
6772 let sandbox = Sandbox {
6773 id: sandbox_id.to_string(),
6774 name: sandbox_id.to_string(),
6775 ..Default::default()
6776 };
6777 let process = Arc::new(Mutex::new(VmProcess {
6778 child,
6779 deleting: false,
6780 }));
6781
6782 let mut registry = driver.registry.lock().await;
6783 registry.insert(
6784 sandbox_id.to_string(),
6785 SandboxRecord {
6786 snapshot: sandbox,
6787 state_dir,
6788 process: Some(process),
6789 provisioning_task: None,
6790 gpu_bdf: None,
6791 qemu_network_allocated: false,
6792 deleting: false,
6793 },
6794 );
6795 }
6796
6797 use crate::lifecycle::{
6798 BackendFeature, LaunchPlan, LifecycleError, LifecycleExtension, LifecycleExtensionRegistry,

Calls

no outgoing calls

Tested by

no test coverage detected