[
https://issues.apache.org/jira/browse/CLOUDSTACK-9297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204926#comment-15204926
]
ASF GitHub Bot commented on CLOUDSTACK-9297:
--------------------------------------------
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.
> delete snapshot without id is failing with Unable to determine the storage
> pool of the snapshot
> -----------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9297
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9297
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Affects Versions: 4.7.0, 4.8.0
> Environment: Ubuntu 14.04.3 management + kvm
> Reporter: Özhan Rüzgar Karaman
> Assignee: Mike Tutkowski
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)