From 4b80fec05a1078439e84c8ef89ac4817debabb99 Mon Sep 17 00:00:00 2001 From: Stephan Krug Date: Mon, 3 Oct 2022 17:27:50 -0300 Subject: [PATCH 1/2] Fixing email global configurations descriptions --- .../src/main/java/com/cloud/alert/AlertManager.java | 2 +- .../src/main/resources/META-INF/db/schema-41710to41800.sql | 5 +++++ server/src/main/java/com/cloud/configuration/Config.java | 2 +- server/src/main/java/com/cloud/projects/ProjectManager.java | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/engine/components-api/src/main/java/com/cloud/alert/AlertManager.java b/engine/components-api/src/main/java/com/cloud/alert/AlertManager.java index 2b7ffc9436bd..ecdb59667c96 100644 --- a/engine/components-api/src/main/java/com/cloud/alert/AlertManager.java +++ b/engine/components-api/src/main/java/com/cloud/alert/AlertManager.java @@ -36,7 +36,7 @@ public interface AlertManager extends Manager, AlertService { ConfigKey.Scope.Cluster, null); public static final ConfigKey AlertSmtpUseStartTLS = new ConfigKey("Advanced", Boolean.class, "alert.smtp.useStartTLS", "false", - "If set to true and if we enable security via alert.smtp.useAuth, this will enable StartTLS to secure the conection.", true); + "If set to true and if we enable security via alert.smtp.useAuth, this will enable StartTLS to secure the connection.", true); public static final ConfigKey AlertSmtpEnabledSecurityProtocols = new ConfigKey("Advanced", String.class, "alert.smtp.enabledSecurityProtocols", "", "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", true); diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41710to41800.sql b/engine/schema/src/main/resources/META-INF/db/schema-41710to41800.sql index ef40520991eb..c7919cbf3643 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41710to41800.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41710to41800.sql @@ -251,3 +251,8 @@ DELETE role_perm FROM role_permissions role_perm INNER JOIN roles ON role_perm.role_id = roles.id WHERE roles.role_type != 'Admin' AND roles.is_default = 1 AND role_perm.rule = 'migrateVolume'; + +-- Improve alert.email.addresses description. +UPDATE cloud.configuration +SET description = 'Comma separated list of email addresses which are going to receive alert emails.' +WHERE name = 'alert.email.addresses'; diff --git a/server/src/main/java/com/cloud/configuration/Config.java b/server/src/main/java/com/cloud/configuration/Config.java index 67fe9ad19a89..cb2c673aafba 100644 --- a/server/src/main/java/com/cloud/configuration/Config.java +++ b/server/src/main/java/com/cloud/configuration/Config.java @@ -53,7 +53,7 @@ public enum Config { String.class, "alert.email.addresses", null, - "Comma separated list of email addresses used for sending alerts.", + "Comma separated list of email addresses which are going to receive alert emails.", null), AlertEmailSender("Alert", ManagementServer.class, String.class, "alert.email.sender", null, "Sender of alert email (will be in the From header of the email).", null), AlertSMTPHost("Alert", ManagementServer.class, String.class, "alert.smtp.host", null, "SMTP hostname used for sending out email alerts.", null), diff --git a/server/src/main/java/com/cloud/projects/ProjectManager.java b/server/src/main/java/com/cloud/projects/ProjectManager.java index 8eebfd3d1585..7bc91c52874e 100644 --- a/server/src/main/java/com/cloud/projects/ProjectManager.java +++ b/server/src/main/java/com/cloud/projects/ProjectManager.java @@ -23,7 +23,7 @@ public interface ProjectManager extends ProjectService { public static final ConfigKey ProjectSmtpUseStartTLS = new ConfigKey("Advanced", Boolean.class, "project.smtp.useStartTLS", "false", - "If set to true and if we enable security via project.smtp.useAuth, this will enable StartTLS to secure the conection.", true); + "If set to true and if we enable security via project.smtp.useAuth, this will enable StartTLS to secure the connection.", true); public static final ConfigKey ProjectSmtpEnabledSecurityProtocols = new ConfigKey("Advanced", String.class, "project.smtp.enabledSecurityProtocols", "", "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", true); From b6e449b25b75b0526f6b8141ee283ae094cb1a40 Mon Sep 17 00:00:00 2001 From: Stephan Krug Date: Thu, 6 Oct 2022 15:12:39 -0300 Subject: [PATCH 2/2] Fixing email typos --- .../cloudstack/quota/constant/QuotaConfig.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/framework/quota/src/main/java/org/apache/cloudstack/quota/constant/QuotaConfig.java b/framework/quota/src/main/java/org/apache/cloudstack/quota/constant/QuotaConfig.java index 4cb855f4facc..31875a167da9 100644 --- a/framework/quota/src/main/java/org/apache/cloudstack/quota/constant/QuotaConfig.java +++ b/framework/quota/src/main/java/org/apache/cloudstack/quota/constant/QuotaConfig.java @@ -22,7 +22,7 @@ public interface QuotaConfig { public static final ConfigKey QuotaPluginEnabled = new ConfigKey("Advanced", Boolean.class, "quota.enable.service", "false", - "Indicates whether Quota plugin is enabled or not", true); + "Indicates whether Quota plugin is enabled or not.", true); public static final ConfigKey QuotaEnableEnforcement = new ConfigKey("Advanced", String.class, "quota.enable.enforcement", "false", "Enable the usage quota enforcement, i.e. on true when exceeding quota the respective account will be locked.", true); @@ -33,29 +33,29 @@ public interface QuotaConfig { public static final ConfigKey QuotaStatementPeriod = new ConfigKey("Advanced", Integer.class, "quota.statement.period", "1", "This variables define the statement generation interval. Values correspond to bimonthly=0, monthly=1, quarterly=2, half-yearly=3 and yearly=4.", true); - public static final ConfigKey QuotaSmtpHost = new ConfigKey("Advanced", String.class, "quota.usage.smtp.host", "", "Quota SMTP host for quota related emails", + public static final ConfigKey QuotaSmtpHost = new ConfigKey("Advanced", String.class, "quota.usage.smtp.host", "", "Quota SMTP host for quota related emails.", true); public static final ConfigKey QuotaSmtpTimeout = new ConfigKey("Advanced", String.class, "quota.usage.smtp.connection.timeout", "60", - "Quota SMTP server connection timeout duration", true); + "Quota SMTP server connection timeout duration.", true); - public static final ConfigKey QuotaSmtpUser = new ConfigKey("Advanced", String.class, "quota.usage.smtp.user", "", "Quota SMTP server username", true); + public static final ConfigKey QuotaSmtpUser = new ConfigKey("Advanced", String.class, "quota.usage.smtp.user", "", "Quota SMTP server username.", true); - public static final ConfigKey QuotaSmtpPassword = new ConfigKey("Advanced", String.class, "quota.usage.smtp.password", "", "Quota SMTP server password", true); + public static final ConfigKey QuotaSmtpPassword = new ConfigKey("Advanced", String.class, "quota.usage.smtp.password", "", "Quota SMTP server password.", true); - public static final ConfigKey QuotaSmtpPort = new ConfigKey("Advanced", String.class, "quota.usage.smtp.port", "", "Quota SMTP port", true); + public static final ConfigKey QuotaSmtpPort = new ConfigKey("Advanced", String.class, "quota.usage.smtp.port", "", "Quota SMTP port.", true); public static final ConfigKey QuotaSmtpAuthType = new ConfigKey("Advanced", String.class, "quota.usage.smtp.useAuth", "", "If true, use secure SMTP authentication when sending emails.", true); public static final ConfigKey QuotaSmtpSender = new ConfigKey("Advanced", String.class, "quota.usage.smtp.sender", "", - "Sender of quota alert email (will be in the From header of the email)", true); + "Sender of quota alert email (will be in the From header of the email).", true); public static final ConfigKey QuotaSmtpEnabledSecurityProtocols = new ConfigKey("Advanced", String.class, "quota.usage.smtp.enabledSecurityProtocols", "", - "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", true); + "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2.", true); public static final ConfigKey QuotaSmtpUseStartTLS = new ConfigKey("Advanced", String.class, "quota.usage.smtp.useStartTLS", "false", - "If set to true and if we enable security via quota.usage.smtp.useAuth, this will enable StartTLS to secure the conection.", true); + "If set to true and if we enable security via quota.usage.smtp.useAuth, this will enable StartTLS to secure the connection.", true); enum QuotaEmailTemplateTypes { QUOTA_LOW, QUOTA_EMPTY, QUOTA_UNLOCK_ACCOUNT, QUOTA_STATEMENT