Search in sources :

Example 51 with AuditLogable

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

the class InitGlusterCommandHelper method getGlusterPeers.

@SuppressWarnings("unchecked")
private List<GlusterServerInfo> getGlusterPeers(VDS upServer) {
    List<GlusterServerInfo> glusterServers = new ArrayList<>();
    VDSReturnValue returnValue = runVdsCommand(VDSCommandType.GlusterServersList, new VdsIdVDSCommandParametersBase(upServer.getId()));
    if (!returnValue.getSucceeded()) {
        AuditLogable logable = GlusterEventFactory.createEvent(upServer, returnValue);
        auditLogDirector.log(logable, AuditLogType.GLUSTER_SERVERS_LIST_FAILED);
    } else {
        glusterServers = (List<GlusterServerInfo>) returnValue.getReturnValue();
    }
    return glusterServers;
}
Also used : VdsIdVDSCommandParametersBase(org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase) AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) ArrayList(java.util.ArrayList) GlusterServerInfo(org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo) VDSReturnValue(org.ovirt.engine.core.common.vdscommands.VDSReturnValue)

Example 52 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable 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);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 53 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable 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);
        }
    }
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic) AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) VdsDynamic(org.ovirt.engine.core.common.businessentities.VdsDynamic) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 54 with AuditLogable

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable 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;
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 55 with AuditLogable

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

the class VmInterfaceManager method createAuditLog.

private AuditLogable createAuditLog(final VmNic iface) {
    AuditLogable logable = new AuditLogableImpl();
    logable.addCustomValue("MACAddr", iface.getMacAddress());
    logable.addCustomValue("IfaceName", iface.getName());
    logable.setVmId(iface.getVmId());
    return logable;
}
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