BryanMLima commented on code in PR #8933:
URL: https://github.com/apache/cloudstack/pull/8933#discussion_r1571419319
##########
server/src/main/java/com/cloud/template/HypervisorTemplateAdapter.java:
##########
@@ -306,12 +306,12 @@ protected void createTemplateWithinZones(TemplateProfile
profile, VMTemplateVO t
zonesIds =
_dcDao.listAllZones().stream().map(DataCenterVO::getId).collect(Collectors.toList());
}
- List<DataStore> imageStores =
getImageStoresThrowsExceptionIfNotFound(zonesIds, profile);
for (long zoneId : zonesIds) {
DataStore imageStore = verifyHeuristicRulesForZone(template,
zoneId);
if (imageStore == null) {
+ List<DataStore> imageStores =
getImageStoresThrowsExceptionIfNotFound(List.of(zoneId), profile);
Review Comment:
@weizhouapache, just one remark, with these changes the method
`getImageStoresThrowsExceptionIfNotFound` does not need to receive a List,
could you refactor to receive only the zone ID?
--
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]