Skip to content

Commit e19923c

Browse files
committed
Addressed comments
1 parent 9f643fc commit e19923c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class CopySnapshotCmd extends BaseAsyncCmd implements UserCmd {
9191
entityType = StoragePoolResponse.class,
9292
required = false,
9393
description = "A comma-separated list of IDs of the storage pools in other zones in which the snapshot will be made available. " +
94-
"The snapshot will always be made available in the zone in which the volume is present.")
94+
"The snapshot will always be made available in the zone in which the volume is present. Currently supported for StorPool only")
9595
protected List<Long> storagePoolIds;
9696

9797
/////////////////////////////////////////////////////

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public enum DataStoreCapabilities {
4444
/**
4545
* indicates that the driver supports copying snapshot between zones on pools of the same type
4646
*/
47-
CAN_COPY_SNAPSHOT_BETWEEN_ZONES,
47+
CAN_COPY_SNAPSHOT_BETWEEN_ZONES_AND_SAME_POOL_TYPE,
4848
/**
4949
* indicates that the storage does not need to delete the snapshot when creating a volume/template from it
5050
* and the setting `snapshot.backup.to.secondary` is enabled

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private SnapshotDataStoreVO getSnapshotImageStoreRef(long snapshotId, long zoneI
185185
@Override
186186
public Map<String, String> getCapabilities() {
187187
Map<String, String> mapCapabilities = new HashMap<>();
188-
mapCapabilities.put(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES.toString(), Boolean.TRUE.toString());
188+
mapCapabilities.put(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES_AND_SAME_POOL_TYPE.toString(), Boolean.TRUE.toString());
189189
mapCapabilities.put(DataStoreCapabilities.KEEP_SNAPSHOT_ON_PRIMARY_AND_BACKUP.toString(), Boolean.TRUE.toString());
190190
return mapCapabilities;
191191
}

server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3899,7 +3899,7 @@ private boolean canCopyOnPrimary(List<Long> poolIds, VolumeInfo volume, boolean
38993899
DataStore dataStore = dataStoreMgr.getDataStore(poolId, DataStoreRole.Primary);
39003900
StoragePoolVO sPool = _storagePoolDao.findById(poolId);
39013901
if (dataStore != null
3902-
&& !dataStore.getDriver().getCapabilities().containsKey(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES.toString())
3902+
&& !dataStore.getDriver().getCapabilities().containsKey(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES_AND_SAME_POOL_TYPE.toString())
39033903
&& sPool.getPoolType() != volume.getStoragePoolType()
39043904
&& volume.getPoolId() == poolId) {
39053905
throw new InvalidParameterValueException("The specified pool doesn't support copying snapshots between zones" + poolId);

server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ private boolean canCopyOnPrimary(List<Long> poolIds, Snapshot snapshot) {
21372137
continue;
21382138
}
21392139
if (!dataStore.getDriver().getCapabilities()
2140-
.containsKey(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES.toString())
2140+
.containsKey(DataStoreCapabilities.CAN_COPY_SNAPSHOT_BETWEEN_ZONES_AND_SAME_POOL_TYPE.toString())
21412141
&& dataStore.getPoolType() != volume.getPoolType()) {
21422142
poolsToBeRemoved.add(poolId);
21432143
logger.debug(String.format("The %s does not support copy to %s between zones", dataStore.getPoolType(), volume.getPoolType()));

0 commit comments

Comments
 (0)