use of org.ovirt.engine.core.common.businessentities.VdsDynamic in project ovirt-engine by oVirt.
the class UpdateVdsCommand method checkKdumpIntegrationStatus.
private void checkKdumpIntegrationStatus() {
VdsStatic vdsSt = getParameters().getVdsStaticData();
if (vdsSt.isPmEnabled() && vdsSt.isPmKdumpDetection()) {
VdsDynamic vdsDyn = vdsDynamicDao.get(vdsSt.getId());
if (vdsDyn != null && vdsDyn.getKdumpStatus() != KdumpStatus.ENABLED) {
AuditLogable logable = new AuditLogableImpl();
logable.setVdsId(vdsSt.getId());
logable.setVdsName(vdsSt.getName());
auditLogDirector.log(logable, AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS);
}
}
}
use of org.ovirt.engine.core.common.businessentities.VdsDynamic in project ovirt-engine by oVirt.
the class UpgradeHostInternalCommand method updateHostStatusAfterSuccessfulUpgrade.
public void updateHostStatusAfterSuccessfulUpgrade() {
VdsDynamic dynamicHostData = vdsDynamicDao.get(getVdsId());
dynamicHostData.setUpdateAvailable(false);
vdsDynamicDao.update(dynamicHostData);
if (getVds().getVdsType() == VDSType.VDS && !getParameters().isReboot()) {
if (getParameters().getInitialStatus() == VDSStatus.Maintenance) {
setVdsStatus(VDSStatus.Maintenance);
} else {
setVdsStatus(VDSStatus.Initializing);
}
}
}
use of org.ovirt.engine.core.common.businessentities.VdsDynamic in project ovirt-engine by oVirt.
the class VdsDynamicDaoTest method testUpdateDnsResolverConfiguration.
@Test
public void testUpdateDnsResolverConfiguration() {
VdsDynamic before = dao.get(getExistingEntityId());
before.getReportedDnsResolverConfiguration().setNameServers(Collections.singletonList(new NameServer("1.1.1.1")));
dao.updateDnsResolverConfiguration(before.getId(), before.getReportedDnsResolverConfiguration());
VdsDynamic after = dao.get(getExistingEntityId());
assertEquals(before.getReportedDnsResolverConfiguration(), after.getReportedDnsResolverConfiguration());
}
use of org.ovirt.engine.core.common.businessentities.VdsDynamic in project ovirt-engine by oVirt.
the class VdsDynamicDaoTest method testUpdateAvailableUpdates.
@Test
public void testUpdateAvailableUpdates() {
VdsDynamic before = dao.get(FixturesTool.VDS_GLUSTER_SERVER2);
assertFalse(before.isUpdateAvailable());
before.setUpdateAvailable(true);
dao.updateUpdateAvailable(before.getId(), before.isUpdateAvailable());
VdsDynamic after = dao.get(FixturesTool.VDS_GLUSTER_SERVER2);
assertEquals(before.isUpdateAvailable(), after.isUpdateAvailable());
}
use of org.ovirt.engine.core.common.businessentities.VdsDynamic in project ovirt-engine by oVirt.
the class VdsDynamicDaoTest method testUpdateHostExternalStatus.
@Test
public void testUpdateHostExternalStatus() {
VdsDynamic before = dao.get(FixturesTool.VDS_GLUSTER_SERVER2);
before.setExternalStatus(ExternalStatus.Error);
dao.updateExternalStatus(before.getId(), before.getExternalStatus());
VdsDynamic after = dao.get(FixturesTool.VDS_GLUSTER_SERVER2);
assertEquals(before.getExternalStatus(), after.getExternalStatus());
}
Aggregations