@Test public void testProfilerAdminCloudStorageConfigsWhenNoCloudStorageProvided() { TemplatePreparationObject preparationObject = getTemplatePreparationObject(false); String inputJson = getBlueprintText("input/clouderamanager-profilers.bp"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject); List<ApiClusterTemplateConfig> profilerAdminConfigs = roleConfigs.get("profiler_manager-PROFILER_ADMIN_AGENT-BASE"); assertEquals(0, profilerAdminConfigs.size()); }
@Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } }
ProfilerAdminCloudStorageRoleConfigProvider extends AbstractRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } } }
ProfilerAdminCloudStorageRoleConfigProvider extends AbstractRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } }  }
ProfilerAdminCloudStorageRoleConfigProvider extends AbstractRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } }  @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source); }
ProfilerAdminCloudStorageRoleConfigProvider extends AbstractRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } }  @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source);  }