api: verify: support namespaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -155,6 +155,8 @@ pub enum DeletableProperty {
|
||||
Schedule,
|
||||
/// Delete outdated after property.
|
||||
OutdatedAfter,
|
||||
/// Delete namespace property, defaulting to root namespace then.
|
||||
Ns,
|
||||
}
|
||||
|
||||
#[api(
|
||||
@ -234,6 +236,9 @@ pub fn update_verification_job(
|
||||
DeletableProperty::Schedule => {
|
||||
data.schedule = None;
|
||||
}
|
||||
DeletableProperty::Ns => {
|
||||
data.ns = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,6 +273,11 @@ pub fn update_verification_job(
|
||||
if update.schedule.is_some() {
|
||||
data.schedule = update.schedule;
|
||||
}
|
||||
if let Some(ns) = update.ns {
|
||||
if !ns.is_root() {
|
||||
data.ns = Some(ns);
|
||||
}
|
||||
}
|
||||
|
||||
config.set_data(&id, "verification", &data)?;
|
||||
|
||||
|
Reference in New Issue
Block a user