Skip to content

Commit 460d312

Browse files
author
GabrielBrascher
committed
Fix conflict and merge forward PR #3122 from 4.11 to master (4.12)
2 parents ff07c17 + bf805d1 commit 460d312

5 files changed

Lines changed: 1545 additions & 80 deletions

File tree

engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.apache.cloudstack.engine.subsystem.api.storage;
1818

1919
import com.cloud.storage.Snapshot;
20+
import com.cloud.utils.exception.CloudRuntimeException;
2021

2122
public interface SnapshotInfo extends DataObject, Snapshot {
2223
SnapshotInfo getParent();
@@ -42,4 +43,6 @@ public interface SnapshotInfo extends DataObject, Snapshot {
4243
boolean isRevertable();
4344

4445
long getPhysicalSize();
46+
47+
void markBackedUp() throws CloudRuntimeException;
4548
}

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ public long getPhysicalSize() {
149149
return physicalSize;
150150
}
151151

152+
@Override
153+
public void markBackedUp() throws CloudRuntimeException{
154+
try {
155+
processEvent(Event.OperationNotPerformed);
156+
} catch (NoTransitionException ex) {
157+
s_logger.error("no transition error: ", ex);
158+
throw new CloudRuntimeException("Error marking snapshot backed up: " +
159+
this.snapshot.getId() + " " + ex.getMessage());
160+
}
161+
}
162+
152163
@Override
153164
public VolumeInfo getBaseVolume() {
154165
return volFactory.getVolume(snapshot.getVolumeId());

0 commit comments

Comments
 (0)