Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1441#discussion_r56880597
  
    --- Diff: 
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
 ---
    @@ -279,7 +282,52 @@ public boolean deleteSnapshot(Long snapshotId) {
     
         @Override
         public boolean revertSnapshot(SnapshotInfo snapshot) {
    -        throw new CloudRuntimeException("revert Snapshot is not 
supported");
    +        if (canHandle(snapshot,SnapshotOperation.REVERT) == 
StrategyPriority.CANT_HANDLE) {
    --- End diff --
    
    Hi @DaanHoogland, this was only my first doubt (question). After that, 
@mike-tutkowski  and I exchanged some other messages and then I understood the 
method. I see why a boolean return would not suffice all of its needs.
    
    I was misled by the name of the method. Every time I see a method name that 
starts with "can/has/is", I think that it will return a boolean value. 
    
    The code of this PR is OK for me; I would only suggest a name change on 
that "canHandle" method to a more descriptive one.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to