Revert "Update server/src/main/java/org/apache/cloudstack/storage/template/VnfTemplateManagerImpl.java"

This reverts commit 0bfc65aa00.
This commit is contained in:
Wei Zhou 2026-01-22 12:52:06 +01:00
parent 98890647a2
commit ed56c599b6
No known key found for this signature in database
GPG Key ID: 1503DFE7C8226103
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ public class VnfTemplateManagerImpl extends ManagerBase implements VnfTemplateMa
}
List<VnfTemplateNicVO> vnfNics = vnfTemplateNicDao.listByTemplateId(template.getId());
for (VnfTemplateNicVO vnfNic : vnfNics) {
if (vnfNic.isRequired() && !vmNetworkMap.containsKey(vnfNic.getDeviceId())) {
if (vnfNic.isRequired() && vmNetworkMap.size() <= vnfNic.getDeviceId()) {
throw new InvalidParameterValueException("VNF nic is required but not found: " + vnfNic);
}
}