use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class KnoxIdBrokerConfigProviderTest method getRoleConfigWhenIdBrokerAndNoFileSystemAndYarn.
@Test
public void getRoleConfigWhenIdBrokerAndNoFileSystemAndYarn() {
TemplatePreparationObject tpo = new Builder().withCloudPlatform(CloudPlatform.YARN).withAccountMappingView(new AccountMappingView(GROUP_MAPPINGS, USER_MAPPINGS)).build();
List<ApiClusterTemplateConfig> result = underTest.getRoleConfigs(IDBROKER, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).isEmpty();
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class KnoxIdBrokerConfigProviderTest method getRoleConfigWhenIdBrokerAndNoFileSystemAndAzure.
@Test
public void getRoleConfigWhenIdBrokerAndNoFileSystemAndAzure() {
TemplatePreparationObject tpo = new Builder().withCloudPlatform(CloudPlatform.AZURE).withAccountMappingView(new AccountMappingView(GROUP_MAPPINGS, USER_MAPPINGS)).withProductDetails(generateCMRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_1_0), null).build();
List<ApiClusterTemplateConfig> result = underTest.getRoleConfigs(IDBROKER, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).containsOnly(Map.entry(IDBROKER_AZURE_USER_MAPPING, USER_MAPPINGS_STR), Map.entry(IDBROKER_AZURE_GROUP_MAPPING, GROUP_MAPPINGS_STR));
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class KnoxIdBrokerConfigProviderTest method getRoleConfigWhenIdBrokerAndWasbFileSystem.
@Test
public void getRoleConfigWhenIdBrokerAndWasbFileSystem() {
WasbFileSystemConfigurationsView fileSystemConfigurationsView = mock(WasbFileSystemConfigurationsView.class);
when(fileSystemConfigurationsView.getType()).thenReturn("WASB");
TemplatePreparationObject tpo = new Builder().withCloudPlatform(CloudPlatform.AZURE).withFileSystemConfigurationView(fileSystemConfigurationsView).withAccountMappingView(new AccountMappingView(GROUP_MAPPINGS, USER_MAPPINGS)).withProductDetails(generateCMRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_1_0), null).build();
List<ApiClusterTemplateConfig> result = underTest.getRoleConfigs(IDBROKER, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).containsOnly(Map.entry(IDBROKER_AZURE_USER_MAPPING, USER_MAPPINGS_STR), Map.entry(IDBROKER_AZURE_GROUP_MAPPING, GROUP_MAPPINGS_STR));
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class NifiRegistryRoleConfigProviderTest method testGetSchemaRegistryRoleConfigs720.
@Test
public void testGetSchemaRegistryRoleConfigs720() {
String inputJson = loadBlueprint("7.2.0");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(NifiRegistryRoles.NIFI_REGISTRY_SERVER, preparationObject);
assertThat(roleConfigs).hasSameElementsAs(List.of(config("nifi.registry.db.url", "jdbc:postgresql://testhost:5432/nifi_registry"), config("nifi.registry.db.username", "nifi_registry_server_user"), config("nifi.registry.db.password", "nifi_registry_server_password"), config("nifi.registry.db.driver.class", "org.postgresql.Driver"), config("nifi.registry.db.driver.directory", "/usr/share/java/")));
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class NifiRegistryRoleConfigProviderTest method testGetSchemaRegistryServiceConfigs701.
@Test
public void testGetSchemaRegistryServiceConfigs701() {
String inputJson = loadBlueprint("7.0.0");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertThat(serviceConfigs).isEmpty();
}
Aggregations