sureshanaparti commented on a change in pull request #5043:
URL: https://github.com/apache/cloudstack/pull/5043#discussion_r641532724



##########
File path: 
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -2803,29 +2803,9 @@ public ServiceOffering updateServiceOffering(final 
UpdateServiceOfferingCmd cmd)
             offering.setSortKey(sortKey);
         }
 
-        // Note: tag editing commented out for now; keeping the code intact,
-        // might need to re-enable in next releases
-        // if (tags != null)
-        // {
-        // if (tags.trim().isEmpty() && offeringHandle.getTags() == null)
-        // {
-        // //no new tags; no existing tags
-        // offering.setTagsArray(csvTagsToList(null));
-        // }
-        // else if (!tags.trim().isEmpty() && offeringHandle.getTags() != null)
-        // {
-        // //new tags + existing tags
-        // List<String> oldTags = csvTagsToList(offeringHandle.getTags());
-        // List<String> newTags = csvTagsToList(tags);
-        // oldTags.addAll(newTags);
-        // offering.setTagsArray(oldTags);
-        // }
-        // else if(!tags.trim().isEmpty())
-        // {
-        // //new tags; NO existing tags
-        // offering.setTagsArray(csvTagsToList(tags));
-        // }
-        // }
+        updateOfferingTagsIfIsNotNull(cmd.getTags(), offering);
+
+        updateServiceOfferingHostTagsIfNotNull(cmd.getHostTag(), offering);

Review comment:
       does these calls replace the current storage and host tags in the 
offering? what if any VM / Volume using the offering with tags and these tags 
get updated with this API?
   




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to