(tmp_dir: &TempDir)
| 38 | } |
| 39 | |
| 40 | pub(crate) fn new_dbus_api(tmp_dir: &TempDir) -> Self { |
| 41 | // `tmp_dir` is in the form of "/tmp/chXXXXXX" |
| 42 | // and we take the `chXXXXXX` part as a unique identifier for the guest |
| 43 | let id = tmp_dir.as_path().file_name().unwrap().to_str().unwrap(); |
| 44 | |
| 45 | Self::DBusApi( |
| 46 | format!("org.cloudhypervisor.{id}"), |
| 47 | format!("/org/cloudhypervisor/{id}"), |
| 48 | ) |
| 49 | } |
| 50 | |
| 51 | pub(crate) fn guest_args(&self) -> Vec<String> { |
| 52 | match self { |