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:
Thomas Lamprecht 2021-11-18 09:50:47 +01:00
parent f2b4af0322
commit ac8709e97b

View File

@ -247,7 +247,7 @@ pub struct VerificationJobStatus {
optional: true,
type: Userid,
},
groups: {
"group-filter": {
schema: GROUP_FILTER_LIST_SCHEMA,
optional: true,
},
@ -270,7 +270,7 @@ pub struct TapeBackupJobSetup {
#[serde(skip_serializing_if="Option::is_none")]
pub notify_user: Option<Userid>,
#[serde(skip_serializing_if="Option::is_none")]
pub groups: Option<Vec<GroupFilter>>,
pub group_filter: Option<Vec<GroupFilter>>,
}
#[api(
@ -409,7 +409,7 @@ pub const GROUP_FILTER_LIST_SCHEMA: Schema = ArraySchema::new("List of group fil
optional: true,
schema: SYNC_SCHEDULE_SCHEMA,
},
groups: {
"group-filter": {
schema: GROUP_FILTER_LIST_SCHEMA,
optional: true,
},
@ -433,7 +433,7 @@ pub struct SyncJobConfig {
#[serde(skip_serializing_if="Option::is_none")]
pub schedule: Option<String>,
#[serde(skip_serializing_if="Option::is_none")]
pub groups: Option<Vec<GroupFilter>>,
pub group_filter: Option<Vec<GroupFilter>>,
}
#[api(