From ac21864dcf94e59f77808d5a4087a11dc2d57e5c Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 21 Nov 2019 14:36:28 +0100 Subject: [PATCH] api/compat: drop more compat imports from api_schema.rs Signed-off-by: Wolfgang Bumiller --- src/server/environment.rs | 4 ++-- src/server/formatter.rs | 4 ++-- src/server/h2service.rs | 3 +-- src/server/rest.rs | 10 ++++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/server/environment.rs b/src/server/environment.rs index b002b24f..9e026997 100644 --- a/src/server/environment.rs +++ b/src/server/environment.rs @@ -1,8 +1,8 @@ -use crate::api_schema::router::*; - use std::collections::HashMap; use serde_json::Value; +use proxmox::api::{RpcEnvironment, RpcEnvironmentType}; + /// Encapsulates information about the runtime environment pub struct RestEnvironment { env_type: RpcEnvironmentType, diff --git a/src/server/formatter.rs b/src/server/formatter.rs index ca2a6e73..2daf4dbf 100644 --- a/src/server/formatter.rs +++ b/src/server/formatter.rs @@ -1,11 +1,11 @@ use failure::*; use serde_json::{json, Value}; -use crate::api_schema::router::{HttpError, RpcEnvironment}; - use hyper::{Body, Response, StatusCode}; use hyper::header; +use proxmox::api::{HttpError, RpcEnvironment}; + /// Extension to set error message for server side logging pub struct ErrorMessageExtension(pub String); diff --git a/src/server/h2service.rs b/src/server/h2service.rs index a9abf4f3..c8a1f839 100644 --- a/src/server/h2service.rs +++ b/src/server/h2service.rs @@ -7,10 +7,9 @@ use std::task::{Context, Poll}; use futures::*; use hyper::{Body, Request, Response, StatusCode}; -use proxmox::api::{http_err, ApiFuture}; +use proxmox::api::{http_err, ApiFuture, ApiHandler, HttpError, Router, RpcEnvironment}; use crate::tools; -use crate::api_schema::router::*; use crate::server::formatter::*; use crate::server::WorkerTask; diff --git a/src/server/rest.rs b/src/server/rest.rs index f583afaa..55e010b6 100644 --- a/src/server/rest.rs +++ b/src/server/rest.rs @@ -16,13 +16,15 @@ use serde_json::{json, Value}; use tokio::fs::File; use url::form_urlencoded; +use proxmox::api::http_err; +use proxmox::api::{ApiFuture, ApiHandler, ApiMethod, HttpError}; +use proxmox::api::{RpcEnvironment, RpcEnvironmentType}; +use proxmox::api::schema::{parse_simple_value, verify_json_object, parse_parameter_strings}; + use super::environment::RestEnvironment; use super::formatter::*; -use crate::api_schema::rpc_environment::*; -use crate::api_schema::config::*; -use crate::api_schema::router::*; -use crate::api_schema::*; use crate::auth_helpers::*; +use crate::api_schema::config::ApiConfig; use crate::tools; extern "C" { fn tzset(); }