Search in sources :

Example 26 with EnvironmentTelemetry

use of com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry in project cloudbreak by hortonworks.

the class TelemetryApiConverter method convert.

public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures, String accountId) {
    EnvironmentTelemetry telemetry = null;
    if (request != null) {
        telemetry = new EnvironmentTelemetry();
        telemetry.setLogging(createLoggingFromRequest(request.getLogging()));
        telemetry.setMonitoring(createMonitoringFromRequest(request.getMonitoring(), accountId));
        telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics()));
        telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures, accountId));
        telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes()));
    }
    return telemetry;
}
Also used : EnvironmentTelemetry(com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry)

Example 27 with EnvironmentTelemetry

use of com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry in project cloudbreak by hortonworks.

the class TelemetryApiConverter method convert.

public EnvironmentTelemetry convert(TelemetryRequest request, Features accountFeatures) {
    EnvironmentTelemetry telemetry = null;
    if (request != null) {
        telemetry = new EnvironmentTelemetry();
        telemetry.setLogging(createLoggingFromRequest(request.getLogging()));
        telemetry.setWorkloadAnalytics(createWorkloadAnalyticsFromRequest(request.getWorkloadAnalytics()));
        telemetry.setFeatures(createEnvironmentFeaturesFromRequest(request.getFeatures(), accountFeatures));
        telemetry.setFluentAttributes(new HashMap<>(request.getFluentAttributes()));
    }
    return telemetry;
}
Also used : EnvironmentTelemetry(com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry)

Aggregations

EnvironmentTelemetry (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry)27 Test (org.junit.jupiter.api.Test)22 Features (com.sequenceiq.common.api.telemetry.model.Features)16 EnvironmentFeatures (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentFeatures)12 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)10 NetworkDto (com.sequenceiq.environment.network.dto.NetworkDto)10 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)10 ExperimentalFeatures (com.sequenceiq.environment.environment.domain.ExperimentalFeatures)8 AccountTelemetry (com.sequenceiq.environment.telemetry.domain.AccountTelemetry)8 EnvironmentRequest (com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentRequest)7 EnvironmentCreationDto (com.sequenceiq.environment.environment.dto.EnvironmentCreationDto)7 FreeIpaCreationDto (com.sequenceiq.environment.environment.dto.FreeIpaCreationDto)7 FeaturesRequest (com.sequenceiq.common.api.telemetry.request.FeaturesRequest)6 EnvironmentBackup (com.sequenceiq.environment.environment.dto.EnvironmentBackup)6 Environment (com.sequenceiq.environment.environment.domain.Environment)5 EnvironmentEditDto (com.sequenceiq.environment.environment.dto.EnvironmentEditDto)3 EnvironmentLogging (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentLogging)3 S3CloudStorageParameters (com.sequenceiq.environment.environment.dto.telemetry.S3CloudStorageParameters)3 Network (com.sequenceiq.cloudbreak.cloud.model.Network)2 NetworkCidr (com.sequenceiq.cloudbreak.cloud.network.NetworkCidr)2