Skip to content

Commit 5d4c773

Browse files
CSTACKEX-209: updating allowed snapshot name size to 255 as per the cloudstack and ontap supported scenarios
1 parent 37924f0 commit 5d4c773

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class OntapStorageConstants {
104104
public static final String PRIMARY_POOL_ID = "primary_pool_id";
105105
public static final String ONTAP_SNAP_SIZE = "ontap_snap_size";
106106
public static final String FILE_PATH = "file_path";
107-
public static final int MAX_SNAPSHOT_NAME_LENGTH = 64;
107+
public static final int MAX_SNAPSHOT_NAME_LENGTH = 255;
108108

109109
/** vm_snapshot_details key for ONTAP FlexVolume-level VM snapshots. */
110110
public static final String ONTAP_FLEXVOL_SNAPSHOT = "ontapFlexVolSnapshot";

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/vmsnapshot/OntapVMSnapshotStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ Map<String, FlexVolGroupInfo> groupVolumesByFlexVol(List<VolumeObjectTO> volumeT
673673
*/
674674
String buildSnapshotName(VMSnapshot vmSnapshot) {
675675
String name = "vmsnap_" + vmSnapshot.getId() + "_" + System.currentTimeMillis();
676-
// ONTAP snapshot names: max 256 chars, must start with letter, only alphanumeric and underscores
676+
// ONTAP snapshot names: max 255 chars, must start with letter, only alphanumeric and underscores
677677
if (name.length() > OntapStorageConstants.MAX_SNAPSHOT_NAME_LENGTH) {
678678
name = name.substring(0, OntapStorageConstants.MAX_SNAPSHOT_NAME_LENGTH);
679679
}

0 commit comments

Comments
 (0)