use proxmox-backup as package name
This commit is contained in:
parent
f7dd683b46
commit
fe0e04c69c
|
@ -1,11 +1,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "apitest"
|
name = "proxmox-backup"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
|
authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "apitest"
|
name = "proxmox_backup"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
|
authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
PACKAGE=api-test-server
|
PACKAGE=proxmox-backup
|
||||||
PKGVER=0.1
|
PKGVER=0.1
|
||||||
PKGREL=1
|
PKGREL=1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
rust-api-test-server (0.1-1) unstable; urgency=medium
|
proxmox-backup (0.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
[ Proxmox Support Team ]
|
[ Proxmox Support Team ]
|
||||||
* first try
|
* first try
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Source: rust-api-test-server
|
Source: proxmox-backup
|
||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||||
|
@ -6,11 +6,11 @@ Build-Depends: debhelper (>= 10),
|
||||||
Standards-Version: 3.9.5
|
Standards-Version: 3.9.5
|
||||||
Homepage: https://www.proxmox.com
|
Homepage: https://www.proxmox.com
|
||||||
|
|
||||||
Package: api-test-server
|
Package: proxmox-backup
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||||
libjs-extjs (>= 6.0.1),
|
libjs-extjs (>= 6.0.1),
|
||||||
fonts-font-awesome,
|
fonts-font-awesome,
|
||||||
proxmox-widget-toolkit,
|
proxmox-widget-toolkit,
|
||||||
Description: API Test Server
|
Description: Proxmox Backup Server
|
||||||
This is experimental code used to test Rust.
|
This is experimental code used to test Rust.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
target/release/api-test-server /usr/sbin
|
target/release/proxmox-backup-api /usr/sbin
|
||||||
target/release/pbs /usr/sbin
|
target/release/pbs /usr/sbin
|
||||||
target/release/backup-client /usr/sbin
|
target/release/backup-client /usr/sbin
|
||||||
www/images/logo-128.png /usr/share/javascript/proxmox-backup-server/images/
|
www/images/logo-128.png /usr/share/javascript/proxmox-backup/images/
|
||||||
www/images/proxmox_logo.png /usr/share/javascript/proxmox-backup-server/images/
|
www/images/proxmox_logo.png /usr/share/javascript/proxmox-backup/images/
|
||||||
www/proxmox-backup-gui.js /usr/share/javascript/proxmox-backup-server/js/
|
www/proxmox-backup-gui.js /usr/share/javascript/proxmox-backup/js/
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Proxmox API Test Server
|
Description=Proxmox API Test Server
|
||||||
ConditionPathExists=/usr/sbin/api-test-server
|
ConditionPathExists=/usr/sbin/proxmox-backup-api
|
||||||
After=syslog.service
|
After=syslog.service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/sbin/api-test-server start
|
ExecStart=/usr/sbin/proxmox-backup-api start
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
extern crate apitest;
|
extern crate proxmox_backup;
|
||||||
|
|
||||||
use failure::*;
|
use failure::*;
|
||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
|
|
||||||
use apitest::tools;
|
use proxmox_backup::tools;
|
||||||
use apitest::cli::command::*;
|
use proxmox_backup::cli::command::*;
|
||||||
use apitest::api::schema::*;
|
use proxmox_backup::api::schema::*;
|
||||||
use apitest::api::router::*;
|
use proxmox_backup::api::router::*;
|
||||||
//use apitest::backup::chunk_store::*;
|
//use proxmox_backup::backup::chunk_store::*;
|
||||||
//use apitest::backup::image_index::*;
|
//use proxmox_backup::backup::image_index::*;
|
||||||
//use apitest::config::datastore;
|
//use proxmox_backup::config::datastore;
|
||||||
use apitest::backup::datastore::*;
|
use proxmox_backup::backup::datastore::*;
|
||||||
use serde_json::{Value};
|
use serde_json::{Value};
|
||||||
|
|
||||||
|
|
||||||
fn required_string_param<'a>(param: &'a Value, name: &str) -> &'a str {
|
fn required_string_param<'a>(param: &'a Value, name: &str) -> &'a str {
|
||||||
param[name].as_str().expect(&format!("missing parameter '{}'", name))
|
param[name].as_str().expect(&format!("missing parameter '{}'", name))
|
||||||
}
|
}
|
||||||
|
@ -65,7 +64,7 @@ fn main() {
|
||||||
.required("store", StringSchema::new("Datastore name."))
|
.required("store", StringSchema::new("Datastore name."))
|
||||||
))
|
))
|
||||||
.arg_param(vec!["filename"])
|
.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()) {
|
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 proxmox_backup::api3;
|
||||||
use apitest::cli::command::*;
|
use proxmox_backup::cli::command::*;
|
||||||
|
|
||||||
fn datastore_commands() -> CommandLineInterface {
|
fn datastore_commands() -> CommandLineInterface {
|
||||||
|
|
||||||
use apitest::api3::config::datastore;
|
use proxmox_backup::api3::config::datastore;
|
||||||
|
|
||||||
let cmd_def = CliCommandMap::new()
|
let cmd_def = CliCommandMap::new()
|
||||||
.insert("list", CliCommand::new(datastore::get()).into())
|
.insert("list", CliCommand::new(datastore::get()).into())
|
||||||
|
@ -16,7 +16,7 @@ fn datastore_commands() -> CommandLineInterface {
|
||||||
.insert("remove",
|
.insert("remove",
|
||||||
CliCommand::new(datastore::delete())
|
CliCommand::new(datastore::delete())
|
||||||
.arg_param(vec!["name"])
|
.arg_param(vec!["name"])
|
||||||
.completion_cb("name", apitest::config::datastore::complete_datastore_name)
|
.completion_cb("name", proxmox_backup::config::datastore::complete_datastore_name)
|
||||||
.into());
|
.into());
|
||||||
|
|
||||||
cmd_def.into()
|
cmd_def.into()
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
extern crate apitest;
|
extern crate proxmox_backup;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use apitest::api::schema::*;
|
use proxmox_backup::api::schema::*;
|
||||||
use apitest::api::router::*;
|
use proxmox_backup::api::router::*;
|
||||||
use apitest::api::config::*;
|
use proxmox_backup::api::config::*;
|
||||||
use apitest::server::rest::*;
|
use proxmox_backup::server::rest::*;
|
||||||
use apitest::getopts;
|
use proxmox_backup::getopts;
|
||||||
|
|
||||||
//use failure::*;
|
//use failure::*;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
@ -67,10 +67,10 @@ fn main() {
|
||||||
let addr = ([0, 0, 0, 0], 8007).into();
|
let addr = ([0, 0, 0, 0], 8007).into();
|
||||||
|
|
||||||
lazy_static!{
|
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
|
// add default dirs which includes jquery and bootstrap
|
||||||
// my $base = '/usr/share/libpve-http-server-perl';
|
// my $base = '/usr/share/libpve-http-server-perl';
|
Loading…
Reference in New Issue