use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class HostedEngineImporter method doImport.
/**
* Import the VM into ovirt engine by removing the old, un-managed VM
* and re-import it with its disks and nics.
*
* @param vm the VM to import
*/
public void doImport(VM vm) {
StoragePool storagePool = storagePoolDao.getForCluster(vm.getClusterId());
if (!Config.<Boolean>getValue(ConfigValues.AutoImportHostedEngine)) {
return;
}
ActionReturnValue heVmImported;
// get the special sd of hosted engine
Guid storageDomainId = vm.getImages().get(0).getStorageIds().get(0);
StorageDomain sd = getHEStorageDomain(vm, storagePool, storageDomainId);
// no point in trying this without the SD
if (sd != null && (sd.getStatus() == StorageDomainStatus.Active) && storagePool.getStatus() == StoragePoolStatus.Up) {
log.info("Try to import the Hosted Engine VM '{}'", vm);
if (vmStaticDAO.get(vm.getId()) == null || removedHEVM(vm)) {
heVmImported = importHEVM(vm, sd);
if (heVmImported.getSucceeded()) {
resourceManager.getVmManager(vm.getId()).update(vm.getStaticData());
log.info("Successfully imported the Hosted Engine VM");
auditLogDirector.log(new AuditLogableImpl(), AuditLogType.HOSTED_ENGINE_VM_IMPORT_SUCCEEDED);
} else {
log.error("Failed importing the Hosted Engine VM");
auditLogDirector.log(new AuditLogableImpl(), AuditLogType.HOSTED_ENGINE_VM_IMPORT_FAILED);
}
}
} else {
if (sd == null) {
log.debug("Skip trying to import the Hosted Engine VM. Storage Domain '{}' doesn't exist", storageDomainId);
auditLogDirector.log(new AuditLogableImpl(), AuditLogType.HOSTED_ENGINE_SD_NOT_EXIT);
} else {
log.debug("Skip trying to import the Hosted Engine VM. Storage Domain '{}' isn't ACTIVE", sd);
auditLogDirector.log(new AuditLogableImpl(), AuditLogType.HOSTED_ENGINE_SD_NOT_ACTIVE);
}
}
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class IPTablesDeprecationNotifier method logWarning.
private void logWarning(Cluster cluster) {
AuditLogable auditLog = new AuditLogableImpl();
auditLog.setClusterId(cluster.getId());
auditLog.setClusterName(cluster.getName());
auditLog.addCustomValue("DeprecatingVersion", Version.v4_2.toString());
// we cannot add 4.3 to Version enum until 4.2 release is branched
auditLog.addCustomValue("RemovingVersion", "4.3");
auditLogDirector.log(auditLog, AuditLogType.DEPRECATED_IPTABLES_FIREWALL);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class GetVmsFromExternalProviderQuery method logFailureToGetVms.
private void logFailureToGetVms() {
AuditLogable logable = new AuditLogableImpl();
logable.addCustomValue("URL", getParameters().getUrl());
auditLogDirector.log(logable, AuditLogType.IMPORTEXPORT_GET_EXTERNAL_VMS_INFO_FAILED);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl 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.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class NetworkConfigurator method createEvent.
private AuditLogable createEvent() {
final AuditLogable event = new AuditLogableImpl();
event.setVdsName(host.getName());
event.setVdsId(host.getId());
return event;
}
Aggregations