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:
@ -192,8 +192,8 @@ pub enum DeletableProperty {
|
||||
schedule,
|
||||
/// Delete the remove-vanished flag.
|
||||
remove_vanished,
|
||||
/// Delete the groups property.
|
||||
groups,
|
||||
/// Delete the group_filter property.
|
||||
group_filter,
|
||||
}
|
||||
|
||||
#[api(
|
||||
@ -256,7 +256,7 @@ pub fn update_sync_job(
|
||||
DeletableProperty::comment => { data.comment = None; },
|
||||
DeletableProperty::schedule => { data.schedule = None; },
|
||||
DeletableProperty::remove_vanished => { data.remove_vanished = None; },
|
||||
DeletableProperty::groups => { data.groups = None; },
|
||||
DeletableProperty::group_filter => { data.group_filter = None; },
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -274,7 +274,7 @@ pub fn update_sync_job(
|
||||
if let Some(remote) = update.remote { data.remote = remote; }
|
||||
if let Some(remote_store) = update.remote_store { data.remote_store = remote_store; }
|
||||
if let Some(owner) = update.owner { data.owner = Some(owner); }
|
||||
if let Some(groups) = update.groups { data.groups = Some(groups); }
|
||||
if let Some(group_filter) = update.group_filter { data.group_filter = Some(group_filter); }
|
||||
|
||||
let schedule_changed = data.schedule != update.schedule;
|
||||
if update.schedule.is_some() { data.schedule = update.schedule; }
|
||||
@ -394,7 +394,7 @@ acl:1:/remote/remote1/remotestore1:write@pbs:RemoteSyncOperator
|
||||
owner: Some(write_auth_id.clone()),
|
||||
comment: None,
|
||||
remove_vanished: None,
|
||||
groups: None,
|
||||
group_filter: None,
|
||||
schedule: None,
|
||||
};
|
||||
|
||||
|
@ -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