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

@ -7,13 +7,9 @@ use tokio::signal::unix::{signal, SignalKind};
use std::collections::HashMap;
use proxmox::api::{
api,
cli::*,
format::DocumentationFormat,
schema::{parse_parameter_strings, ApiType, ParameterSchema, Schema},
ApiHandler, ApiMethod, RpcEnvironment, SubRoute,
};
use proxmox_router::{cli::*, ApiHandler, ApiMethod, RpcEnvironment, SubRoute};
use proxmox_schema::{api, parse_parameter_strings, ApiType, ParameterSchema, Schema};
use proxmox_schema::format::DocumentationFormat;
use pbs_api_types::{PROXMOX_UPID_REGEX, UPID};
use pbs_client::view_task_result;
@ -381,8 +377,8 @@ struct ApiDirEntry {
capabilities: String,
}
const LS_SCHEMA: &proxmox::api::schema::Schema =
&proxmox::api::schema::ArraySchema::new("List of child links", &ApiDirEntry::API_SCHEMA)
const LS_SCHEMA: &proxmox_schema::Schema =
&proxmox_schema::ArraySchema::new("List of child links", &ApiDirEntry::API_SCHEMA)
.schema();
async fn get_api_children(
@ -448,7 +444,7 @@ async fn ls(path: Option<String>, mut param: Value, rpcenv: &mut dyn RpcEnvironm
format_and_print_result_full(
&mut serde_json::to_value(res)?,
&proxmox::api::schema::ReturnType {
&proxmox_schema::ReturnType {
optional: false,
schema: &LS_SCHEMA,
},

View File

@ -7,10 +7,11 @@ use anyhow::{bail, format_err, Error};
use serde_json::{json, Value};
use walkdir::WalkDir;
use proxmox::api::cli::{
use proxmox_router::cli::{
format_and_print_result, get_output_format, CliCommand, CliCommandMap, CommandLineInterface,
OUTPUT_FORMAT,
};
use proxmox::api::{api, cli::*};
use proxmox_schema::api;
use pbs_tools::cli::outfile_or_stdout;
use pbs_tools::crypt_config::CryptConfig;
@ -282,7 +283,7 @@ fn inspect_file(
};
let mut ctime_str = index.index_ctime().to_string();
if let Ok(s) = proxmox::tools::time::strftime_local("%c", index.index_ctime()) {
if let Ok(s) = proxmox_time::strftime_local("%c", index.index_ctime()) {
ctime_str = s;
}

View File

@ -5,9 +5,9 @@ use std::path::Path;
use anyhow::{bail, format_err, Error};
use serde_json::Value;
use proxmox::api::api;
use proxmox::api::cli::{CliCommand, CliCommandMap, CommandLineInterface};
use proxmox::tools::digest_to_hex;
use proxmox_router::cli::{CliCommand, CliCommandMap, CommandLineInterface};
use proxmox_schema::api;
use pbs_tools::crypt_config::CryptConfig;
use pbs_datastore::dynamic_index::DynamicIndexReader;