Search in sources :

Example 1 with VmLogsResponse

use of com.sequenceiq.common.api.telemetry.response.VmLogsResponse in project cloudbreak by hortonworks.

the class VmLogsToVmLogsResponseConverter method convert.

public VmLogsResponse convert(List<VmLog> vmLogs) {
    VmLogsResponse result = new VmLogsResponse();
    result.setLogs(Optional.ofNullable(vmLogs).orElse(List.of()).stream().map(logs -> {
        VmLog log = new VmLog();
        log.setName(logs.getName());
        log.setPath(logs.getPath());
        log.setType(logs.getType());
        log.setLabel(logs.getLabel());
        log.setExcludes(logs.getExcludes());
        return log;
    }).collect(Collectors.toList()));
    return result;
}
Also used : VmLog(com.sequenceiq.common.api.telemetry.model.VmLog) VmLogsResponse(com.sequenceiq.common.api.telemetry.response.VmLogsResponse)

Aggregations

VmLog (com.sequenceiq.common.api.telemetry.model.VmLog)1 VmLogsResponse (com.sequenceiq.common.api.telemetry.response.VmLogsResponse)1