use of org.ovirt.engine.core.common.businessentities.VmBase in project ovirt-engine by oVirt.
the class InstanceTypeManager method updateFildsAfterOsChanged.
public void updateFildsAfterOsChanged() {
deactivateAndStartProgress();
VmBase vmBase = getSource();
maybeSetSingleQxlPci(vmBase);
updateWatchdog(vmBase, false);
updateBalloon(vmBase, false);
maybeSetSelectedItem(model.getUsbPolicy(), vmBase.getUsbPolicy());
activate();
}
use of org.ovirt.engine.core.common.businessentities.VmBase in project ovirt-engine by oVirt.
the class AddVmPoolCommand method updateVmInitPassword.
@Override
protected void updateVmInitPassword() {
// so we need to update the VmInit password from its template.
if (getParameters().getVmStaticData().getVmInit() != null && getParameters().getVmStaticData().getVmInit().isPasswordAlreadyStored()) {
VmBase temp = new VmBase();
temp.setId(getParameters().getVmStaticData().getVmtGuid());
vmHandler.updateVmInitFromDB(temp, false);
getParameters().getVmStaticData().getVmInit().setRootPassword(temp.getVmInit().getRootPassword());
}
}
use of org.ovirt.engine.core.common.businessentities.VmBase in project ovirt-engine by oVirt.
the class GetEntitiesWithLeaseByStorageIdQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
Guid domainId = getParameters().getId();
List<VmBase> entities = new ArrayList<>();
entities.addAll(vmStaticDao.getAllWithLeaseOnStorageDomain(domainId));
entities.addAll(vmTemplateDao.getAllWithLeaseOnStorageDomain(domainId));
getQueryReturnValue().setReturnValue(entities);
}
use of org.ovirt.engine.core.common.businessentities.VmBase in project ovirt-engine by oVirt.
the class EmulatedMachineUtilsTest method testEffectiveEmulatedMachineWithCustomSet.
@Test
public void testEffectiveEmulatedMachineWithCustomSet() {
final VmBase vmBase = new VmBase();
final Cluster cluster = new Cluster();
cluster.setEmulatedMachine("cluster-pc-i440fx-rhel7.3.0");
vmBase.setCustomEmulatedMachine("testpc-i440fx-rhel7.3.0");
assertEquals("testpc-i440fx-rhel7.3.0", EmulatedMachineUtils.getEffective(vmBase, () -> cluster));
}
use of org.ovirt.engine.core.common.businessentities.VmBase in project ovirt-engine by oVirt.
the class EmulatedMachineUtilsTest method testEffectiveEmulatedMachineWithoutCustomSet.
@Test
public void testEffectiveEmulatedMachineWithoutCustomSet() {
final VmBase vmBase = new VmBase();
final Cluster cluster = new Cluster();
cluster.setEmulatedMachine("cluster-pc-i440fx-rhel7.3.0");
assertEquals("cluster-pc-i440fx-rhel7.3.0", EmulatedMachineUtils.getEffective(vmBase, () -> cluster));
}
Aggregations