Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,15 @@ private boolean saveMetadataList(List<HypervisorMetadataDefinition> definitions)

@Transactional
protected boolean saveHostOsCategoryList(List<HostOsCategoryVO> categoryVOS) {
if (CollectionUtils.isEmpty(categoryVOS)) {
logger.warn("no hypervisor metadata collected from DVD, skip refresh to preserve existing metadata");
return false;
}

// refresh all metadata with current management node
SQL.New(KvmHostHypervisorMetadataVO.class)
.eq(KvmHostHypervisorMetadataVO_.managementNodeUuid, Platform.getManagementServerId())
.delete();
if (CollectionUtils.isEmpty(categoryVOS)) {
return false;
}

Set<String> requestArchitectures = categoryVOS.stream()
.map(HostOsCategoryVO::getArchitecture)
Expand Down