sureshanaparti commented on code in PR #6812:
URL: https://github.com/apache/cloudstack/pull/6812#discussion_r994037448


##########
engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41710to41800.java:
##########
@@ -83,4 +92,55 @@ public void updateSystemVmTemplates(Connection conn) {
             throw new CloudRuntimeException("Failed to find / register 
SystemVM template(s)");
         }
     }
+
+    protected void decryptGlobalConfigurationValues(Connection conn) {
+        LOG.info("Decrypting global configuration values from the following 
tables: account_details and domain_details.");
+
+        Map<Long, String> accountsMap = selectValuesWithCustomConfigs(conn, 
ACCOUNT_DETAILS);
+        executeUpdateOnConfigValues(conn, accountsMap, ACCOUNT_DETAILS);
+        LOG.info("Successfully decrypted configurations from account_details 
table.");
+
+        Map<Long, String> domainsMap = selectValuesWithCustomConfigs(conn, 
DOMAIN_DETAILS);
+        executeUpdateOnConfigValues(conn, domainsMap, DOMAIN_DETAILS);
+        LOG.info("Successfully decrypted configurations from domain_details 
table.");
+    }
+
+    protected Map<Long, String> selectValuesWithCustomConfigs(Connection conn, 
String table) {

Review Comment:
   ```suggestion
       protected Map<Long, String> getConfigsWithScope(Connection conn, String 
table) {
   ```
   
   these are not custom configs, but configs updated with scope Account and 
Domain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to