HostGpuGroupsVO gpuGroup = _hostGpuGroupsDao.findByHostIdGroupName(hostId, entry.getKey());
HashMap<String, VgpuTypesInfo> values = entry.getValue();
Iterator<Entry<String, VgpuTypesInfo>> it2 = values.entrySet().iterator();
while (it2.hasNext()) {
Entry<String, VgpuTypesInfo> record = it2.next();
VgpuTypesInfo details = record.getValue();
VGPUTypesVO vgpuType = null;
if ((vgpuType = findByGroupIdVGPUType(gpuGroup.getId(), record.getKey())) == null) {
persist(new VGPUTypesVO(gpuGroup.getId(), record.getKey(), details.getVideoRam(), details.getMaxHeads(), details.getMaxResolutionX(),
details.getMaxResolutionY(), details.getMaxVpuPerGpu(), details.getRemainingCapacity(), details.getMaxCapacity()));
} else {
vgpuType.setRemainingCapacity(details.getRemainingCapacity());
vgpuType.setMaxCapacity(details.getMaxCapacity());
update(vgpuType.getId(), vgpuType);
}
}
}
}