@Test public void testBuildTelemetryCMConfigListWithCustomEndpoint() { WorkloadAnalytics workloadAnalytics = new WorkloadAnalytics(); workloadAnalytics.setDatabusEndpoint("customEndpoint"); ApiConfigList result = underTest.buildTelemetryCMConfigList(workloadAnalytics); assertEquals(5, result.getItems().size()); assertTrue(containsConfigWithValue(result, "telemetry_altus_url", "customEndpoint")); }
@VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); }
ClouderaManagerMgmtTelemetryService { @VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); } }
ClouderaManagerMgmtTelemetryService { @VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); }  }
ClouderaManagerMgmtTelemetryService { @VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); }  void setupTelemetryRole(final Stack stack, final ApiClient client, final ApiHostRef cmHostRef,
            final ApiRoleList mgmtRoles, final Telemetry telemetry); void updateTelemetryConfigs(final Stack stack, final ApiClient client,
            final Telemetry telemetry, final String sdxContextName,
            final String sdxStackCrn, final ProxyConfig proxyConfig); }
ClouderaManagerMgmtTelemetryService { @VisibleForTesting ApiConfigList buildTelemetryCMConfigList(WorkloadAnalytics workloadAnalytics) { final Map<String, String> configsToUpdate = new HashMap<>(); configsToUpdate.put(TELEMETRY_MASTER, "true"); configsToUpdate.put(TELEMETRY_WA, "true"); configsToUpdate.put(TELEMETRY_COLLECT_JOB_LOGS, "true"); configsToUpdate.put(TELEMETRY_ALTUS_ACCOUNT, ALTUS_CREDENTIAL_NAME); if (StringUtils.isNotEmpty(workloadAnalytics.getDatabusEndpoint())) { configsToUpdate.put(TELEMETRY_ALTUS_URL, workloadAnalytics.getDatabusEndpoint()); } return makeApiConfigList(configsToUpdate); }  void setupTelemetryRole(final Stack stack, final ApiClient client, final ApiHostRef cmHostRef,
            final ApiRoleList mgmtRoles, final Telemetry telemetry); void updateTelemetryConfigs(final Stack stack, final ApiClient client,
            final Telemetry telemetry, final String sdxContextName,
            final String sdxStackCrn, final ProxyConfig proxyConfig);  }