MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / prepare_files

Method prepare_files

test_infra/src/lib.rs:533–548  ·  view source on GitHub ↗
(&mut self, tmp_dir: &TempDir, network: &GuestNetworkConfig)

Source from the content-addressed store, hash-verified

531 }
532
533 fn prepare_files(&mut self, tmp_dir: &TempDir, network: &GuestNetworkConfig) {
534 let mut workload_path = dirs::home_dir().unwrap();
535 workload_path.push("workloads");
536
537 let mut osdisk_base_path = workload_path;
538 osdisk_base_path.push(&self.image_name);
539
540 let osdisk_path = String::from(tmp_dir.as_path().join("osdisk.img").to_str().unwrap());
541 let cloudinit_path = self.prepare_cloudinit(tmp_dir, network);
542
543 rate_limited_copy(osdisk_base_path, &osdisk_path)
544 .expect("copying of OS source disk image failed");
545
546 self.cloudinit_path = cloudinit_path;
547 self.osdisk_path = osdisk_path;
548 }
549
550 fn disk(&self, disk_type: DiskType) -> Option<String> {
551 match disk_type {

Callers 1

new_from_ip_rangeMethod · 0.80

Calls 8

rate_limited_copyFunction · 0.85
createFunction · 0.85
newFunction · 0.85
prepare_cloudinitMethod · 0.80
argsMethod · 0.80
pushMethod · 0.45
lenMethod · 0.45
set_lenMethod · 0.45

Tested by

no test coverage detected