use of org.ovirt.engine.core.common.businessentities.VmStatic in project ovirt-engine by oVirt.
the class RemoveGraphicsAndVideoDevicesCommand method setVmToHeadlessMode.
private boolean setVmToHeadlessMode() {
VmStatic vmStatic = vmStaticDao.get(getVmBaseId());
if (vmStatic != null && vmStatic.getDefaultDisplayType() != DisplayType.none) {
vmStatic.setDefaultDisplayType(DisplayType.none);
vmStatic.setSingleQxlPci(false);
resourceManager.getVmManager(getVmBaseId()).update(vmStatic);
return true;
}
return false;
}
use of org.ovirt.engine.core.common.businessentities.VmStatic in project ovirt-engine by oVirt.
the class AbstractVmInterfaceCommand method bumpVmVersion.
protected void bumpVmVersion() {
final VmStatic vmStaticData = getVm().getStaticData();
getCompensationContext().snapshotEntity(vmStaticData);
vmStaticDao.incrementDbGeneration(vmStaticData.getId());
}
use of org.ovirt.engine.core.common.businessentities.VmStatic in project ovirt-engine by oVirt.
the class AddVmCommandTestBase method initVM.
protected void initVM() {
vm = new VM();
VmDynamic dynamic = new VmDynamic();
VmStatic stat = new VmStatic();
stat.setVmtGuid(Guid.newGuid());
stat.setName("testVm");
stat.setPriority(1);
stat.setMemSizeMb(MEMORY_SIZE);
stat.setMaxMemorySizeMb(MAX_MEMORY_SIZE);
vm.setStaticData(stat);
vm.setDynamicData(dynamic);
vm.setSingleQxlPci(false);
}
use of org.ovirt.engine.core.common.businessentities.VmStatic in project ovirt-engine by oVirt.
the class ProcessOvfUpdateForStoragePoolCommandTest method createVmStatic.
public VmStatic createVmStatic() {
VmStatic vms = new VmStatic();
vms.setDbGeneration(1L);
return vms;
}
use of org.ovirt.engine.core.common.businessentities.VmStatic in project ovirt-engine by oVirt.
the class InstanceTypeMapper method map.
@Mapping(from = InstanceType.class, to = VmStatic.class)
public static VmStatic map(InstanceType model, VmStatic incoming) {
VmStatic staticVm = incoming != null ? incoming : new VmStatic();
mapCommonModelToEntity(staticVm, model);
return staticVm;
}
Aggregations