Search in sources :

Example 1 with RdsConfigWithoutCluster

use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.

the class ClusterHostServiceRunner method decoratePillarWithJdbcConnectors.

private void decoratePillarWithJdbcConnectors(Cluster cluster, Map<String, SaltPillarProperties> servicePillar) {
    Set<RdsConfigWithoutCluster> rdsConfigs = rdsConfigWithoutClusterService.findByClusterId(cluster.getId());
    Map<String, Object> connectorJarUrlsByVendor = new HashMap<>();
    rdsConfigs.stream().filter(rds -> isNotEmpty(rds.getConnectorJarUrl())).forEach(rdsConfig -> {
        connectorJarUrlsByVendor.put("databaseType", rdsConfig.getDatabaseEngine().databaseType());
        connectorJarUrlsByVendor.put("connectorJarUrl", rdsConfig.getConnectorJarUrl());
        connectorJarUrlsByVendor.put("connectorJarName", rdsConfig.getDatabaseEngine().connectorJarName());
    });
    if (!connectorJarUrlsByVendor.isEmpty()) {
        Map<String, Object> jdbcConnectors = singletonMap("jdbc_connectors", connectorJarUrlsByVendor);
        servicePillar.put("jdbc-connectors", new SaltPillarProperties("/jdbc/connectors.sls", jdbcConnectors));
    }
}
Also used : CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) DatalakeService(com.sequenceiq.cloudbreak.service.sharedservice.DatalakeService) ComponentConfigProviderService(com.sequenceiq.cloudbreak.service.ComponentConfigProviderService) StringUtils(org.apache.commons.lang3.StringUtils) ThreadBasedUserCrnProvider(com.sequenceiq.cloudbreak.auth.ThreadBasedUserCrnProvider) Map(java.util.Map) Gateway(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.Gateway) StringUtils.isEmpty(org.apache.commons.lang3.StringUtils.isEmpty) HostAttributeDecorator(com.sequenceiq.cloudbreak.core.bootstrap.service.host.decorator.HostAttributeDecorator) RecipeEngine(com.sequenceiq.cloudbreak.service.cluster.flow.recipe.RecipeEngine) CLOUDERAMANAGER_VERSION_7_2_1(com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_1) CLOUDERAMANAGER_VERSION_7_2_0(com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_0) Set(java.util.Set) Crn(com.sequenceiq.cloudbreak.auth.crn.Crn) CloudbreakOrchestratorException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException) ClouderaManagerRepo(com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo) Serializable(java.io.Serializable) TargetedUpscaleSupportService(com.sequenceiq.cloudbreak.service.stack.TargetedUpscaleSupportService) StringUtils.isNotBlank(org.apache.commons.lang3.StringUtils.isNotBlank) RdsConfigWithoutClusterService(com.sequenceiq.cloudbreak.service.rdsconfig.RdsConfigWithoutClusterService) StackUtil(com.sequenceiq.cloudbreak.util.StackUtil) MDCUtils(com.sequenceiq.cloudbreak.logger.MDCUtils) CloudbreakOrchestratorFailedException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorFailedException) CollectionUtils(org.springframework.util.CollectionUtils) GatewayConfig(com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig) ExposedServices(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.ExposedServices) CancellationException(com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) StackService(com.sequenceiq.cloudbreak.service.stack.StackService) Joiner(com.google.common.base.Joiner) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) CMLicenseParser(com.sequenceiq.cloudbreak.auth.CMLicenseParser) OrchestratorGrainRunnerParams(com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorGrainRunnerParams) HostGroupService(com.sequenceiq.cloudbreak.service.hostgroup.HostGroupService) StringUtils.isNotEmpty(org.apache.commons.lang3.StringUtils.isNotEmpty) ArrayList(java.util.ArrayList) Value(org.springframework.beans.factory.annotation.Value) CsdParcelDecorator(com.sequenceiq.cloudbreak.core.bootstrap.service.host.decorator.CsdParcelDecorator) KerberosDetailService(com.sequenceiq.cloudbreak.template.kerberos.KerberosDetailService) Lists(com.google.common.collect.Lists) KerberosType(com.sequenceiq.cloudbreak.type.KerberosType) LdapView(com.sequenceiq.cloudbreak.dto.LdapView) CMRepositoryVersionUtil.isVersionNewerOrEqualThanLimited(com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil.isVersionNewerOrEqualThanLimited) ClusterComponentConfigProvider(com.sequenceiq.cloudbreak.cluster.service.ClusterComponentConfigProvider) NullUtil.throwIfNull(com.sequenceiq.cloudbreak.util.NullUtil.throwIfNull) DatabaseType(com.sequenceiq.cloudbreak.api.endpoint.v4.database.base.DatabaseType) DnsResolverType(com.sequenceiq.cloudbreak.domain.stack.DnsResolverType) ExitCriteriaModel(com.sequenceiq.cloudbreak.orchestrator.state.ExitCriteriaModel) IOException(java.io.IOException) PostgresConfigService(com.sequenceiq.cloudbreak.core.bootstrap.service.container.postgres.PostgresConfigService) ServiceLocationMap(com.sequenceiq.cloudbreak.cluster.model.ServiceLocationMap) ClusterDeletionBasedExitCriteriaModel(com.sequenceiq.cloudbreak.core.bootstrap.service.ClusterDeletionBasedExitCriteriaModel) GrpcUmsClient(com.sequenceiq.cloudbreak.auth.altus.GrpcUmsClient) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) GrainProperties(com.sequenceiq.cloudbreak.orchestrator.model.GrainProperties) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology) ComponentLocatorService(com.sequenceiq.cloudbreak.service.blueprint.ComponentLocatorService) InetAddresses(com.google.common.net.InetAddresses) NodesUnreachableException(com.sequenceiq.cloudbreak.util.NodesUnreachableException) SaltConfig(com.sequenceiq.cloudbreak.orchestrator.model.SaltConfig) GrainOperation(com.sequenceiq.cloudbreak.orchestrator.host.GrainOperation) EntitlementService(com.sequenceiq.cloudbreak.auth.altus.EntitlementService) CloudbreakOrchestratorCancelledException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorCancelledException) LoggerFactory(org.slf4j.LoggerFactory) LoadBalancerSANProvider(com.sequenceiq.cloudbreak.san.LoadBalancerSANProvider) InstanceGroupService(com.sequenceiq.cloudbreak.service.stack.InstanceGroupService) ClusterPreCreationApi(com.sequenceiq.cloudbreak.cluster.api.ClusterPreCreationApi) KerberosConfigService(com.sequenceiq.cloudbreak.kerberos.KerberosConfigService) ExposedServiceCollector(com.sequenceiq.cloudbreak.api.service.ExposedServiceCollector) Telemetry(com.sequenceiq.common.api.telemetry.model.Telemetry) NotFoundException(com.sequenceiq.cloudbreak.common.exception.NotFoundException) HostOrchestrator(com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator) CLOUDERAMANAGER_VERSION_7_0_2(com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_0_2) SaltPillarProperties(com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties) DataBusCredential(com.sequenceiq.common.api.telemetry.model.DataBusCredential) StackTags(com.sequenceiq.cloudbreak.cloud.model.StackTags) ExposedService(com.sequenceiq.cloudbreak.api.service.ExposedService) Collectors(java.util.stream.Collectors) TemporaryStorage(com.sequenceiq.cloudbreak.common.type.TemporaryStorage) RegionAwareInternalCrnGeneratorFactory(com.sequenceiq.cloudbreak.auth.crn.RegionAwareInternalCrnGeneratorFactory) Json(com.sequenceiq.cloudbreak.common.json.Json) IdBrokerService(com.sequenceiq.cloudbreak.service.idbroker.IdBrokerService) GatewayConfigService(com.sequenceiq.cloudbreak.service.GatewayConfigService) ProxyConfigProvider(com.sequenceiq.cloudbreak.service.proxy.ProxyConfigProvider) List(java.util.List) VirtualGroupService(com.sequenceiq.cloudbreak.auth.altus.VirtualGroupService) RdsView(com.sequenceiq.cloudbreak.template.views.RdsView) Optional(java.util.Optional) SSOType(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.SSOType) Pattern(java.util.regex.Pattern) KerberosConfig(com.sequenceiq.cloudbreak.dto.KerberosConfig) Account(com.cloudera.thunderhead.service.usermanagement.UserManagementProto.Account) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) LoadBalancerConfigService(com.sequenceiq.cloudbreak.service.LoadBalancerConfigService) CMRepositoryVersionUtil(com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil) IdBroker(com.sequenceiq.cloudbreak.domain.stack.cluster.IdBroker) LdapConfigService(com.sequenceiq.cloudbreak.ldap.LdapConfigService) HashMap(java.util.HashMap) FreeIpaConfigProvider(com.sequenceiq.cloudbreak.service.freeipa.FreeIpaConfigProvider) HashSet(java.util.HashSet) Inject(javax.inject.Inject) InstanceMetaDataService(com.sequenceiq.cloudbreak.service.stack.InstanceMetaDataService) Collections.singletonMap(java.util.Collections.singletonMap) RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster) Nonnull(javax.annotation.Nonnull) TelemetryDecorator(com.sequenceiq.cloudbreak.core.bootstrap.service.host.decorator.TelemetryDecorator) ClusterDeletionBasedExitCriteriaModel.clusterDeletionBasedModel(com.sequenceiq.cloudbreak.core.bootstrap.service.ClusterDeletionBasedExitCriteriaModel.clusterDeletionBasedModel) Logger(org.slf4j.Logger) VirtualGroupRequest(com.sequenceiq.cloudbreak.auth.altus.VirtualGroupRequest) NodeReachabilityResult(com.sequenceiq.cloudbreak.orchestrator.model.NodeReachabilityResult) EnvironmentConfigProvider(com.sequenceiq.cloudbreak.service.environment.EnvironmentConfigProvider) Node(com.sequenceiq.cloudbreak.common.orchestration.Node) MountDisks(com.sequenceiq.cloudbreak.service.stack.flow.MountDisks) Component(org.springframework.stereotype.Component) UmsVirtualGroupRight(com.sequenceiq.cloudbreak.auth.altus.UmsVirtualGroupRight) ClusterApiConnectors(com.sequenceiq.cloudbreak.service.cluster.ClusterApiConnectors) CloudbreakServiceException(com.sequenceiq.cloudbreak.common.exception.CloudbreakServiceException) Comparator(java.util.Comparator) Collections(java.util.Collections) HashMap(java.util.HashMap) SaltPillarProperties(com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties) RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster)

Example 2 with RdsConfigWithoutCluster

use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.

the class ClusterHostServiceRunnerTest method setupMocksForRunClusterServices.

private void setupMocksForRunClusterServices() {
    when(umsClient.getAccountDetails(any(), any(), any())).thenReturn(UserManagementProto.Account.getDefaultInstance());
    when(stackService.get(any())).thenReturn(stack);
    when(stack.getCluster()).thenReturn(cluster);
    when(stack.getTunnel()).thenReturn(Tunnel.DIRECT);
    when(stack.getCloudPlatform()).thenReturn(CloudPlatform.AWS.name());
    when(stack.getResourceCrn()).thenReturn(TEST_CLUSTER_CRN);
    when(cluster.getName()).thenReturn("clustername");
    when(cluster.getStack()).thenReturn(stack);
    when(componentLocator.getComponentLocation(any(), any())).thenReturn(new HashMap<>());
    when(exposedServiceCollector.getImpalaService()).thenReturn(mock(ExposedService.class));
    when(environmentConfigProvider.getParentEnvironmentCrn(any())).thenReturn("crn:cdp:iam:us-west-1:accid:user:mockuser@cloudera.com");
    ClouderaManagerRepo clouderaManagerRepo = mock(ClouderaManagerRepo.class);
    when(clouderaManagerRepo.getVersion()).thenReturn("7.2.2");
    GatewayConfig gatewayConfig = mock(GatewayConfig.class);
    when(gatewayConfig.getPrivateAddress()).thenReturn("1.2.3.4");
    when(gatewayConfig.getHostname()).thenReturn("hostname");
    when(gatewayConfigService.getPrimaryGatewayConfig(any())).thenReturn(gatewayConfig);
    when(clusterComponentConfigProvider.getClouderaManagerRepoDetails(any())).thenReturn(clouderaManagerRepo);
    when(exposedServiceCollector.getRangerService()).thenReturn(mock(ExposedService.class));
    ExposedService cmExposedService = mock(ExposedService.class);
    when(cmExposedService.getServiceName()).thenReturn("CM");
    when(exposedServiceCollector.getClouderaManagerService()).thenReturn(cmExposedService);
    Template template = new Template();
    template.setTemporaryStorage(TemporaryStorage.EPHEMERAL_VOLUMES);
    Set<InstanceGroup> instanceGroups = new HashSet<>();
    createInstanceGroup(template, instanceGroups, "fqdn1", null, "1.1.1.1", "1.1.1.2");
    createInstanceGroup(template, instanceGroups, "fqdn2", null, "1.1.2.1", "1.1.2.2");
    InstanceGroup gwIg = createInstanceGroup(template, instanceGroups, "gateway1", "gateway2", "1.1.3.1", "1.1.3.2");
    lenient().when(stack.getNotTerminatedAndNotZombieGatewayInstanceMetadata()).thenReturn(Lists.newArrayList(gwIg.getAllInstanceMetaData()));
    when(stack.getInstanceGroups()).thenReturn(instanceGroups);
    RdsConfigWithoutCluster rdsConfigWithoutCluster = mock(RdsConfigWithoutCluster.class);
    when(rdsConfigWithoutClusterService.findByClusterIdAndType(any(), eq(DatabaseType.CLOUDERA_MANAGER))).thenReturn(rdsConfigWithoutCluster);
    when(rdsConfigWithoutCluster.getType()).thenReturn("asdf");
    when(rdsConfigWithoutCluster.getConnectionURL()).thenReturn("jdbc:postgresql:subname://some-rds.1d3nt1f13r.eu-west-1.rds.amazonaws.com:5432/ranger");
    when(rdsConfigWithoutCluster.getConnectionUserName()).thenReturn(new Secret("username"));
    when(rdsConfigWithoutCluster.getConnectionPassword()).thenReturn(new Secret("password"));
    when(loadBalancerSANProvider.getLoadBalancerSAN(stack)).thenReturn(Optional.empty());
    ClusterPreCreationApi clusterPreCreationApi = mock(ClusterPreCreationApi.class);
    when(clusterApiConnectors.getConnector(cluster)).thenReturn(clusterPreCreationApi);
    ServiceLocationMap serviceLocationMap = new ServiceLocationMap();
    serviceLocationMap.add(new ServiceLocation("serv", "paath"));
    when(clusterPreCreationApi.getServiceLocations()).thenReturn(serviceLocationMap);
    ReflectionTestUtils.setField(underTest, "cmHeartbeatInterval", "1");
    ReflectionTestUtils.setField(underTest, "cmMissedHeartbeatInterval", "1");
}
Also used : ServiceLocationMap(com.sequenceiq.cloudbreak.cluster.model.ServiceLocationMap) ClusterPreCreationApi(com.sequenceiq.cloudbreak.cluster.api.ClusterPreCreationApi) Template(com.sequenceiq.cloudbreak.domain.Template) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) Secret(com.sequenceiq.cloudbreak.service.secret.domain.Secret) ClouderaManagerRepo(com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo) ExposedService(com.sequenceiq.cloudbreak.api.service.ExposedService) ServiceLocation(com.sequenceiq.cloudbreak.cluster.model.ServiceLocation) GatewayConfig(com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig) HashSet(java.util.HashSet) RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster)

Example 3 with RdsConfigWithoutCluster

use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.

the class RdsViewTest method testCreateRdsViewWithRdsViewWithoutCluster.

@Test
public void testCreateRdsViewWithRdsViewWithoutCluster() {
    RdsConfigWithoutCluster rdsView = Mockito.mock(RdsConfigWithoutCluster.class);
    when(rdsView.isArchived()).thenReturn(true);
    when(rdsView.getConnectionDriver()).thenReturn("driver");
    when(rdsView.getConnectionURL()).thenReturn("jdbc:mysql://ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com:3306/ranger");
    when(rdsView.getConnectionPassword()).thenReturn(new Secret("pass"));
    when(rdsView.getConnectionUserName()).thenReturn(new Secret("username"));
    when(rdsView.getConnectorJarUrl()).thenReturn("jarurl");
    when(rdsView.getCreationDate()).thenReturn(1L);
    when(rdsView.getDatabaseEngine()).thenReturn(DatabaseVendor.MYSQL);
    when(rdsView.getDeletionTimestamp()).thenReturn(2L);
    when(rdsView.getDescription()).thenReturn("desc");
    when(rdsView.getId()).thenReturn(-1L);
    when(rdsView.getName()).thenReturn("name");
    when(rdsView.getSslMode()).thenReturn(RdsSslMode.ENABLED);
    when(rdsView.getType()).thenReturn("type");
    RdsView underTest = new RdsView(rdsView, "ssl-path");
    assertThat(underTest.getClusterManagerVendor()).isEqualTo("mysql");
    assertThat(underTest.getConnectionString()).isEqualTo("jdbc:mysql://ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com:3306/ranger?sslmode=verify-full&sslrootcert=ssl-path");
    assertThat(underTest.getConnectionUserName()).isEqualTo("username");
    assertThat(underTest.getHostWithPortWithJdbc()).isEqualTo("jdbc:mysql://ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com:3306");
    assertThat(underTest.getHost()).isEqualTo("ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com");
    assertThat(underTest.getConnectionDriver()).isEqualTo("driver");
    assertThat(underTest.getConnectionPassword()).isEqualTo("pass");
    assertThat(underTest.getConnectionURL()).isEqualTo("jdbc:mysql://ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com:3306/ranger?sslmode=verify-full&sslrootcert=ssl-path");
    assertThat(underTest.getDatabaseEngine()).isEqualTo("mysql");
    assertThat(underTest.getDatabaseType()).isEqualTo("mysql");
    assertThat(underTest.getDatabaseVendor()).isEqualTo(DatabaseVendor.MYSQL);
    assertThat(underTest.getDatabaseName()).isEqualTo("ranger");
    assertThat(underTest.getFancyName()).isEqualTo("MySQL / MariaDB");
    assertThat(underTest.getLowerCaseDatabaseEngine()).isEqualTo("mysql");
    assertThat(underTest.getName()).isEqualTo("ranger");
    assertThat(underTest.getPassword()).isEqualTo("pass");
    assertThat(underTest.getPort()).isEqualTo("3306");
    assertThat(underTest.getSslCertificateFilePath()).isEqualTo("ssl-path");
    assertThat(underTest.getSubprotocol()).isEqualTo("mysql");
    assertThat(underTest.getUserName()).isEqualTo("username");
    assertThat(underTest.getVendor()).isEqualTo("mysql");
    assertThat(underTest.getWithoutJDBCPrefix()).isEqualTo("ranger-mysql.cmseikcocinw.us-east-1.rds.amazonaws.com:3306/ranger?sslmode=verify-full&sslrootcert=ssl-path");
    assertThat(underTest.isUseSsl()).isEqualTo(true);
}
Also used : Secret(com.sequenceiq.cloudbreak.service.secret.domain.Secret) RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 4 with RdsConfigWithoutCluster

use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.

the class ClusterDBValidationServiceTest method createRdsConfig.

private RdsConfigWithoutCluster createRdsConfig(Long id, ResourceStatus resourceStatus, DatabaseType databaseType) {
    RdsConfigWithoutCluster rdsConfig = mock(RdsConfigWithoutCluster.class);
    when(rdsConfig.getId()).thenReturn(id);
    when(rdsConfig.getStatus()).thenReturn(resourceStatus);
    when(rdsConfig.getType()).thenReturn(databaseType.name());
    return rdsConfig;
}
Also used : RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster)

Example 5 with RdsConfigWithoutCluster

use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.

the class ClusterDBValidationServiceTest method testIsGatewayRepairEnabledWhenUserManagedRdsConfigsAreGiven.

@Test
public void testIsGatewayRepairEnabledWhenUserManagedRdsConfigsAreGiven() {
    // GIVEN
    Cluster cluster = new Cluster();
    cluster.setId(0L);
    cluster.setEmbeddedDatabaseOnAttachedDisk(false);
    // Set<RdsConfigWithoutCluster> rdsConfigs = Set.of(createRdsConfig(0L, ResourceStatus.USER_MANAGED, DatabaseType.CLOUDERA_MANAGER),
    // createRdsConfig(1L, ResourceStatus.USER_MANAGED, DatabaseType.CLOUDERA_MANAGER_MANAGEMENT_SERVICE_REPORTS_MANAGER));
    when(rdsConfigWithoutClusterService.countByClusterIdAndStatusInAndTypeIn(0L, Set.of(ResourceStatus.USER_MANAGED), Set.of(DatabaseType.CLOUDERA_MANAGER, DatabaseType.CLOUDERA_MANAGER_MANAGEMENT_SERVICE_REPORTS_MANAGER))).thenReturn(2L);
    // WHEN
    Boolean actualResult = underTest.isGatewayRepairEnabled(cluster);
    // THEN
    Assertions.assertTrue(actualResult);
}
Also used : Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) RdsConfigWithoutCluster(com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster) Test(org.junit.jupiter.api.Test)

Aggregations

RdsConfigWithoutCluster (com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster)7 ExposedService (com.sequenceiq.cloudbreak.api.service.ExposedService)2 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)2 ClusterPreCreationApi (com.sequenceiq.cloudbreak.cluster.api.ClusterPreCreationApi)2 ServiceLocationMap (com.sequenceiq.cloudbreak.cluster.model.ServiceLocationMap)2 InstanceGroup (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup)2 GatewayConfig (com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig)2 Secret (com.sequenceiq.cloudbreak.service.secret.domain.Secret)2 HashSet (java.util.HashSet)2 Account (com.cloudera.thunderhead.service.usermanagement.UserManagementProto.Account)1 Joiner (com.google.common.base.Joiner)1 Lists (com.google.common.collect.Lists)1 InetAddresses (com.google.common.net.InetAddresses)1 DatabaseType (com.sequenceiq.cloudbreak.api.endpoint.v4.database.base.DatabaseType)1 SSOType (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.SSOType)1 ExposedServiceCollector (com.sequenceiq.cloudbreak.api.service.ExposedServiceCollector)1 CMLicenseParser (com.sequenceiq.cloudbreak.auth.CMLicenseParser)1 ThreadBasedUserCrnProvider (com.sequenceiq.cloudbreak.auth.ThreadBasedUserCrnProvider)1 EntitlementService (com.sequenceiq.cloudbreak.auth.altus.EntitlementService)1 GrpcUmsClient (com.sequenceiq.cloudbreak.auth.altus.GrpcUmsClient)1