DaanHoogland commented on a change in pull request #2636: Fix limitation on tag matching in 'migrateVolume' with disk offering replacement URL: https://github.com/apache/cloudstack/pull/2636#discussion_r203959859
########## File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java ########## @@ -2221,17 +2221,22 @@ protected void validateConditionsToReplaceDiskOfferingOfVolume(VolumeVO volume, * </body> * </table> */ - public boolean doesTargetStorageSupportDiskOffering(StoragePool destPool, DiskOfferingVO newDiskOffering) { + protected boolean doesTargetStorageSupportNewDiskOffering(StoragePool destPool, DiskOfferingVO newDiskOffering) { String newDiskOfferingTags = newDiskOffering.getTags(); - if (org.apache.commons.lang.StringUtils.isBlank(newDiskOfferingTags)) { + return doesTargetStorageSupportDiskOffering(destPool, newDiskOfferingTags); + } + + @Override + public boolean doesTargetStorageSupportDiskOffering(StoragePool destPool, String diskOfferingTags) { + if (org.apache.commons.lang.StringUtils.isBlank(diskOfferingTags)) { return true; } String storagePoolTags = getStoragePoolTags(destPool); if (org.apache.commons.lang.StringUtils.isBlank(storagePoolTags)) { return false; } String[] storageTagsAsStringArray = org.apache.commons.lang.StringUtils.split(storagePoolTags, ","); - String[] newDiskOfferingTagsAsStringArray = org.apache.commons.lang.StringUtils.split(newDiskOfferingTags, ","); + String[] newDiskOfferingTagsAsStringArray = org.apache.commons.lang.StringUtils.split(diskOfferingTags, ","); Review comment: there is a StringUtils.listToCsvTags() method. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services