@Test public void testConvertFromRequest() { TelemetryRequest telemetryRequest = new TelemetryRequest(); LoggingRequest logging = new LoggingRequest(); logging.setS3(new S3CloudStorageV1Parameters()); FeaturesRequest featuresRequest = new FeaturesRequest(); featuresRequest.addClusterLogsCollection(false); telemetryRequest.setLogging(logging); telemetryRequest.setFeatures(featuresRequest); Telemetry result = underTest.convert(telemetryRequest); assertThat(result.getFeatures().getWorkloadAnalytics(), nullValue()); assertThat(result.getFeatures().getClusterLogsCollection().isEnabled(), is(false)); assertThat(result.getDatabusEndpoint(), is(DATABUS_ENDPOINT)); }
public Telemetry convert(TelemetryRequest request) { Telemetry telemetry = null; if (freeIpaTelemetryEnabled && request != null) { telemetry = new Telemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setFeatures(createFeaturesFromRequest(request.getFeatures())); telemetry.setDatabusEndpoint(databusEndpoint); telemetry.setFluentAttributes(request.getFluentAttributes()); } return telemetry; }
TelemetryConverter { public Telemetry convert(TelemetryRequest request) { Telemetry telemetry = null; if (freeIpaTelemetryEnabled && request != null) { telemetry = new Telemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setFeatures(createFeaturesFromRequest(request.getFeatures())); telemetry.setDatabusEndpoint(databusEndpoint); telemetry.setFluentAttributes(request.getFluentAttributes()); } return telemetry; } }
TelemetryConverter { public Telemetry convert(TelemetryRequest request) { Telemetry telemetry = null; if (freeIpaTelemetryEnabled && request != null) { telemetry = new Telemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setFeatures(createFeaturesFromRequest(request.getFeatures())); telemetry.setDatabusEndpoint(databusEndpoint); telemetry.setFluentAttributes(request.getFluentAttributes()); } return telemetry; } TelemetryConverter(TelemetryConfiguration configuration,
            @Value("${freeipa.telemetry.enabled:true}") boolean freeIpaTelemetryEnabled); }
TelemetryConverter { public Telemetry convert(TelemetryRequest request) { Telemetry telemetry = null; if (freeIpaTelemetryEnabled && request != null) { telemetry = new Telemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setFeatures(createFeaturesFromRequest(request.getFeatures())); telemetry.setDatabusEndpoint(databusEndpoint); telemetry.setFluentAttributes(request.getFluentAttributes()); } return telemetry; } TelemetryConverter(TelemetryConfiguration configuration,
            @Value("${freeipa.telemetry.enabled:true}") boolean freeIpaTelemetryEnabled); Telemetry convert(TelemetryRequest request); TelemetryResponse convert(Telemetry telemetry); }
TelemetryConverter { public Telemetry convert(TelemetryRequest request) { Telemetry telemetry = null; if (freeIpaTelemetryEnabled && request != null) { telemetry = new Telemetry(); telemetry.setLogging(createLoggingFromRequest(request.getLogging())); telemetry.setFeatures(createFeaturesFromRequest(request.getFeatures())); telemetry.setDatabusEndpoint(databusEndpoint); telemetry.setFluentAttributes(request.getFluentAttributes()); } return telemetry; } TelemetryConverter(TelemetryConfiguration configuration,
            @Value("${freeipa.telemetry.enabled:true}") boolean freeIpaTelemetryEnabled); Telemetry convert(TelemetryRequest request); TelemetryResponse convert(Telemetry telemetry);  }