cleanup cli library structure
This commit is contained in:
parent
56458d9764
commit
4de0e142a0
|
@ -3,7 +3,7 @@ extern crate proxmox_backup;
|
|||
use failure::*;
|
||||
|
||||
use proxmox_backup::tools;
|
||||
use proxmox_backup::cli::command::*;
|
||||
use proxmox_backup::cli::*;
|
||||
use proxmox_backup::api_schema::*;
|
||||
use proxmox_backup::api_schema::router::*;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use failure::*;
|
|||
use chrono::{Local, TimeZone};
|
||||
|
||||
use proxmox_backup::tools;
|
||||
use proxmox_backup::cli::command::*;
|
||||
use proxmox_backup::cli::*;
|
||||
use proxmox_backup::api_schema::*;
|
||||
use proxmox_backup::api_schema::router::*;
|
||||
use proxmox_backup::client::*;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
extern crate proxmox_backup;
|
||||
|
||||
//use proxmox_backup::api2;
|
||||
use proxmox_backup::cli::command::*;
|
||||
use proxmox_backup::cli::*;
|
||||
|
||||
fn datastore_commands() -> CommandLineInterface {
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
//! Tools to create command line parsers
|
||||
//!
|
||||
//! We can use Schema deinititions to create command line parsers.
|
||||
//!
|
||||
//!
|
||||
|
||||
mod environment;
|
||||
pub use environment::*;
|
||||
|
||||
mod command;
|
||||
pub use command::*;
|
||||
|
||||
mod getopts;
|
||||
pub use getopts::*;
|
|
@ -9,7 +9,7 @@ use crate::api_schema::router::*;
|
|||
//use crate::api_schema::config::*;
|
||||
use super::environment::CliEnvironment;
|
||||
|
||||
use crate::getopts;
|
||||
use super::getopts;
|
||||
|
||||
pub fn print_cli_usage() {
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::api_schema::router::*;
|
|||
use std::collections::HashMap;
|
||||
use serde_json::Value;
|
||||
|
||||
/// `RpcEnvironmet` implementation for command line tools
|
||||
pub struct CliEnvironment {
|
||||
result_attributes: HashMap<String, Value>,
|
||||
user: Option<String>,
|
||||
|
|
|
@ -31,16 +31,10 @@ pub mod storage {
|
|||
pub mod futures;
|
||||
}
|
||||
|
||||
pub mod cli {
|
||||
|
||||
pub mod environment;
|
||||
pub mod command;
|
||||
}
|
||||
|
||||
pub mod cli;
|
||||
|
||||
pub mod api2;
|
||||
|
||||
pub mod client;
|
||||
|
||||
pub mod getopts;
|
||||
pub mod auth_helpers;
|
||||
|
|
Loading…
Reference in New Issue