use proxmox-backup as package name
This commit is contained in:
@ -1,19 +1,18 @@
|
||||
extern crate apitest;
|
||||
extern crate proxmox_backup;
|
||||
|
||||
use failure::*;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
|
||||
use apitest::tools;
|
||||
use apitest::cli::command::*;
|
||||
use apitest::api::schema::*;
|
||||
use apitest::api::router::*;
|
||||
//use apitest::backup::chunk_store::*;
|
||||
//use apitest::backup::image_index::*;
|
||||
//use apitest::config::datastore;
|
||||
use apitest::backup::datastore::*;
|
||||
use proxmox_backup::tools;
|
||||
use proxmox_backup::cli::command::*;
|
||||
use proxmox_backup::api::schema::*;
|
||||
use proxmox_backup::api::router::*;
|
||||
//use proxmox_backup::backup::chunk_store::*;
|
||||
//use proxmox_backup::backup::image_index::*;
|
||||
//use proxmox_backup::config::datastore;
|
||||
use proxmox_backup::backup::datastore::*;
|
||||
use serde_json::{Value};
|
||||
|
||||
|
||||
fn required_string_param<'a>(param: &'a Value, name: &str) -> &'a str {
|
||||
param[name].as_str().expect(&format!("missing parameter '{}'", name))
|
||||
}
|
||||
@ -65,7 +64,7 @@ fn main() {
|
||||
.required("store", StringSchema::new("Datastore name."))
|
||||
))
|
||||
.arg_param(vec!["filename"])
|
||||
.completion_cb("store", apitest::config::datastore::complete_datastore_name);
|
||||
.completion_cb("store", proxmox_backup::config::datastore::complete_datastore_name);
|
||||
|
||||
|
||||
if let Err(err) = run_cli_command(&cmd_def.into()) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
extern crate apitest;
|
||||
extern crate proxmox_backup;
|
||||
|
||||
//use apitest::api3;
|
||||
use apitest::cli::command::*;
|
||||
//use proxmox_backup::api3;
|
||||
use proxmox_backup::cli::command::*;
|
||||
|
||||
fn datastore_commands() -> CommandLineInterface {
|
||||
|
||||
use apitest::api3::config::datastore;
|
||||
use proxmox_backup::api3::config::datastore;
|
||||
|
||||
let cmd_def = CliCommandMap::new()
|
||||
.insert("list", CliCommand::new(datastore::get()).into())
|
||||
@ -16,7 +16,7 @@ fn datastore_commands() -> CommandLineInterface {
|
||||
.insert("remove",
|
||||
CliCommand::new(datastore::delete())
|
||||
.arg_param(vec!["name"])
|
||||
.completion_cb("name", apitest::config::datastore::complete_datastore_name)
|
||||
.completion_cb("name", proxmox_backup::config::datastore::complete_datastore_name)
|
||||
.into());
|
||||
|
||||
cmd_def.into()
|
||||
|
@ -1,12 +1,12 @@
|
||||
extern crate apitest;
|
||||
extern crate proxmox_backup;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use apitest::api::schema::*;
|
||||
use apitest::api::router::*;
|
||||
use apitest::api::config::*;
|
||||
use apitest::server::rest::*;
|
||||
use apitest::getopts;
|
||||
use proxmox_backup::api::schema::*;
|
||||
use proxmox_backup::api::router::*;
|
||||
use proxmox_backup::api::config::*;
|
||||
use proxmox_backup::server::rest::*;
|
||||
use proxmox_backup::getopts;
|
||||
|
||||
//use failure::*;
|
||||
use lazy_static::lazy_static;
|
||||
@ -67,10 +67,10 @@ fn main() {
|
||||
let addr = ([0, 0, 0, 0], 8007).into();
|
||||
|
||||
lazy_static!{
|
||||
static ref ROUTER: Router = apitest::api3::router();
|
||||
static ref ROUTER: Router = proxmox_backup::api3::router();
|
||||
}
|
||||
|
||||
let mut config = ApiConfig::new("/usr/share/javascript/proxmox-backup-server", &ROUTER);
|
||||
let mut config = ApiConfig::new("/usr/share/javascript/proxmox-backup", &ROUTER);
|
||||
|
||||
// add default dirs which includes jquery and bootstrap
|
||||
// my $base = '/usr/share/libpve-http-server-perl';
|
Reference in New Issue
Block a user