use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.
the class BlockStorageDiscardFunctionalityHelper method logLunsBrokeStorageDomainPassDiscardSupport.
private void logLunsBrokeStorageDomainPassDiscardSupport(Collection<LUNs> lunsThatBreakSdPassDiscardSupport, StorageDomain storageDomain) {
AuditLogable auditLog = new AuditLogableImpl();
auditLog.setStorageDomainId(storageDomain.getId());
auditLog.setStorageDomainName(storageDomain.getName());
auditLog.addCustomValue("LunsIds", lunsThatBreakSdPassDiscardSupport.stream().map(LUNs::getLUNId).collect(Collectors.joining(", ")));
auditLogDirector.log(auditLog, AuditLogType.LUNS_BROKE_SD_PASS_DISCARD_SUPPORT);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.
the class GlusterAuditLogUtil method createEvent.
private AuditLogable createEvent(GlusterVolumeEntity volume, VDS server, Guid clusterId, String clusterName) {
AuditLogable logable = new AuditLogableImpl();
if (server != null) {
logable.setVdsId(server.getId());
logable.setVdsName(server.getName());
}
if (volume != null) {
logable.setGlusterVolumeId(volume.getId());
logable.setGlusterVolumeName(volume.getName());
}
logable.setClusterId(clusterId);
logable.setClusterName(clusterName);
return logable;
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.
the class GlusterAuditLogUtil method logAuditMessage.
public void logAuditMessage(final Guid clusterId, String clusterName, final GlusterVolumeEntity volume, final VDS server, final AuditLogType logType, final Map<String, String> customValues) {
AuditLogable logable = createEvent(volume, server, clusterId, clusterName);
if (customValues != null) {
customValues.entrySet().forEach(e -> logable.addCustomValue(e.getKey(), e.getValue()));
}
auditLogDirector.log(logable, logType);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable in project ovirt-engine by oVirt.
the class GlusterEventFactory method createEvent.
public static AuditLogable createEvent(VDS vds, VDSReturnValue returnValue) {
AuditLogable logable = new AuditLogableImpl();
logable.setVdsId(vds.getId());
logable.setVdsName(vds.getName());
logable.setClusterId(vds.getClusterId());
logable.setClusterName(vds.getClusterName());
logable.addCustomValue("ErrorMessage", returnValue.getVdsError().getMessage());
logable.updateCallStackFromThrowable(returnValue.getExceptionObject());
return logable;
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable 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);
}
Aggregations