use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl 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;
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class SyncMacsOfDbNicsWithSnapshot method auditLogImpossibilityToReplaceDuplicateMacs.
private void auditLogImpossibilityToReplaceDuplicateMacs(List<String> macs) {
AuditLogable event = new AuditLogableImpl();
String auditLogMessage = "Following MACs had to be reallocated, but we was unable to replace them because of insufficient amount of free macs: " + macs;
auditLogDirector.log(event, AuditLogType.MAC_ADDRESS_COULDNT_BE_REALLOCATED, auditLogMessage);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class CINDERStorageHelper method activateCinderDomain.
public void activateCinderDomain(Guid storageDomainId, Guid storagePoolId) {
OpenStackVolumeProviderProxy proxy = OpenStackVolumeProviderProxy.getFromStorageDomainId(storageDomainId, providerProxyFactory);
if (proxy == null) {
log.error("Couldn't create an OpenStackVolumeProviderProxy for storage domain ID: {}", storageDomainId);
return;
}
try {
proxy.testConnection();
updateCinderDomainStatus(storageDomainId, storagePoolId, StorageDomainStatus.Active);
} catch (EngineException e) {
AuditLogable loggable = new AuditLogableImpl();
loggable.addCustomValue("CinderException", e.getCause().getCause() != null ? e.getCause().getCause().getMessage() : e.getCause().getMessage());
auditLogDirector.log(loggable, AuditLogType.CINDER_PROVIDER_ERROR);
throw e;
}
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class CinderBroker method logDiskEvent.
private void logDiskEvent(CinderDisk cinderDisk, AuditLogType cinderDiskConnectionFailure) {
AuditLogable logable = new AuditLogableImpl();
logable.addCustomValue("DiskAlias", cinderDisk.getDiskAlias());
Injector.get(AuditLogDirector.class).log(logable, cinderDiskConnectionFailure);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class VmInfoBuildUtils method reportUnsupportedVnicProfileFeatures.
private void reportUnsupportedVnicProfileFeatures(VM vm, VmNic nic, VnicProfile vnicProfile, List<VnicProfileProperties> unsupportedFeatures) {
if (unsupportedFeatures.isEmpty()) {
return;
}
AuditLogable event = new AuditLogableImpl();
event.setVmId(vm.getId());
event.setVmName(vm.getName());
event.setClusterId(vm.getClusterId());
event.setClusterName(vm.getClusterName());
event.setCustomId(nic.getId().toString());
event.setCompatibilityVersion(vm.getCompatibilityVersion().toString());
event.addCustomValue("NicName", nic.getName());
event.addCustomValue("VnicProfile", vnicProfile == null ? null : vnicProfile.getName());
String[] unsupportedFeatureNames = new String[unsupportedFeatures.size()];
for (int i = 0; i < unsupportedFeatures.size(); i++) {
unsupportedFeatureNames[i] = unsupportedFeatures.get(i).getFeatureName();
}
event.addCustomValue("UnsupportedFeatures", StringUtils.join(unsupportedFeatureNames, ", "));
auditLogDirector.log(event, AuditLogType.VNIC_PROFILE_UNSUPPORTED_FEATURES);
}
Aggregations