use serde::{Deserialize, Serialize};
use serde_json::json;
-use proxmox::tools::fs::lock_file;
+use proxmox_sys::fs::lock_file;
use pbs_client::{DEFAULT_VSOCK_PORT, BackupRepository, VsockClient};
use pbs_datastore::backup_info::BackupDir;
fn make_name(repo: &BackupRepository, snap: &BackupDir) -> String {
let full = format!("qemu_{}/{}", repo, snap);
- proxmox::tools::systemd::escape_unit(&full, false)
+ proxmox_sys::systemd::escape_unit(&full, false)
}
/// remove non-responsive VMs from given map, returns 'true' if map was modified
let resp = client
.get("api2/json/status", Some(json!({"keep-timeout": true})))
.await;
- let name = proxmox::tools::systemd::unescape_unit(n)
+ let name = proxmox_sys::systemd::unescape_unit(n)
.unwrap_or_else(|_| "<invalid name>".to_owned());
let mut extra = json!({"pid": s.pid, "cid": s.cid});
fn stop(&self, id: String) -> Async<Result<(), Error>> {
async move {
- let name = proxmox::tools::systemd::escape_unit(&id, false);
+ let name = proxmox_sys::systemd::escape_unit(&id, false);
let mut map = VMStateMap::load()?;
let map_mod = cleanup_map(&mut map.map).await;
match map.map.get(&name) {
match VMStateMap::load_read_only() {
Ok(state) => state
.iter()
- .filter_map(|(name, _)| proxmox::tools::systemd::unescape_unit(&name).ok())
+ .filter_map(|(name, _)| proxmox_sys::systemd::unescape_unit(&name).ok())
.collect(),
Err(_) => Vec::new(),
}