use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class FenceVdsVDSCommand method alertActionSkippedAlreadyInStatus.
/**
* Alerts when power management stop was skipped because host is already down.
*/
protected void alertActionSkippedAlreadyInStatus() {
AuditLogable auditLogable = new AuditLogableImpl();
auditLogable.addCustomValue("HostName", getTargetVds().getName());
auditLogable.addCustomValue("AgentStatus", getParameters().getAction().getValue());
auditLogable.addCustomValue("Operation", getParameters().getAction().toString());
auditLogDirector.log(auditLogable, AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class FenceVdsVDSCommand method alertPowerManagementStatusFailed.
/**
* Alerts if power management status failed.
*
* @param reason
* The reason.
*/
protected void alertPowerManagementStatusFailed(String reason) {
AuditLogable alert = new AuditLogableImpl();
alert.setVdsId(getParameters().getTargetVdsID());
alert.setVdsName(getTargetVds().getName());
alert.addCustomValue("Reason", reason);
auditLogDirector.log(alert, AuditLogType.VDS_ALERT_FENCE_TEST_FAILED);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class ExternalNetworkManager method deallocateIfExternal.
/**
* Deallocate the vNIC from the external network, if it's attached to a network and the network is indeed an
* external network (otherwise, nothing is done).
*/
public void deallocateIfExternal() {
if (getNetwork() != null && getNetwork().isExternal()) {
Provider<?> provider = providerDao.get(getNetwork().getProvidedBy().getProviderId());
NetworkProviderProxy providerProxy = providerProxyFactory.create(provider);
try {
providerProxy.deallocate(nic);
} catch (EngineException e) {
AuditLogable removePortFailureEvent = new AuditLogableImpl();
removePortFailureEvent.addCustomValue("NicName", nic.getName());
removePortFailureEvent.addCustomValue("NicId", nic.getId().toString());
removePortFailureEvent.addCustomValue("ProviderName", provider.getName());
auditLogDirector.log(removePortFailureEvent, AuditLogType.REMOVE_PORT_FROM_EXTERNAL_PROVIDER_FAILED);
}
}
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class ImportVmCommandBase method createExternalMacsAuditLog.
private AuditLogable createExternalMacsAuditLog(VM vm, Set<String> externalMacs) {
AuditLogable logable = new AuditLogableImpl();
logable.setVmId(vm.getId());
logable.setVmName(vm.getName());
logable.addCustomValue("MACAddr", externalMacs.stream().collect(Collectors.joining(", ")));
return logable;
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class GetTemplatesFromExportDomainQuery method auditLogOvfLoadError.
private void auditLogOvfLoadError(String machineName, String errorMessage) {
AuditLogable logable = new AuditLogableImpl();
logable.addCustomValue("Template", machineName).addCustomValue("ErrorMessage", errorMessage);
auditLogDirector.log(logable, AuditLogType.IMPORTEXPORT_FAILED_TO_IMPORT_TEMPLATE);
}
Aggregations