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:
@ -50,7 +50,7 @@ impl TryFrom<&SyncJobConfig> for PullParameters {
|
||||
&sync_job.remote_store,
|
||||
sync_job.owner.as_ref().unwrap_or_else(|| Authid::root_auth_id()).clone(),
|
||||
sync_job.remove_vanished,
|
||||
sync_job.groups.clone(),
|
||||
sync_job.group_filter.clone(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -152,7 +152,7 @@ pub fn do_sync_job(
|
||||
schema: REMOVE_VANISHED_BACKUPS_SCHEMA,
|
||||
optional: true,
|
||||
},
|
||||
"groups": {
|
||||
"group-filter": {
|
||||
schema: GROUP_FILTER_LIST_SCHEMA,
|
||||
optional: true,
|
||||
},
|
||||
@ -173,7 +173,7 @@ async fn pull (
|
||||
remote: String,
|
||||
remote_store: String,
|
||||
remove_vanished: Option<bool>,
|
||||
groups: Option<Vec<GroupFilter>>,
|
||||
group_filter: Option<Vec<GroupFilter>>,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut dyn RpcEnvironment,
|
||||
) -> Result<String, Error> {
|
||||
@ -189,7 +189,7 @@ async fn pull (
|
||||
&remote_store,
|
||||
auth_id.clone(),
|
||||
remove_vanished,
|
||||
groups,
|
||||
group_filter,
|
||||
)?;
|
||||
let client = pull_params.client().await?;
|
||||
|
||||
|
Reference in New Issue
Block a user