tape: cleanup TapeJob implementation - uses AllOf Schema with SectionConfig
This commit is contained in:
@ -38,6 +38,7 @@ use proxmox_backup::{
|
||||
datastore::complete_datastore_name,
|
||||
drive::complete_drive_name,
|
||||
media_pool::complete_pool_name,
|
||||
tape_job::TapeBackupJobSetup,
|
||||
},
|
||||
tape::{
|
||||
drive::{
|
||||
@ -790,27 +791,11 @@ async fn clean_drive(mut param: Value) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
#[api(
|
||||
input: {
|
||||
input: {
|
||||
properties: {
|
||||
store: {
|
||||
schema: DATASTORE_SCHEMA,
|
||||
},
|
||||
pool: {
|
||||
schema: MEDIA_POOL_NAME_SCHEMA,
|
||||
},
|
||||
drive: {
|
||||
schema: DRIVE_NAME_SCHEMA,
|
||||
optional: true,
|
||||
},
|
||||
"eject-media": {
|
||||
description: "Eject media upon job completion.",
|
||||
type: bool,
|
||||
optional: true,
|
||||
},
|
||||
"export-media-set": {
|
||||
description: "Export media set upon job completion.",
|
||||
type: bool,
|
||||
optional: true,
|
||||
setup: {
|
||||
type: TapeBackupJobSetup,
|
||||
flatten: true,
|
||||
},
|
||||
"output-format": {
|
||||
schema: OUTPUT_FORMAT,
|
||||
@ -926,6 +911,7 @@ fn main() {
|
||||
"backup",
|
||||
CliCommand::new(&API_METHOD_BACKUP)
|
||||
.arg_param(&["store", "pool"])
|
||||
.completion_cb("drive", complete_drive_name)
|
||||
.completion_cb("store", complete_datastore_name)
|
||||
.completion_cb("pool", complete_pool_name)
|
||||
)
|
||||
|
Reference in New Issue
Block a user