private static void assertGetByNameResults(List<AuditLog> results, int expectedResults) { assertNotNull(results, "Results object should not be null"); assertEquals(expectedResults, results.size(), "Wrong number of results"); for (AuditLog auditLog : results) { assertEquals(VM_NAME, auditLog.getVmName(), "Wrong name of VM in result"); assertEquals(VM_TEMPLATE_NAME, auditLog.getVmTemplateName(), "Wrong template name of VM in result"); } }
public AuditLogableBase(final AuditLog auditLog) { this(auditLog.getVdsId(), auditLog.getVmId()); this.storageDomainId = auditLog.getStorageDomainId(); this.storagePoolId = auditLog.getStoragePoolId(); this.correlationId = auditLog.getCorrelationId(); this.customData = auditLog.getCustomData(); this.customEventId = auditLog.getCustomEventId(); this.eventFloodInSec = auditLog.getEventFloodInSec(); this.glusterVolumeId = auditLog.getGlusterVolumeId(); this.glusterVolumeName = auditLog.getGlusterVolumeName(); this.jobId = auditLog.getJobId(); this.userId = auditLog.getUserId(); this.userName = auditLog.getUserName(); this.clusterId = auditLog.getClusterId(); this.vdsName = auditLog.getVdsName(); this.vmName = auditLog.getVmName(); this.vmTemplateId = auditLog.getVmTemplateId(); this.vmTemplateName = auditLog.getVmTemplateName(); this.origin = auditLog.getOrigin(); this.external = auditLog.isExternal(); this.callStack = auditLog.getCallStack(); this.brickId = auditLog.getBrickId(); this.brickPath = auditLog.getBrickPath(); }
nameValid = !StringUtils.isEmpty(entity.getVmTemplateName()); template.setName(entity.getVmTemplateName());
.addValue("vm_name", event.getVmName()) .addValue("vm_template_id", event.getVmTemplateId()) .addValue("vm_template_name", event.getVmTemplateName()) .addValue("storage_pool_id", event.getStoragePoolId()) .addValue("storage_pool_name", event.getStoragePoolName())