another import cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
///! Daemon binary to run inside a micro-VM for secure single file restore of disk images
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use lazy_static::lazy_static;
|
||||
use log::{error, info};
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::os::unix::{
|
||||
io::{FromRawFd, RawFd},
|
||||
net,
|
||||
@ -10,16 +8,16 @@ use std::os::unix::{
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use lazy_static::lazy_static;
|
||||
use log::{error, info};
|
||||
use tokio::sync::mpsc;
|
||||
use tokio_stream::wrappers::ReceiverStream;
|
||||
|
||||
use pbs_client::DEFAULT_VSOCK_PORT;
|
||||
|
||||
use proxmox::api::RpcEnvironmentType;
|
||||
use proxmox_backup::server::{rest::*, ApiConfig};
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use pbs_client::DEFAULT_VSOCK_PORT;
|
||||
|
||||
mod proxmox_restore_daemon;
|
||||
use proxmox_restore_daemon::*;
|
||||
|
@ -9,10 +9,10 @@ use futures::FutureExt;
|
||||
use hyper::http::request::Parts;
|
||||
use hyper::{header, Body, Response, StatusCode};
|
||||
use log::error;
|
||||
use pathpatterns::{MatchEntry, MatchPattern, MatchType, Pattern};
|
||||
use serde_json::Value;
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
use pathpatterns::{MatchEntry, MatchPattern, MatchType, Pattern};
|
||||
use proxmox::api::{
|
||||
api, schema::*, ApiHandler, ApiMethod, ApiResponseFuture, Permission, Router, RpcEnvironment,
|
||||
SubdirMap,
|
||||
|
@ -1,10 +1,11 @@
|
||||
//! Authentication via a static ticket file
|
||||
use anyhow::{bail, format_err, Error};
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
|
||||
use proxmox_backup::api2::types::Authid;
|
||||
use anyhow::{bail, format_err, Error};
|
||||
|
||||
use pbs_api_types::Authid;
|
||||
|
||||
use proxmox_backup::config::cached_user_info::CachedUserInfo;
|
||||
use proxmox_backup::server::auth::{ApiAuth, AuthError};
|
||||
|
||||
|
@ -1,18 +1,19 @@
|
||||
//! Low-level disk (image) access functions for file restore VMs.
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use lazy_static::lazy_static;
|
||||
use log::{info, warn};
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::fs::{create_dir_all, File};
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use lazy_static::lazy_static;
|
||||
use log::{info, warn};
|
||||
|
||||
use proxmox::const_regex;
|
||||
use proxmox::tools::fs;
|
||||
use proxmox_backup::api2::types::BLOCKDEVICE_NAME_REGEX;
|
||||
use proxmox_backup::tools::run_command;
|
||||
|
||||
use pbs_api_types::BLOCKDEVICE_NAME_REGEX;
|
||||
use pbs_tools::run_command;
|
||||
|
||||
const_regex! {
|
||||
VIRTIO_PART_REGEX = r"^vd[a-z]+(\d+)$";
|
||||
|
@ -1,5 +1,6 @@
|
||||
//! Tokio-based watchdog that shuts down the VM if not pinged for TIMEOUT
|
||||
use std::sync::atomic::{AtomicI64, Ordering};
|
||||
|
||||
use proxmox::tools::time::epoch_i64;
|
||||
|
||||
const TIMEOUT: i64 = 600; // seconds
|
||||
|
Reference in New Issue
Block a user