]>
git.proxmox.com Git - proxmox-backup.git/blob - src/bin/pbs.rs
1 extern crate proxmox_backup
;
3 //use proxmox_backup::api3;
4 use proxmox_backup
::cli
::command
::*;
6 fn datastore_commands() -> CommandLineInterface
{
8 use proxmox_backup
::api3
::config
::datastore
;
10 let cmd_def
= CliCommandMap
::new()
11 .insert("list", CliCommand
::new(datastore
::get()).into())
13 CliCommand
::new(datastore
::post())
14 .arg_param(vec
!["name", "path"])
17 CliCommand
::new(datastore
::delete())
18 .arg_param(vec
!["name"])
19 .completion_cb("name", proxmox_backup
::config
::datastore
::complete_datastore_name
)
27 let cmd_def
= CliCommandMap
::new()
28 .insert("datastore".to_owned(), datastore_commands());
30 if let Err(err
) = run_cli_command(&cmd_def
.into()) {
31 eprintln
!("Error: {}", err
);
33 std
::process
::exit(-1);