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


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1898,10 +1927,65 @@ private Pair<VolumeVO, DataStore> 
recreateVolume(VolumeVO vol, VirtualMachinePro
         return new Pair<>(newVol, destPool);
     }
 
+    /**
+     * Helper method to retrieve KMS key from volume's kmsKeyId
+     */
+    private KMSKeyVO getKmsKeyFromVolume(VolumeVO volume) {
+        if (volume.getKmsKeyId() == null) {
+            return null;
+        }
+        return kmsKeyDao.findById(volume.getKmsKeyId());
+    }
+
     private VolumeVO setPassphraseForVolumeEncryption(VolumeVO volume) {
-        if (volume.getPassphraseId() != null) {
+        return setPassphraseForVolumeEncryption(volume, null, null);
+    }
+
+    private VolumeVO setPassphraseForVolumeEncryption(VolumeVO volume, 
KMSKeyVO kmsKey, Long callerAccountId) {

Review Comment:
   ```suggestion
       private VolumeVO setKmsKeyForVolumeEncryption(VolumeVO volume, KMSKeyVO 
kmsKey, Long callerAccountId) {
   ```
   
   change if relavant.



-- 
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