Search in sources :

Example 6 with VmStatic

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;
}
Also used : VmStatic(org.ovirt.engine.core.common.businessentities.VmStatic)

Example 7 with VmStatic

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());
}
Also used : VmStatic(org.ovirt.engine.core.common.businessentities.VmStatic)

Example 8 with VmStatic

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);
}
Also used : VmDynamic(org.ovirt.engine.core.common.businessentities.VmDynamic) VM(org.ovirt.engine.core.common.businessentities.VM) VmStatic(org.ovirt.engine.core.common.businessentities.VmStatic)

Example 9 with VmStatic

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;
}
Also used : VmStatic(org.ovirt.engine.core.common.businessentities.VmStatic)

Example 10 with VmStatic

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;
}
Also used : VmStatic(org.ovirt.engine.core.common.businessentities.VmStatic)

Aggregations

VmStatic (org.ovirt.engine.core.common.businessentities.VmStatic)87 Test (org.junit.Test)26 Guid (org.ovirt.engine.core.compat.Guid)15 VM (org.ovirt.engine.core.common.businessentities.VM)11 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)9 VmDynamic (org.ovirt.engine.core.common.businessentities.VmDynamic)8 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)8 Label (org.ovirt.engine.core.common.businessentities.Label)7 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)5 HashSet (java.util.HashSet)4 Map (java.util.Map)4 Response (javax.ws.rs.core.Response)4 AddVmTemplateParameters (org.ovirt.engine.core.common.action.AddVmTemplateParameters)4 LabelBuilder (org.ovirt.engine.core.common.businessentities.LabelBuilder)4 VmDevice (org.ovirt.engine.core.common.businessentities.VmDevice)4 VmStatistics (org.ovirt.engine.core.common.businessentities.VmStatistics)4 ArrayList (java.util.ArrayList)3 Date (java.util.Date)3 PostConstruct (javax.annotation.PostConstruct)3 Before (org.junit.Before)3