use of org.ovirt.engine.api.model.CpuType in project ovirt-engine by oVirt.
the class BackendClusterLevelsResource method makeClusterLevel.
public ClusterLevel makeClusterLevel(String version) {
ClusterLevel level = new ClusterLevel();
level.setId(version);
// Not exposing CPU list filtered queries:
if (!isFiltered()) {
CpuTypes cpuTypes = new CpuTypes();
for (ServerCpu serverCpu : getServerCpuList(version)) {
CpuType cpuType = new CpuType();
cpuType.setName(serverCpu.getCpuName());
cpuType.setLevel(serverCpu.getLevel());
cpuType.setArchitecture(CPUMapper.map(serverCpu.getArchitecture(), null));
cpuTypes.getCpuTypes().add(cpuType);
}
level.setCpuTypes(cpuTypes);
}
// Add permits:
Permits permits = new Permits();
for (ActionGroup actionGroup : getActionGroups()) {
Permit permit = PermitMapper.map(actionGroup, null);
permits.getPermits().add(permit);
}
level.setPermits(permits);
return LinkHelper.addLinks(level);
}
Aggregations