From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id B017F1FF0B7 for ; Fri, 13 Nov 2026 16:17:47 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 138CE21D60; Fri, 13 Nov 2026 16:10:22 +0100 (CET) From: Lukas Wagner To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox 23/55] notify: api: api types: rename Deleteable* -> Deletable* Date: Fri, 13 Nov 2026 16:07:56 +0100 Message-ID: <20261113150828.756836-24-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261113150828.756836-1-l.wagner@proxmox.com> References: <20261113150828.756836-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794582525936 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.201 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VK5HEQGTAJUE5O4D3G4M4NLPOPUOIPHH X-Message-ID-Hash: VK5HEQGTAJUE5O4D3G4M4NLPOPUOIPHH X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 10 +++--- proxmox-notify/src/api/matcher.rs | 38 ++++++++++----------- proxmox-notify/src/api/sendmail.rs | 20 +++++------ proxmox-notify/src/api/smtp.rs | 30 ++++++++-------- proxmox-notify/src/api/webhook.rs | 18 +++++----- proxmox-notify/src/api_types/gotify.rs | 2 +- proxmox-notify/src/api_types/matcher/mod.rs | 2 +- proxmox-notify/src/api_types/sendmail.rs | 2 +- proxmox-notify/src/api_types/smtp.rs | 2 +- proxmox-notify/src/api_types/webhook.rs | 2 +- 10 files changed, 63 insertions(+), 63 deletions(-) diff --git a/proxmox-notify/src/api/gotify.rs b/proxmox-notify/src/api/gotify.rs index e4ac46328..629b21bc2 100644 --- a/proxmox-notify/src/api/gotify.rs +++ b/proxmox-notify/src/api/gotify.rs @@ -5,7 +5,7 @@ use proxmox_section_config::typed::{convert_to_typed_array, lookup}; use crate::Config; use crate::api::http_err; use crate::api_types::{ - DeleteableGotifyProperty, GotifyConfig, GotifyConfigUpdater, GotifyPrivateConfig, + DeletableGotifyProperty, GotifyConfig, GotifyConfigUpdater, GotifyPrivateConfig, GotifyPrivateConfigUpdater, }; use crate::config::{ConfigEntity, PrivateConfigEntity}; @@ -78,7 +78,7 @@ pub fn update_endpoint( name: &str, endpoint_config_updater: GotifyConfigUpdater, private_endpoint_config_updater: GotifyPrivateConfigUpdater, - delete: Option<&[DeleteableGotifyProperty]>, + delete: Option<&[DeletableGotifyProperty]>, digest: Option, ) -> Result<(), HttpError> { super::verify_digest(config, digest)?; @@ -88,8 +88,8 @@ pub fn update_endpoint( if let Some(delete) = delete { for deletable_property in delete { match deletable_property { - DeleteableGotifyProperty::Comment => endpoint.comment = None, - DeleteableGotifyProperty::Disable => endpoint.disable = None, + DeletableGotifyProperty::Comment => endpoint.comment = None, + DeletableGotifyProperty::Disable => endpoint.disable = None, } } } @@ -245,7 +245,7 @@ mod tests { "gotify-endpoint", Default::default(), Default::default(), - Some(&[DeleteableGotifyProperty::Comment]), + Some(&[DeletableGotifyProperty::Comment]), None, )?; diff --git a/proxmox-notify/src/api/matcher.rs b/proxmox-notify/src/api/matcher.rs index cdb66f368..980c6f774 100644 --- a/proxmox-notify/src/api/matcher.rs +++ b/proxmox-notify/src/api/matcher.rs @@ -4,7 +4,7 @@ use proxmox_section_config::typed::{convert_to_typed_array, lookup}; use crate::Config; use crate::api::http_err; -use crate::api_types::{DeleteableMatcherProperty, MatcherConfig, MatcherConfigUpdater}; +use crate::api_types::{DeletableMatcherProperty, MatcherConfig, MatcherConfigUpdater}; use crate::config::ConfigEntity; /// Get a list of all matchers @@ -97,7 +97,7 @@ pub fn update_matcher( config: &mut Config, name: &str, matcher_updater: MatcherConfigUpdater, - delete: Option<&[DeleteableMatcherProperty]>, + delete: Option<&[DeletableMatcherProperty]>, digest: Option, ) -> Result<(), HttpError> { super::verify_digest(config, digest)?; @@ -108,19 +108,19 @@ pub fn update_matcher( for deletable_property in delete { match deletable_property { #[cfg(feature = "legacy-matchers")] - DeleteableMatcherProperty::MatchSeverity => matcher.match_severity.clear(), + DeletableMatcherProperty::MatchSeverity => matcher.match_severity.clear(), #[cfg(feature = "legacy-matchers")] - DeleteableMatcherProperty::MatchField => matcher.match_field.clear(), + DeletableMatcherProperty::MatchField => matcher.match_field.clear(), #[cfg(feature = "legacy-matchers")] - DeleteableMatcherProperty::MatchCalendar => matcher.match_calendar.clear(), + DeletableMatcherProperty::MatchCalendar => matcher.match_calendar.clear(), #[cfg(feature = "legacy-matchers")] - DeleteableMatcherProperty::InvertMatch => matcher.invert_match = None, + DeletableMatcherProperty::InvertMatch => matcher.invert_match = None, #[cfg(feature = "legacy-matchers")] - DeleteableMatcherProperty::Mode => matcher.mode = None, - DeleteableMatcherProperty::Expression => matcher.expression = None, - DeleteableMatcherProperty::Comment => matcher.comment = None, - DeleteableMatcherProperty::Target => matcher.target.clear(), - DeleteableMatcherProperty::Disable => matcher.disable = None, + DeletableMatcherProperty::Mode => matcher.mode = None, + DeletableMatcherProperty::Expression => matcher.expression = None, + DeletableMatcherProperty::Comment => matcher.comment = None, + DeletableMatcherProperty::Target => matcher.target.clear(), + DeletableMatcherProperty::Disable => matcher.disable = None, } } } @@ -283,11 +283,11 @@ matcher: matcher2 "matcher1", Default::default(), Some(&[ - DeleteableMatcherProperty::InvertMatch, - DeleteableMatcherProperty::Mode, - DeleteableMatcherProperty::MatchField, - DeleteableMatcherProperty::Target, - DeleteableMatcherProperty::Comment, + DeletableMatcherProperty::InvertMatch, + DeletableMatcherProperty::Mode, + DeletableMatcherProperty::MatchField, + DeletableMatcherProperty::Target, + DeletableMatcherProperty::Comment, ]), Some(digest), )?; @@ -334,9 +334,9 @@ matcher: matcher2 "matcher1", Default::default(), Some(&[ - DeleteableMatcherProperty::Target, - DeleteableMatcherProperty::Comment, - DeleteableMatcherProperty::Expression, + DeletableMatcherProperty::Target, + DeletableMatcherProperty::Comment, + DeletableMatcherProperty::Expression, ]), Some(digest), )?; diff --git a/proxmox-notify/src/api/sendmail.rs b/proxmox-notify/src/api/sendmail.rs index 1d429c8f8..91f7ad8b9 100644 --- a/proxmox-notify/src/api/sendmail.rs +++ b/proxmox-notify/src/api/sendmail.rs @@ -4,7 +4,7 @@ use proxmox_section_config::typed::{convert_to_typed_array, lookup}; use crate::Config; use crate::api::{http_bail, http_err}; -use crate::api_types::{DeleteableSendmailProperty, SendmailConfig, SendmailConfigUpdater}; +use crate::api_types::{DeletableSendmailProperty, SendmailConfig, SendmailConfigUpdater}; use crate::config::ConfigEntity; /// Get a list of all sendmail endpoints. @@ -67,7 +67,7 @@ pub fn update_endpoint( config: &mut Config, name: &str, updater: SendmailConfigUpdater, - delete: Option<&[DeleteableSendmailProperty]>, + delete: Option<&[DeletableSendmailProperty]>, digest: Option, ) -> Result<(), HttpError> { super::verify_digest(config, digest)?; @@ -77,12 +77,12 @@ pub fn update_endpoint( if let Some(delete) = delete { for deletable_property in delete { match deletable_property { - DeleteableSendmailProperty::FromAddress => endpoint.from_address = None, - DeleteableSendmailProperty::Author => endpoint.author = None, - DeleteableSendmailProperty::Comment => endpoint.comment = None, - DeleteableSendmailProperty::Mailto => endpoint.mailto.clear(), - DeleteableSendmailProperty::MailtoUser => endpoint.mailto_user.clear(), - DeleteableSendmailProperty::Disable => endpoint.disable = None, + DeletableSendmailProperty::FromAddress => endpoint.from_address = None, + DeletableSendmailProperty::Author => endpoint.author = None, + DeletableSendmailProperty::Comment => endpoint.comment = None, + DeletableSendmailProperty::Mailto => endpoint.mailto.clear(), + DeletableSendmailProperty::MailtoUser => endpoint.mailto_user.clear(), + DeletableSendmailProperty::Disable => endpoint.disable = None, } } } @@ -256,8 +256,8 @@ pub mod tests { "sendmail-endpoint", Default::default(), Some(&[ - DeleteableSendmailProperty::FromAddress, - DeleteableSendmailProperty::Author, + DeletableSendmailProperty::FromAddress, + DeletableSendmailProperty::Author, ]), None, )?; diff --git a/proxmox-notify/src/api/smtp.rs b/proxmox-notify/src/api/smtp.rs index 30df66d21..431bd7a62 100644 --- a/proxmox-notify/src/api/smtp.rs +++ b/proxmox-notify/src/api/smtp.rs @@ -5,7 +5,7 @@ use proxmox_section_config::typed::{convert_to_typed_array, lookup}; use crate::Config; use crate::api::{http_bail, http_err}; use crate::api_types::{ - DeleteableSmtpProperty, SmtpConfig, SmtpConfigUpdater, SmtpPrivateConfig, + DeletableSmtpProperty, SmtpConfig, SmtpConfigUpdater, SmtpPrivateConfig, SmtpPrivateConfigUpdater, }; use crate::config::{ConfigEntity, PrivateConfigEntity}; @@ -84,7 +84,7 @@ pub fn update_endpoint( name: &str, updater: SmtpConfigUpdater, private_endpoint_config_updater: SmtpPrivateConfigUpdater, - delete: Option<&[DeleteableSmtpProperty]>, + delete: Option<&[DeletableSmtpProperty]>, digest: Option, ) -> Result<(), HttpError> { super::verify_digest(config, digest)?; @@ -94,12 +94,12 @@ pub fn update_endpoint( if let Some(delete) = delete { for deletable_property in delete { match deletable_property { - DeleteableSmtpProperty::Author => endpoint.author = None, - DeleteableSmtpProperty::Comment => endpoint.comment = None, - DeleteableSmtpProperty::Disable => endpoint.disable = None, - DeleteableSmtpProperty::Mailto => endpoint.mailto.clear(), - DeleteableSmtpProperty::MailtoUser => endpoint.mailto_user.clear(), - DeleteableSmtpProperty::Password => { + DeletableSmtpProperty::Author => endpoint.author = None, + DeletableSmtpProperty::Comment => endpoint.comment = None, + DeletableSmtpProperty::Disable => endpoint.disable = None, + DeletableSmtpProperty::Mailto => endpoint.mailto.clear(), + DeletableSmtpProperty::MailtoUser => endpoint.mailto_user.clear(), + DeletableSmtpProperty::Password => { config.private_config.insert( name, PrivateConfigEntity::Smtp(SmtpPrivateConfig { @@ -108,8 +108,8 @@ pub fn update_endpoint( }), ); } - DeleteableSmtpProperty::Port => endpoint.port = None, - DeleteableSmtpProperty::Username => endpoint.username = None, + DeletableSmtpProperty::Port => endpoint.port = None, + DeletableSmtpProperty::Username => endpoint.username = None, } } } @@ -319,11 +319,11 @@ pub mod tests { Default::default(), Default::default(), Some(&[ - DeleteableSmtpProperty::Author, - DeleteableSmtpProperty::MailtoUser, - DeleteableSmtpProperty::Port, - DeleteableSmtpProperty::Username, - DeleteableSmtpProperty::Comment, + DeletableSmtpProperty::Author, + DeletableSmtpProperty::MailtoUser, + DeletableSmtpProperty::Port, + DeletableSmtpProperty::Username, + DeletableSmtpProperty::Comment, ]), None, )?; diff --git a/proxmox-notify/src/api/webhook.rs b/proxmox-notify/src/api/webhook.rs index beaa26f15..ec4692d7c 100644 --- a/proxmox-notify/src/api/webhook.rs +++ b/proxmox-notify/src/api/webhook.rs @@ -9,7 +9,7 @@ use proxmox_section_config::typed::{convert_to_typed_array, lookup}; use crate::api::http_err; use crate::api_types::{ - DeleteableWebhookProperty, KeyAndBase64Val, WebhookConfig, WebhookConfigUpdater, + DeletableWebhookProperty, KeyAndBase64Val, WebhookConfig, WebhookConfigUpdater, WebhookPrivateConfig, }; use crate::config::{ConfigEntity, PrivateConfigEntity}; @@ -131,7 +131,7 @@ pub fn update_endpoint( config: &mut Config, name: &str, config_updater: WebhookConfigUpdater, - delete: Option<&[DeleteableWebhookProperty]>, + delete: Option<&[DeletableWebhookProperty]>, digest: Option, ) -> Result<(), HttpError> { super::verify_digest(config, digest)?; @@ -147,11 +147,11 @@ pub fn update_endpoint( if let Some(delete) = delete { for deleteable_property in delete { match deleteable_property { - DeleteableWebhookProperty::Comment => endpoint.comment = None, - DeleteableWebhookProperty::Disable => endpoint.disable = None, - DeleteableWebhookProperty::Header => endpoint.header = Vec::new(), - DeleteableWebhookProperty::Body => endpoint.body = None, - DeleteableWebhookProperty::Secret => { + DeletableWebhookProperty::Comment => endpoint.comment = None, + DeletableWebhookProperty::Disable => endpoint.disable = None, + DeletableWebhookProperty::Header => endpoint.header = Vec::new(), + DeletableWebhookProperty::Body => endpoint.body = None, + DeletableWebhookProperty::Secret => { config.private_config.insert( name, PrivateConfigEntity::Webhook(WebhookPrivateConfig { @@ -385,8 +385,8 @@ mod tests { "webhook-endpoint", Default::default(), Some(&[ - DeleteableWebhookProperty::Comment, - DeleteableWebhookProperty::Secret, + DeletableWebhookProperty::Comment, + DeletableWebhookProperty::Secret, ]), None, )?; diff --git a/proxmox-notify/src/api_types/gotify.rs b/proxmox-notify/src/api_types/gotify.rs index a9338f38d..e55e98aec 100644 --- a/proxmox-notify/src/api_types/gotify.rs +++ b/proxmox-notify/src/api_types/gotify.rs @@ -62,7 +62,7 @@ pub struct GotifyPrivateConfig { #[derive(Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] /// The set of properties that can be deleted from a gotify endpoint configuration. -pub enum DeleteableGotifyProperty { +pub enum DeletableGotifyProperty { /// Delete `comment` Comment, /// Delete `disable` diff --git a/proxmox-notify/src/api_types/matcher/mod.rs b/proxmox-notify/src/api_types/matcher/mod.rs index e10ae6986..e65063c5e 100644 --- a/proxmox-notify/src/api_types/matcher/mod.rs +++ b/proxmox-notify/src/api_types/matcher/mod.rs @@ -358,7 +358,7 @@ impl MatcherConfig { #[derive(Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] /// The set of matcher properties that can be deleted. -pub enum DeleteableMatcherProperty { +pub enum DeletableMatcherProperty { /// Delete `comment` Comment, /// Delete `disable` diff --git a/proxmox-notify/src/api_types/sendmail.rs b/proxmox-notify/src/api_types/sendmail.rs index fd7e457c2..2c22999f5 100644 --- a/proxmox-notify/src/api_types/sendmail.rs +++ b/proxmox-notify/src/api_types/sendmail.rs @@ -79,7 +79,7 @@ pub struct SendmailConfig { #[derive(Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] /// The set of properties that can be deleted from a sendmail endpoint configuration. -pub enum DeleteableSendmailProperty { +pub enum DeletableSendmailProperty { /// Delete `author` Author, /// Delete `comment` diff --git a/proxmox-notify/src/api_types/smtp.rs b/proxmox-notify/src/api_types/smtp.rs index dd779434d..4b1e0b261 100644 --- a/proxmox-notify/src/api_types/smtp.rs +++ b/proxmox-notify/src/api_types/smtp.rs @@ -102,7 +102,7 @@ pub struct SmtpConfig { #[derive(Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] /// The set of properties that can be deleted from a smtp endpoint configuration. -pub enum DeleteableSmtpProperty { +pub enum DeletableSmtpProperty { /// Delete `author` Author, /// Delete `comment` diff --git a/proxmox-notify/src/api_types/webhook.rs b/proxmox-notify/src/api_types/webhook.rs index 3fefcfa69..afd08c38d 100644 --- a/proxmox-notify/src/api_types/webhook.rs +++ b/proxmox-notify/src/api_types/webhook.rs @@ -151,7 +151,7 @@ pub struct WebhookPrivateConfig { #[derive(Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] /// Webhook configuration properties that can be deleted. -pub enum DeleteableWebhookProperty { +pub enum DeletableWebhookProperty { /// Delete `comment`. Comment, /// Delete `disable`. -- 2.47.3