[pbs-devel] [PATCH v2 proxmox-backup 3/4] api2: make maintenance type and msg updatable/deletable
Hannes Laimer
h.laimer at proxmox.com
Wed Oct 6 17:14:56 CEST 2021
---
src/api2/config/datastore.rs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index 0819d5ec..1f1bb9c1 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -183,6 +183,10 @@ pub enum DeletableProperty {
notify_user,
/// Delete the notify property
notify,
+ /// Delete the maintenance_type property
+ maintenance_type,
+ /// Delete the maintenance_msg property
+ maintenance_msg,
}
#[api(
@@ -249,6 +253,8 @@ pub fn update_datastore(
DeletableProperty::verify_new => { data.verify_new = None; },
DeletableProperty::notify => { data.notify = None; },
DeletableProperty::notify_user => { data.notify_user = None; },
+ DeletableProperty::maintenance_type => { data.maintenance_type = None; },
+ DeletableProperty::maintenance_msg => { data.maintenance_msg = None; },
}
}
}
@@ -291,6 +297,8 @@ pub fn update_datastore(
}
}
if update.verify_new.is_some() { data.verify_new = update.verify_new; }
+ if update.maintenance_type.is_some() { data.maintenance_type = update.maintenance_type; }
+ if update.maintenance_msg.is_some() { data.maintenance_msg = update.maintenance_msg; }
if update.notify_user.is_some() { data.notify_user = update.notify_user; }
--
2.30.2
More information about the pbs-devel
mailing list