Skip to content
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7d638fc
KVM incremental snapshot feature
JoaoJandre Jun 17, 2024
47ab0c2
fix log
JoaoJandre Jun 19, 2024
f57b1aa
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Jun 25, 2024
6f41337
fix merge issues
JoaoJandre Jun 25, 2024
717d330
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Jul 1, 2024
6024631
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Jul 11, 2024
5b37591
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Jul 15, 2024
00d87c2
fix creation of folder
JoaoJandre Jul 23, 2024
63251da
fix snapshot update
JoaoJandre Jul 23, 2024
2baf1ed
Check for hypervisor type during parent search
JoaoJandre Jul 25, 2024
e54629d
fix some small bugs
JoaoJandre Jul 26, 2024
6125dd9
fix tests
JoaoJandre Jul 29, 2024
b10fee7
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Aug 7, 2024
0871a06
Address reviews
JoaoJandre Aug 16, 2024
fb7ff52
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Aug 21, 2024
be6b257
do not remove storPool snapshots
JoaoJandre Aug 22, 2024
2b9b2d3
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Aug 22, 2024
b088e71
add support for downloading diff snaps
JoaoJandre Aug 26, 2024
cdb11c1
Add multiple zones support
JoaoJandre Aug 27, 2024
bc8282e
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Aug 27, 2024
52697b3
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Aug 28, 2024
8982356
make copied snapshots have normal names
JoaoJandre Aug 28, 2024
eeaa85c
address reviews
JoaoJandre Sep 2, 2024
3a48f1f
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Sep 6, 2024
dff1f6d
Fix in progress
JoaoJandre Sep 10, 2024
8e26579
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Oct 18, 2024
b8b6b8c
continue fix
JoaoJandre Oct 18, 2024
3dd52c6
Fix bulk delete
JoaoJandre Oct 29, 2024
89cc8b4
change log to trace
JoaoJandre Oct 29, 2024
e3443c8
Start fix on multiple secondary storages for a single zone
JoaoJandre Nov 4, 2024
885d2a4
Fix multiple secondary storages for a single zone
JoaoJandre Nov 7, 2024
1d5eebb
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Nov 7, 2024
59dc3e7
Fix tests
JoaoJandre Nov 8, 2024
a46e6b9
fix log
JoaoJandre Nov 12, 2024
8114bac
remove bitmaps when deleting snapshots
JoaoJandre Nov 14, 2024
e63fb7a
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Nov 14, 2024
91f09c8
minor fixes
JoaoJandre Nov 28, 2024
77b034c
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Dec 5, 2024
3d657f1
update sql to new file
JoaoJandre Dec 5, 2024
c026486
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Dec 10, 2024
e951d15
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Jan 30, 2025
afab72f
Fix merge issues
JoaoJandre Jan 31, 2025
1d849d4
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Feb 3, 2025
e2bd617
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Feb 7, 2025
02fcce4
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Feb 13, 2025
add5395
Create new snap chain when changing configuration
Feb 10, 2025
7d2e48a
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Feb 28, 2025
878350e
add verification
Mar 10, 2025
7373a5c
Fix snapshot operation selector
Mar 10, 2025
4e6cacd
fix bitmap removal
Mar 11, 2025
3a9ebbf
fix chain on different storages
Mar 18, 2025
68d15b4
address reviews
JoaoJandre Mar 27, 2025
1766990
fix small issue
JoaoJandre Apr 8, 2025
1940c17
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre Apr 15, 2025
f7095c3
Merge remote-tracking branch 'origin' into differential-snapshots
JoaoJandre Apr 28, 2025
e94280f
fix test
JoaoJandre Apr 28, 2025
51d5f65
Merge remote-tracking branch 'origin/main' into differential-snapshots
JoaoJandre May 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions agent/conf/agent.properties
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,9 @@ iscsi.session.cleanup.enabled=false

# Wait(in seconds) during agent reconnections. When no value is set then default value of 5s will be used
#backoff.seconds=

# Timeout (in seconds) to wait for the snapshot reversion to complete.
# revert.snapshot.timeout=10800

# Timeout (in seconds) to wait for the incremental snapshot to complete.
# incremental.snapshot.timeout=10800
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,16 @@ public Property<Integer> getWorkers() {
*/
public static final Property<Integer> SSL_HANDSHAKE_TIMEOUT = new Property<>("ssl.handshake.timeout", null, Integer.class);

/**
* Timeout (in seconds) to wait for the incremental snapshot to complete.
* */
public static final Property<Integer> INCREMENTAL_SNAPSHOT_TIMEOUT = new Property<>("incremental.snapshot.timeout", 10800);

/**
* Timeout (in seconds) to wait for the snapshot reversion to complete.
* */
public static final Property<Integer> REVERT_SNAPSHOT_TIMEOUT = new Property<>("revert.snapshot.timeout", 10800);

public static class Property <T>{
private String name;
private T defaultValue;
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/storage/Snapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean equals(String snapshotType) {
}

public enum State {
Allocated, Creating, CreatedOnPrimary, BackingUp, BackedUp, Copying, Destroying, Destroyed,
Allocated, Creating, CreatedOnPrimary, BackingUp, BackedUp, Copying, Destroying, Destroyed, Hidden,
//it's a state, user can't see the snapshot from ui, while the snapshot may still exist on the storage
Error;

Expand Down
36 changes: 36 additions & 0 deletions core/src/main/java/com/cloud/agent/api/ConvertSnapshotAnswer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package com.cloud.agent.api;

import org.apache.cloudstack.storage.to.SnapshotObjectTO;

public class ConvertSnapshotAnswer extends Answer {

private SnapshotObjectTO snapshotObjectTO;

public ConvertSnapshotAnswer(SnapshotObjectTO snapshotObjectTO) {
super(null);
this.snapshotObjectTO = snapshotObjectTO;
}

Check warning on line 31 in core/src/main/java/com/cloud/agent/api/ConvertSnapshotAnswer.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/ConvertSnapshotAnswer.java#L29-L31

Added lines #L29 - L31 were not covered by tests

public SnapshotObjectTO getSnapshotObjectTO() {
return snapshotObjectTO;
}

Check warning on line 35 in core/src/main/java/com/cloud/agent/api/ConvertSnapshotAnswer.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/ConvertSnapshotAnswer.java#L33-L35

Added lines #L33 - L35 were not covered by tests
}
42 changes: 42 additions & 0 deletions core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package com.cloud.agent.api;

import org.apache.cloudstack.storage.to.SnapshotObjectTO;

public class ConvertSnapshotCommand extends Command {

public static final String TEMP_SNAPSHOT_NAME = "_temp";

SnapshotObjectTO snapshotObjectTO;

public SnapshotObjectTO getSnapshotObjectTO() {
return snapshotObjectTO;
}

Check warning on line 32 in core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java#L30-L32

Added lines #L30 - L32 were not covered by tests

public ConvertSnapshotCommand(SnapshotObjectTO snapshotObjectTO) {
this.snapshotObjectTO = snapshotObjectTO;
}

Check warning on line 36 in core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java#L34-L36

Added lines #L34 - L36 were not covered by tests

@Override
public boolean executeInSequence() {
return true;
}

Check warning on line 41 in core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/ConvertSnapshotCommand.java#L39-L41

Added lines #L39 - L41 were not covered by tests
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//

package com.cloud.agent.api;

import org.apache.cloudstack.storage.to.VolumeObjectTO;

import java.util.List;

public class RecreateCheckpointsCommand extends Command {

private List<VolumeObjectTO> volumes;

private String vmName;

public RecreateCheckpointsCommand(List<VolumeObjectTO> volumes, String vmName) {
this.volumes = volumes;
this.vmName = vmName;
}

public List<VolumeObjectTO> getDisks() {
return volumes;
}

Check warning on line 39 in core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java#L37-L39

Added lines #L37 - L39 were not covered by tests

public String getVmName() {
return vmName;
}

Check warning on line 43 in core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java#L41-L43

Added lines #L41 - L43 were not covered by tests

@Override
public boolean executeInSequence() {
return true;
}

Check warning on line 48 in core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RecreateCheckpointsCommand.java#L46-L48

Added lines #L46 - L48 were not covered by tests
}
46 changes: 46 additions & 0 deletions core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.agent.api;

import org.apache.cloudstack.storage.to.SnapshotObjectTO;

public class RemoveBitmapCommand extends Command {

private SnapshotObjectTO snapshotObjectTO;

private boolean isVmRunning;

public RemoveBitmapCommand(SnapshotObjectTO snapshotObjectTO, boolean isVmRunning) {
this.snapshotObjectTO = snapshotObjectTO;
this.isVmRunning = isVmRunning;
}

Check warning on line 32 in core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java#L29-L32

Added lines #L29 - L32 were not covered by tests

@Override
public boolean executeInSequence() {
return true;
}

Check warning on line 37 in core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java#L35-L37

Added lines #L35 - L37 were not covered by tests

public SnapshotObjectTO getSnapshotObjectTO() {
return snapshotObjectTO;
}

Check warning on line 41 in core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java#L39-L41

Added lines #L39 - L41 were not covered by tests

public boolean isVmRunning() {
return isVmRunning;
}

Check warning on line 45 in core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/RemoveBitmapCommand.java#L43-L45

Added lines #L43 - L45 were not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}
return new CreateObjectAnswer("not supported type");
} catch (Exception e) {
logger.debug("Failed to create object: " + data.getObjectType() + ": " + e.toString());
logger.error("Failed to create object [{}] due to [{}].", data.getObjectType(), e.getMessage(), e);

Check warning on line 145 in core/src/main/java/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/storage/resource/StorageSubsystemCommandHandlerBase.java#L145

Added line #L145 was not covered by tests
return new CreateObjectAnswer(e.toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class TemplateConstants {
public static final String DEFAULT_SNAPSHOT_ROOT_DIR = "snapshots";
public static final String DEFAULT_VOLUME_ROOT_DIR = "volumes";
public static final String DEFAULT_TMPLT_FIRST_LEVEL_DIR = "tmpl/";

public static final String DEFAULT_CHECKPOINT_ROOT_DIR = "checkpoints";
public static final String DEFAULT_SYSTEM_VM_TEMPLATE_PATH = "template/tmpl/1/";

public static final int DEFAULT_TMPLT_COPY_PORT = 80;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@
private VolumeObjectTO volume;
private String parentSnapshotPath;
private DataStoreTO dataStore;
private DataStoreTO imageStore;
private boolean kvmIncrementalSnapshot = false;
private String vmName;
private String name;
private HypervisorType hypervisorType;
private long id;
private boolean quiescevm;
private String[] parents;
private DataStoreTO parentStore;
private String checkpointPath;
private Long physicalSize = (long) 0;
private long accountId;

Expand All @@ -49,6 +53,11 @@

}

@Override
public DataObjectType getObjectType() {
return DataObjectType.SNAPSHOT;
}

Check warning on line 59 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L57-L59

Added lines #L57 - L59 were not covered by tests

public SnapshotObjectTO(SnapshotInfo snapshot) {
this.path = snapshot.getPath();
this.setId(snapshot.getId());
Expand All @@ -59,27 +68,28 @@
this.setVmName(vol.getAttachedVmName());
}

SnapshotInfo parentSnapshot = snapshot.getParent();
ArrayList<String> parentsArry = new ArrayList<String>();
if (parentSnapshot != null) {
this.parentSnapshotPath = parentSnapshot.getPath();
while(parentSnapshot != null) {
parentsArry.add(parentSnapshot.getPath());
parentSnapshot = parentSnapshot.getParent();
}
parents = parentsArry.toArray(new String[parentsArry.size()]);
ArrayUtils.reverse(parents);
}

this.dataStore = snapshot.getDataStore().getTO();
this.setName(snapshot.getName());
this.hypervisorType = snapshot.getHypervisorType();
this.quiescevm = false;
}

@Override
public DataObjectType getObjectType() {
return DataObjectType.SNAPSHOT;
this.checkpointPath = snapshot.getCheckpointPath();
this.kvmIncrementalSnapshot = snapshot.isKvmIncrementalSnapshot();

SnapshotInfo parentSnapshot = snapshot.getParent();

if (parentSnapshot == null || (HypervisorType.KVM.equals(snapshot.getHypervisorType()) && !parentSnapshot.isKvmIncrementalSnapshot())) {
return;
}

ArrayList<String> parentsArray = new ArrayList<>();
this.parentSnapshotPath = parentSnapshot.getPath();

Check warning on line 86 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L85-L86

Added lines #L85 - L86 were not covered by tests
while (parentSnapshot != null) {
parentsArray.add(parentSnapshot.getPath());
parentSnapshot = parentSnapshot.getParent();

Check warning on line 89 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L88-L89

Added lines #L88 - L89 were not covered by tests
}
parents = parentsArray.toArray(new String[parentsArray.size()]);
ArrayUtils.reverse(parents);

Check warning on line 92 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L91-L92

Added lines #L91 - L92 were not covered by tests
}

@Override
Expand All @@ -91,6 +101,30 @@
this.dataStore = store;
}

public DataStoreTO getImageStore() {
return imageStore;
}

Check warning on line 106 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L104-L106

Added lines #L104 - L106 were not covered by tests

public void setImageStore(DataStoreTO imageStore) {
this.imageStore = imageStore;
}

Check warning on line 110 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L108-L110

Added lines #L108 - L110 were not covered by tests

public boolean isKvmIncrementalSnapshot() {
return kvmIncrementalSnapshot;
}

Check warning on line 114 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L112-L114

Added lines #L112 - L114 were not covered by tests

public void setKvmIncrementalSnapshot(boolean kvmIncrementalSnapshot) {
this.kvmIncrementalSnapshot = kvmIncrementalSnapshot;
}

Check warning on line 118 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L116-L118

Added lines #L116 - L118 were not covered by tests

public String getCheckpointPath() {
return checkpointPath;
}

Check warning on line 122 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L120-L122

Added lines #L120 - L122 were not covered by tests

public void setCheckpointPath(String checkpointPath) {
this.checkpointPath = checkpointPath;
}

Check warning on line 126 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L124-L126

Added lines #L124 - L126 were not covered by tests

@Override
public String getPath() {
return this.path;
Expand Down Expand Up @@ -178,6 +212,14 @@
this.accountId = accountId;
}

public DataStoreTO getParentStore() {
return parentStore;
}

Check warning on line 217 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L215-L217

Added lines #L215 - L217 were not covered by tests

public void setParentStore(DataStoreTO parentStore) {
this.parentStore = parentStore;
}

Check warning on line 221 in core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java#L219-L221

Added lines #L219 - L221 were not covered by tests

@Override
public String toString() {
return new StringBuilder("SnapshotTO[datastore=").append(dataStore).append("|volume=").append(volume).append("|path").append(path).append("]").toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Set;

public class VolumeObjectTO extends DownloadableObjectTO implements DataTO {
private String uuid;
Expand Down Expand Up @@ -76,6 +78,8 @@
@LogLevel(LogLevel.Log4jLevel.Off)
private byte[] passphrase;
private String encryptFormat;
private List<String> checkpointPaths;
private Set<String> checkpointImageStoreUrls;

public VolumeObjectTO() {

Expand Down Expand Up @@ -122,6 +126,8 @@
this.passphrase = volume.getPassphrase();
this.encryptFormat = volume.getEncryptFormat();
this.followRedirects = volume.isFollowRedirects();
this.checkpointPaths = volume.getCheckpointPaths();
this.checkpointImageStoreUrls = volume.getCheckpointImageStoreUrls();

Check warning on line 130 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L129-L130

Added lines #L129 - L130 were not covered by tests
}

public String getUuid() {
Expand Down Expand Up @@ -397,4 +403,21 @@
public boolean requiresEncryption() {
return passphrase != null && passphrase.length > 0;
}


public List<String> getCheckpointPaths() {

Check warning on line 408 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L408

Added line #L408 was not covered by tests
return checkpointPaths;
}

Check warning on line 410 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L410

Added line #L410 was not covered by tests

public void setCheckpointPaths(List<String> checkpointPaths) {
this.checkpointPaths = checkpointPaths;
}

Check warning on line 414 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L412-L414

Added lines #L412 - L414 were not covered by tests

public Set<String> getCheckpointImageStoreUrls() {
return checkpointImageStoreUrls;
}

Check warning on line 418 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L416-L418

Added lines #L416 - L418 were not covered by tests

public void setCheckpointImageStoreUrls(Set<String> checkpointImageStoreUrls) {
this.checkpointImageStoreUrls = checkpointImageStoreUrls;
}

Check warning on line 422 in core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/org/apache/cloudstack/storage/to/VolumeObjectTO.java#L420-L422

Added lines #L420 - L422 were not covered by tests
}
Loading
Loading