cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] DaanHoogland commented on a change in pull request #2636: Fix limitation on tag matching in 'migrateVolume' with disk offering replacement
Date Fri, 20 Jul 2018 07:38:54 GMT
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_r203960702
 
 

 ##########
 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:
   wrong advice here, see below

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message