group filter: rename CLI/API/Config "groups" option to "group-filter"
we even use that for basically all the related schema names, "groups" allone is just rather not so telling, i.e., "groups" what? While due to the additive nature of `group-filter` is not the best possible name for passing multiple arguments on the CLI (the web-ui can present this more UX-friendly anyway) due to possible confusion about if the filter act like AND vs OR it can be documented and even if a user is confused they still are safe on more being synced than less. Also, the original param name wasn't really _that_ better in that regards Dietmar also suggested to use singular for the CLI option, while there can be more they're passed over repeating the option, each with a single filter. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -133,8 +133,8 @@ pub enum DeletableProperty {
|
||||
LatestOnly,
|
||||
/// Delete the 'notify-user' property
|
||||
NotifyUser,
|
||||
/// Delete the 'groups' property
|
||||
Groups,
|
||||
/// Delete the 'group_filter' property
|
||||
GroupFilter,
|
||||
}
|
||||
|
||||
#[api(
|
||||
@ -193,7 +193,7 @@ pub fn update_tape_backup_job(
|
||||
DeletableProperty::NotifyUser => { data.setup.notify_user = None; },
|
||||
DeletableProperty::Schedule => { data.schedule = None; },
|
||||
DeletableProperty::Comment => { data.comment = None; },
|
||||
DeletableProperty::Groups => { data.setup.groups = None; },
|
||||
DeletableProperty::GroupFilter => { data.setup.group_filter = None; },
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -206,7 +206,7 @@ pub fn update_tape_backup_job(
|
||||
if update.setup.export_media_set.is_some() { data.setup.export_media_set = update.setup.export_media_set; }
|
||||
if update.setup.latest_only.is_some() { data.setup.latest_only = update.setup.latest_only; }
|
||||
if update.setup.notify_user.is_some() { data.setup.notify_user = update.setup.notify_user; }
|
||||
if update.setup.groups.is_some() { data.setup.groups = update.setup.groups; }
|
||||
if update.setup.group_filter.is_some() { data.setup.group_filter = update.setup.group_filter; }
|
||||
|
||||
let schedule_changed = data.schedule != update.schedule;
|
||||
if update.schedule.is_some() { data.schedule = update.schedule; }
|
||||
|
Reference in New Issue
Block a user