(&mut self, tmp_dir: &TempDir, network: &GuestNetworkConfig)
| 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 { |
no test coverage detected