update to first proxmox crate split
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
use anyhow::format_err;
|
||||
|
||||
use proxmox::api::UserInformation;
|
||||
use proxmox_router::UserInformation;
|
||||
|
||||
use pbs_tools::ticket::{self, Ticket};
|
||||
use pbs_config::{token_shadow, CachedUserInfo};
|
||||
|
@ -4,8 +4,8 @@ use serde_json::json;
|
||||
use handlebars::{Handlebars, Helper, Context, RenderError, RenderContext, Output, HelperResult, TemplateError};
|
||||
|
||||
use proxmox::tools::email::sendmail;
|
||||
use proxmox::api::schema::{ApiType, parse_property_string};
|
||||
use proxmox::try_block;
|
||||
use proxmox_lang::try_block;
|
||||
use proxmox_schema::{parse_property_string, ApiType};
|
||||
|
||||
use pbs_tools::format::HumanByte;
|
||||
use pbs_api_types::{
|
||||
|
@ -147,7 +147,7 @@ pub fn update_job_last_run_time(jobtype: &str, jobname: &str) -> Result<(), Erro
|
||||
Ok(job) => job,
|
||||
Err(_) => return Ok(()), // was locked (running), so do not update
|
||||
};
|
||||
let time = proxmox::tools::time::epoch_i64();
|
||||
let time = proxmox_time::epoch_i64();
|
||||
|
||||
job.state = match JobState::load(jobtype, jobname)? {
|
||||
JobState::Created { .. } => JobState::Created { time },
|
||||
@ -220,7 +220,7 @@ impl JobState {
|
||||
}
|
||||
} else {
|
||||
Ok(JobState::Created {
|
||||
time: proxmox::tools::time::epoch_i64() - 30,
|
||||
time: proxmox_time::epoch_i64() - 30,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -241,7 +241,7 @@ impl Job {
|
||||
jobtype: jobtype.to_string(),
|
||||
jobname: jobname.to_string(),
|
||||
state: JobState::Created {
|
||||
time: proxmox::tools::time::epoch_i64(),
|
||||
time: proxmox_time::epoch_i64(),
|
||||
},
|
||||
_lock,
|
||||
})
|
||||
|
@ -9,8 +9,9 @@ use std::time::SystemTime;
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use serde_json::json;
|
||||
use http::StatusCode;
|
||||
|
||||
use proxmox::api::error::{HttpError, StatusCode};
|
||||
use proxmox_router::HttpError;
|
||||
|
||||
use pbs_api_types::{Authid, SnapshotListItem, GroupListItem};
|
||||
use pbs_datastore::{DataStore, BackupInfo, BackupDir, BackupGroup, StoreProgress};
|
||||
@ -306,7 +307,7 @@ async fn pull_snapshot(
|
||||
let tmp_manifest_blob = DataBlob::load_from_reader(&mut tmp_manifest_file)?;
|
||||
|
||||
if manifest_name.exists() {
|
||||
let manifest_blob = proxmox::try_block!({
|
||||
let manifest_blob = proxmox_lang::try_block!({
|
||||
let mut manifest_file = std::fs::File::open(&manifest_name).map_err(|err| {
|
||||
format_err!(
|
||||
"unable to open local manifest {:?} - {}",
|
||||
@ -476,12 +477,12 @@ impl SkipInfo {
|
||||
fn affected(&self) -> Result<String, Error> {
|
||||
match self.count {
|
||||
0 => Ok(String::new()),
|
||||
1 => proxmox::tools::time::epoch_to_rfc3339_utc(self.oldest),
|
||||
1 => Ok(proxmox_time::epoch_to_rfc3339_utc(self.oldest)?),
|
||||
_ => {
|
||||
Ok(format!(
|
||||
"{} .. {}",
|
||||
proxmox::tools::time::epoch_to_rfc3339_utc(self.oldest)?,
|
||||
proxmox::tools::time::epoch_to_rfc3339_utc(self.newest)?,
|
||||
proxmox_time::epoch_to_rfc3339_utc(self.oldest)?,
|
||||
proxmox_time::epoch_to_rfc3339_utc(self.newest)?,
|
||||
))
|
||||
}
|
||||
}
|
||||
@ -706,7 +707,7 @@ pub async fn pull_store(
|
||||
}
|
||||
|
||||
if delete {
|
||||
let result: Result<(), Error> = proxmox::try_block!({
|
||||
let result: Result<(), Error> = proxmox_lang::try_block!({
|
||||
let local_groups = BackupInfo::list_backup_groups(&tgt_store.base_path())?;
|
||||
for local_group in local_groups {
|
||||
if new_groups.contains(&local_group) {
|
||||
|
Reference in New Issue
Block a user