piyush5netapp commented on code in PR #13578:
URL: https://github.com/apache/cloudstack/pull/13578#discussion_r3579269309
##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java:
##########
@@ -139,10 +139,15 @@ public static StorageStrategy
getStrategyByStoragePoolDetails(Map<String, String
}
}
- public static String getIgroupName(String svmName, String hostName) {
- //Igroup name format: cs_svmName_hostName
- String sanitizedHostName =
hostName.split("\\.")[0].replaceAll("[^a-zA-Z0-9_-]", "_");
- return OntapStorageConstants.CS + OntapStorageConstants.UNDERSCORE +
svmName + OntapStorageConstants.UNDERSCORE + sanitizedHostName;
+ public static String getIgroupName(String svmName, String hostUuid) {
+ //Igroup name format: cs_svmName_hostUuid
+ String sanitizedHostUuid = hostUuid.replaceAll("[^a-zA-Z0-9_-]", "_");
+ String igroupName = OntapStorageConstants.CS +
OntapStorageConstants.UNDERSCORE + svmName + OntapStorageConstants.UNDERSCORE +
sanitizedHostUuid;
+ // ONTAP igroup names are limited to 96 characters; truncate if longer.
+ if (igroupName.length() >
OntapStorageConstants.IGROUP_NAME_MAX_LENGTH) {
+ igroupName = igroupName.substring(0,
OntapStorageConstants.IGROUP_NAME_MAX_LENGTH);
+ }
+ return igroupName;
}
Review Comment:
we have updated logic to have format cs_hostUuid_svmName.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]