update to first proxmox crate split

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2021-10-08 11:19:37 +02:00
parent e3f3359c86
commit 6ef1b649d9
265 changed files with 880 additions and 1036 deletions

View File

@ -17,7 +17,7 @@ use std::convert::TryInto;
use anyhow::{bail, format_err, Error};
use proxmox::tools::Uuid;
use proxmox_uuid::Uuid;
use pbs_api_types::{
Fingerprint, MamAttribute, LtoDriveAndMediaStatus, LtoTapeDrive, Lp17VolumeStatistics,
@ -47,7 +47,7 @@ use crate::{
/// - for autoloader only, try to reload ejected tapes
pub fn open_lto_tape_drive(config: &LtoTapeDrive) -> Result<LtoTapeHandle, Error> {
proxmox::try_block!({
proxmox_lang::try_block!({
let file = open_lto_tape_device(&config.path)?;
let mut handle = LtoTapeHandle::new(file)?;

View File

@ -8,15 +8,13 @@ pub use lto::*;
use std::path::PathBuf;
use anyhow::{bail, format_err, Error};
use ::serde::{Deserialize};
use serde::Deserialize;
use serde_json::Value;
use nix::fcntl::OFlag;
use nix::sys::stat::Mode;
use proxmox::{
tools::{
Uuid,
io::ReadExt,
fs::{
lock_file,
atomic_open_or_create_file,
@ -25,8 +23,10 @@ use proxmox::{
CreateOptions,
}
},
api::section_config::SectionConfigData,
};
use proxmox_io::ReadExt;
use proxmox_section_config::SectionConfigData;
use proxmox_uuid::Uuid;
use pbs_api_types::{VirtualTapeDrive, LtoTapeDrive, Fingerprint};
use pbs_config::key_config::KeyConfig;
@ -364,7 +364,7 @@ pub fn request_and_load_media(
MediaId,
), Error> {
let check_label = |handle: &mut dyn TapeDriver, uuid: &proxmox::tools::Uuid| {
let check_label = |handle: &mut dyn TapeDriver, uuid: &proxmox_uuid::Uuid| {
if let Ok((Some(media_id), _)) = handle.read_label() {
task_log!(
worker,

View File

@ -42,7 +42,7 @@ use crate::{
/// This needs to lock the drive
pub fn open_virtual_tape_drive(config: &VirtualTapeDrive) -> Result<VirtualTapeHandle, Error> {
proxmox::try_block!({
proxmox_lang::try_block!({
let mut lock_path = std::path::PathBuf::from(&config.path);
lock_path.push(".drive.lck");