]>
git.proxmox.com Git - proxmox-backup.git/blob - src/bin/pbs.rs
3 use std
::collections
::HashMap
;
6 use apitest
::cli
::command
::*;
8 fn datastore_commands() -> CommandLineInterface
{
10 use apitest
::api3
::config
::datastore
;
12 let cmd_def
= CliCommandMap
::new()
13 .insert("list", CliCommand
::new(datastore
::get()).into())
15 CliCommand
::new(datastore
::post())
16 .arg_param(vec
!["name", "path"])
19 CliCommand
::new(datastore
::delete())
20 .arg_param(vec
!["name"])
21 .completion_cb("name", apitest
::config
::datastore
::complete_datastore_name
)
29 let cmd_def
= CliCommandMap
::new()
30 .insert("datastore".to_owned(), datastore_commands());
32 if let Err(err
) = run_cli_command(&cmd_def
.into()) {
33 eprintln
!("Error: {}", err
);
35 std
::process
::exit(-1);