From ac8709e97bc5762a064b9c2b151038fd896d9f8f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 18 Nov 2021 09:50:47 +0100 Subject: [PATCH] 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 --- pbs-api-types/src/jobs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs index 601d86f9..2a7e201b 100644 --- a/pbs-api-types/src/jobs.rs +++ b/pbs-api-types/src/jobs.rs @@ -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, #[serde(skip_serializing_if="Option::is_none")] - pub groups: Option>, + pub group_filter: Option>, } #[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, #[serde(skip_serializing_if="Option::is_none")] - pub groups: Option>, + pub group_filter: Option>, } #[api(