Search in sources :

Example 86 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.

the class MetadataDiskDescriptionHandler method auditLogFailedToStoreDiskFields.

private void auditLogFailedToStoreDiskFields(String diskAlias, String diskFieldsNames) {
    AuditLogable logable = createDiskEvent(diskAlias);
    logable.addCustomValue("DiskFieldsNames", diskFieldsNames);
    auditLogDirector.log(logable, AuditLogType.FAILED_TO_STORE_DISK_FIELDS_IN_DISK_DESCRIPTION_METADATA);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)

Example 87 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.

the class RegisterDiskCommand method addRegisterInitatedAuditLog.

private void addRegisterInitatedAuditLog() {
    AuditLogable logable = new AuditLogableImpl();
    logable.addCustomValue("DiskAlias", getDiskImage().getDiskAlias());
    auditLogDirector.log(logable, AuditLogType.USER_REGISTER_DISK_INITIATED);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 88 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.

the class IrsBrokerCommand method logToAudit.

@Override
protected void logToAudit() {
    AuditLogable logable = new AuditLogableImpl();
    logable.addCustomValue("CommandName", getCommandName());
    logable.addCustomValue("message", getReturnStatus().message);
    auditLogDirector.log(logable, AuditLogType.IRS_BROKER_COMMAND_FAILURE);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 89 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.

the class IrsProxy method queueDomainMaintenanceCheck.

public void queueDomainMaintenanceCheck(final StorageDomain domain, final StoragePool pool) {
    getEventQueue().submitEventAsync(new Event(storagePoolId, domain.getId(), null, EventType.DOMAINFAILOVER, ""), () -> {
        Collection<Guid> vdsConnectedToPool = getVdsConnectedToPool(storagePoolId);
        Set<Guid> vdsDomInMaintenance = _domainsInMaintenance.get(domain.getId());
        if (vdsConnectedToPool.isEmpty() || (vdsDomInMaintenance != null && vdsDomInMaintenance.containsAll(vdsConnectedToPool))) {
            log.info("Moving domain '{}' to maintenance", domain.getId());
            storagePoolIsoMapDao.updateStatus(domain.getStoragePoolIsoMapData().getId(), StorageDomainStatus.Maintenance);
            AuditLogable logable = new AuditLogableImpl();
            logable.setStorageDomainId(domain.getId());
            logable.setStorageDomainName(domain.getName());
            logable.setStoragePoolId(pool.getId());
            logable.setStoragePoolName(pool.getName());
            auditLogDirector.log(logable, AuditLogType.STORAGE_DOMAIN_MOVED_TO_MAINTENANCE);
        }
        return null;
    });
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) Event(org.ovirt.engine.core.common.eventqueue.Event) Guid(org.ovirt.engine.core.compat.Guid) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 90 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.

the class IrsProxy method logDelayedDomain.

private void logDelayedDomain(String vdsName, String domainName, double delay) {
    AuditLogable logable = new AuditLogableImpl();
    logable.setVdsName(vdsName);
    logable.setStorageDomainName(domainName);
    logable.addCustomValue("Delay", Double.toString(delay));
    auditLogDirector.log(logable, AuditLogType.VDS_DOMAIN_DELAY_INTERVAL);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Aggregations

AuditLogable (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)126 AuditLogableImpl (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)86 AuditLogType (org.ovirt.engine.core.common.AuditLogType)10 AuditLogDirector (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector)9 Guid (org.ovirt.engine.core.compat.Guid)8 VdsNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface)6 ArrayList (java.util.ArrayList)5 Date (java.util.Date)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Map (java.util.Map)3 Collectors (java.util.stream.Collectors)3 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)3 EngineException (org.ovirt.engine.core.common.errors.EngineException)3 HashSet (java.util.HashSet)2 Inject (javax.inject.Inject)2 Singleton (javax.inject.Singleton)2 HostUpgradeManagerResult (org.ovirt.engine.core.common.HostUpgradeManagerResult)2 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)2