api/compat: remove remaining api_schema references
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
a2479cfa1a
commit
cad540e969
@ -3,14 +3,15 @@ use failure::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::{http_err, list_subdirs_api_method};
|
||||
use proxmox::api::{ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::api_schema::*;
|
||||
use crate::api_schema::router::*;
|
||||
use crate::tools::ticket::*;
|
||||
use crate::auth_helpers::*;
|
||||
|
||||
|
||||
fn authenticate_user(username: &str, password: &str) -> Result<(), Error> {
|
||||
|
||||
let ticket_lifetime = tools::ticket::TICKET_LIFETIME;
|
||||
|
@ -1,26 +1,25 @@
|
||||
use failure::*;
|
||||
use futures::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::api2::types::*;
|
||||
use crate::api_schema::*;
|
||||
use crate::api_schema::router::*;
|
||||
//use crate::server::rest::*;
|
||||
use serde_json::{json, Value};
|
||||
use std::collections::{HashSet, HashMap};
|
||||
use chrono::{DateTime, Datelike, TimeZone, Local};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use chrono::{DateTime, Datelike, TimeZone, Local};
|
||||
use failure::*;
|
||||
use futures::*;
|
||||
use hyper::http::request::Parts;
|
||||
use hyper::{header, Body, Response, StatusCode};
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::{http_err, list_subdirs_api_method};
|
||||
use proxmox::api::{ApiFuture, ApiHandler, ApiMethod, Router, RpcEnvironment, RpcEnvironmentType};
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::schema::*;
|
||||
use proxmox::tools::{try_block, fs::file_get_contents, fs::file_set_contents};
|
||||
|
||||
use crate::config::datastore;
|
||||
|
||||
use crate::api2::types::*;
|
||||
use crate::backup::*;
|
||||
use crate::config::datastore;
|
||||
use crate::server::WorkerTask;
|
||||
|
||||
use hyper::{header, Body, Response, StatusCode};
|
||||
use hyper::http::request::Parts;
|
||||
use crate::tools;
|
||||
|
||||
fn read_backup_index(store: &DataStore, backup_dir: &BackupDir) -> Result<Value, Error> {
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
use failure::*;
|
||||
|
||||
use futures::*;
|
||||
use hyper::header::{HeaderValue, UPGRADE};
|
||||
use hyper::{Body, Response, StatusCode};
|
||||
use hyper::http::request::Parts;
|
||||
|
||||
use hyper::{Body, Response, StatusCode};
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::list_subdirs_api_method;
|
||||
use proxmox::api::{ApiFuture, ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::tools::wrapped_reader_stream::*;
|
||||
use crate::api_schema::router::*;
|
||||
use crate::api_schema::*;
|
||||
use crate::server::{WorkerTask, H2Service};
|
||||
use crate::backup::*;
|
||||
use crate::api2::types::*;
|
||||
|
@ -1,15 +1,16 @@
|
||||
use failure::*;
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
|
||||
use crate::tools;
|
||||
use crate::api_schema::*;
|
||||
use crate::api_schema::router::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
use failure::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::list_subdirs_api_method;
|
||||
use proxmox::api::{ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::api2::types::*;
|
||||
use crate::tools;
|
||||
|
||||
static SERVICE_NAME_LIST: [&str; 7] = [
|
||||
"proxmox-backup",
|
||||
|
@ -1,14 +1,16 @@
|
||||
use failure::*;
|
||||
|
||||
use serde_json::{json, Value};
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead,BufReader};
|
||||
use std::io::{BufRead, BufReader};
|
||||
|
||||
use failure::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::list_subdirs_api_method;
|
||||
use proxmox::api::{ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::router::SubdirMap;
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::api_schema::*;
|
||||
use crate::api_schema::router::*;
|
||||
use crate::api2::types::*;
|
||||
use crate::server::{self, UPID};
|
||||
|
||||
|
@ -5,11 +5,11 @@ use failure::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::{ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::schema::*;
|
||||
use proxmox::tools::fs::{file_read_firstline, file_set_contents};
|
||||
|
||||
use crate::api2::types::*;
|
||||
use crate::api_schema::router::*;
|
||||
use crate::api_schema::*;
|
||||
|
||||
fn read_etc_localtime() -> Result<String, Error> {
|
||||
// use /etc/timezone
|
||||
|
@ -1,21 +1,20 @@
|
||||
//use chrono::{Local, TimeZone};
|
||||
use failure::*;
|
||||
|
||||
use futures::*;
|
||||
use hyper::header::{self, HeaderValue, UPGRADE};
|
||||
use hyper::{Body, Response, StatusCode};
|
||||
use hyper::http::request::Parts;
|
||||
//use chrono::{Local, TimeZone};
|
||||
|
||||
use hyper::{Body, Response, StatusCode};
|
||||
use serde_json::Value;
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::http_err;
|
||||
use proxmox::api::{ApiFuture, ApiHandler, ApiMethod, Router, RpcEnvironment};
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::api_schema::router::*;
|
||||
use crate::api_schema::*;
|
||||
use crate::server::{WorkerTask, H2Service};
|
||||
use crate::backup::*;
|
||||
use crate::api2::types::*;
|
||||
use crate::backup::*;
|
||||
use crate::server::{WorkerTask, H2Service};
|
||||
use crate::tools;
|
||||
|
||||
mod environment;
|
||||
use environment::*;
|
||||
|
@ -1,8 +1,10 @@
|
||||
use failure::*;
|
||||
//use lazy_static::lazy_static;
|
||||
//use std::sync::Arc;
|
||||
|
||||
use crate::api_schema::*;
|
||||
use failure::*;
|
||||
//use lazy_static::lazy_static;
|
||||
|
||||
use proxmox::api::const_regex;
|
||||
use proxmox::api::schema::*;
|
||||
use proxmox::tools::*; // required to use IPRE!() macro ???
|
||||
|
||||
// File names: may not contain slashes, may not start with "."
|
||||
|
@ -11,13 +11,3 @@
|
||||
//pub mod registry;
|
||||
pub mod config;
|
||||
pub mod format;
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------------------------------
|
||||
* Everything below is a compatibility layer to support building the current code until api2.rs
|
||||
* and the api2/ directory have been updated to the proxmox::api crate:
|
||||
* --------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
pub use proxmox::api::schema::*;
|
||||
pub use proxmox::api::*;
|
||||
|
@ -3,11 +3,11 @@ extern crate proxmox_backup;
|
||||
use failure::*;
|
||||
|
||||
use proxmox::{sortable, identity};
|
||||
use proxmox::api::{ApiHandler, ApiMethod, RpcEnvironment};
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use proxmox_backup::tools;
|
||||
use proxmox_backup::cli::*;
|
||||
use proxmox_backup::api_schema::*;
|
||||
use proxmox_backup::api_schema::router::*;
|
||||
|
||||
use serde_json::{Value};
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
use crate::api_schema::*;
|
||||
|
||||
use failure::*;
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum RawArgument {
|
||||
Separator,
|
||||
|
@ -1,8 +1,9 @@
|
||||
use std::fmt;
|
||||
|
||||
use failure::*;
|
||||
|
||||
use crate::api_schema::*;
|
||||
|
||||
use std::fmt;
|
||||
use proxmox::api::const_regex;
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
const_regex! {
|
||||
/// Regular expression to parse repository URLs
|
||||
|
@ -5,8 +5,8 @@ use failure::*;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use proxmox::tools::{fs::file_set_contents, try_block};
|
||||
use proxmox::api::schema::{Schema, ObjectSchema, StringSchema};
|
||||
|
||||
use crate::api_schema::{Schema, ObjectSchema, StringSchema};
|
||||
use crate::section_config::{SectionConfig, SectionConfigData, SectionConfigPlugin};
|
||||
|
||||
lazy_static! {
|
||||
|
@ -6,10 +6,9 @@ use std::collections::VecDeque;
|
||||
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use proxmox::api::schema::*;
|
||||
use proxmox::tools::try_block;
|
||||
|
||||
use crate::api_schema::*;
|
||||
|
||||
pub struct SectionConfigPlugin {
|
||||
type_name: String,
|
||||
properties: &'static ObjectSchema,
|
||||
|
@ -1,10 +1,10 @@
|
||||
use failure::*;
|
||||
|
||||
use crate::api_schema::*;
|
||||
use crate::section_config::*;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use proxmox::api::schema::*;
|
||||
|
||||
use crate::section_config::*;
|
||||
|
||||
lazy_static!{
|
||||
static ref STORAGE_SECTION_CONFIG: SectionConfig = register_storage_plugins();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user