diff --git a/bocloud.cos.service/src/main/java/com/bocloud/cos/service/ResourceScreenServiceImpl.java b/bocloud.cos.service/src/main/java/com/bocloud/cos/service/ResourceScreenServiceImpl.java index 470687e..67897b2 100644 --- a/bocloud.cos.service/src/main/java/com/bocloud/cos/service/ResourceScreenServiceImpl.java +++ b/bocloud.cos.service/src/main/java/com/bocloud/cos/service/ResourceScreenServiceImpl.java @@ -105,7 +105,10 @@ public class ResourceScreenServiceImpl implements ResourceScreenService { long cpuTotal = 0L; Long memTotal = 0L; int diskTotal = 0; - List hosts = imsInternalService.listHosts(); + List hostAll = imsInternalService.listHosts(); + List hosts = hostAll.stream().filter( + server -> null != server.getVendorType() && vendors.contains(server.getVendorType())) + .collect(Collectors.toList()); hosts.removeIf(server -> null == server.getVendorId()); Map> hostMap = hosts.stream().filter(server -> null != server.getVendorId()) .collect(Collectors.groupingBy(Server::getVendorId));