update to proxmox-sys 0.2 crate

- imported pbs-api-types/src/common_regex.rs from old proxmox crate
- use hex crate to generate/parse hex digest
- remove all reference to proxmox crate (use proxmox-sys and
  proxmox-serde instead)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer
2021-11-23 17:57:00 +01:00
parent bd00ff10e4
commit 25877d05ac
201 changed files with 627 additions and 1535 deletions

View File

@ -13,18 +13,18 @@ use serde_json::Value;
use tokio::sync::Semaphore;
use pathpatterns::{MatchEntry, MatchPattern, MatchType, Pattern};
use proxmox::{identity, sortable};
use proxmox_router::{
list_subdirs_api_method,
ApiHandler, ApiMethod, ApiResponseFuture, Permission, Router, RpcEnvironment, SubdirMap,
};
use proxmox_schema::*;
use proxmox_async::zip::zip_directory;
use proxmox_sys::fs::read_subdir;
use proxmox_sys::{identity, sortable};
use pbs_api_types::file_restore::RestoreDaemonStatus;
use pbs_client::pxar::{create_archive, Flags, PxarCreateOptions, ENCODER_MAX_ENTRIES};
use pbs_datastore::catalog::{ArchiveEntry, DirEntryAttribute};
use pbs_tools::fs::read_subdir;
use pbs_tools::json::required_string_param;
use pxar::encoder::aio::TokioWriter;

View File

@ -9,11 +9,11 @@ use anyhow::{bail, format_err, Error};
use lazy_static::lazy_static;
use log::{info, warn};
use proxmox::tools::fs;
use proxmox_sys::fs;
use proxmox_sys::command::run_command;
use proxmox_schema::const_regex;
use pbs_api_types::BLOCKDEVICE_NAME_REGEX;
use pbs_tools::run_command;
const_regex! {
VIRTIO_PART_REGEX = r"^vd[a-z]+(\d+)$";
@ -371,7 +371,7 @@ impl DiskState {
// create mapping for virtio drives and .fidx files (via serial description)
// note: disks::DiskManager relies on udev, which we don't have
for entry in pbs_tools::fs::scan_subdir(
for entry in proxmox_sys::fs::scan_subdir(
libc::AT_FDCWD,
"/sys/block",
&BLOCKDEVICE_NAME_REGEX,
@ -416,7 +416,7 @@ impl DiskState {
}
let mut parts = Vec::new();
for entry in pbs_tools::fs::scan_subdir(
for entry in proxmox_sys::fs::scan_subdir(
libc::AT_FDCWD,
sys_path,
&VIRTIO_PART_REGEX,