[pbs-devel] [PATCH proxmox-backup 2/4] config/tape_job: add notify-user config to tape jobs
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 5 09:45:30 CET 2021
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/api2/config/tape_backup_job.rs | 2 ++
src/config/tape_job.rs | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/src/api2/config/tape_backup_job.rs b/src/api2/config/tape_backup_job.rs
index fbd36a53..fbb8d979 100644
--- a/src/api2/config/tape_backup_job.rs
+++ b/src/api2/config/tape_backup_job.rs
@@ -145,6 +145,8 @@ pub enum DeletableProperty {
ExportMediaSet,
/// Delete the 'latest-only' property
LatestOnly,
+ /// Delete the 'notify-user' property
+ NotifyUser,
}
#[api(
diff --git a/src/config/tape_job.rs b/src/config/tape_job.rs
index 7e1ad37d..26295d1f 100644
--- a/src/config/tape_job.rs
+++ b/src/config/tape_job.rs
@@ -16,6 +16,7 @@ use proxmox::api::{
use proxmox::tools::{fs::replace_file, fs::CreateOptions};
use crate::api2::types::{
+ Userid,
JOB_ID_SCHEMA,
DATASTORE_SCHEMA,
DRIVE_NAME_SCHEMA,
@@ -55,6 +56,10 @@ lazy_static! {
type: bool,
optional: true,
},
+ "notify-user": {
+ optional: true,
+ type: Userid,
+ },
}
)]
#[serde(rename_all="kebab-case")]
@@ -70,6 +75,9 @@ pub struct TapeBackupJobSetup {
pub export_media_set: Option<bool>,
#[serde(skip_serializing_if="Option::is_none")]
pub latest_only: Option<bool>,
+ /// Send job email notification to this user
+ #[serde(skip_serializing_if="Option::is_none")]
+ pub notify_user: Option<Userid>,
}
#[api(
--
2.20.1
More information about the pbs-devel
mailing list