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


##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1696,6 +1696,12 @@ public boolean stateTransitTo(Volume vol, Volume.Event 
event) throws NoTransitio
     }
 
     public void validateDestroyVolume(Volume volume, Account caller, boolean 
expunge, boolean forceExpunge) {
+        if (volume.isDeleteProtection()) {
+            throw new InvalidParameterValueException(String.format(
+                    "Volume [id = %s , name = %s has delete protection enabled 
and cannot be deleted.",

Review Comment:
   ```suggestion
                       "Volume [id = %s, name = %s] has delete protection 
enabled and cannot be deleted.",
   ```



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