use of com.sequenceiq.cloudbreak.domain.RDSConfig in project cloudbreak by hortonworks.
the class RdsViewTest method testCreateRdsViewWhenRDSConfigContainsConnectionUrlWithoutDatabaseNameAndPort.
@Test
public void testCreateRdsViewWhenRDSConfigContainsConnectionUrlWithoutDatabaseNameAndPort() {
String connectionUrl = "jdbc:postgresql://some-rds.1d3nt1f13r.eu-west-1.rds.amazonaws.com";
RDSConfig rdsConfig = createRdsConfig(connectionUrl);
RdsView underTest = new RdsView(rdsConfig);
Assert.assertEquals(ASSERT_ERROR_MSG, "some-rds.1d3nt1f13r.eu-west-1.rds.amazonaws.com", underTest.getHostWithPort());
}
use of com.sequenceiq.cloudbreak.domain.RDSConfig in project cloudbreak by hortonworks.
the class RdsViewTest method testCreateRdsViewWhenRDSConfigContainsConnectionUrlWithoutJDBCUrlPrefix.
@Test
public void testCreateRdsViewWhenRDSConfigContainsConnectionUrlWithoutJDBCUrlPrefix() {
String connectionUrl = "some-rds.1d3nt1f13r.eu-west-1.rds.amazonaws.com:5432/ranger";
RDSConfig rdsConfig = createRdsConfig(connectionUrl);
RdsView underTest = new RdsView(rdsConfig);
Assert.assertEquals(ASSERT_ERROR_MSG, "some-rds.1d3nt1f13r.eu-west-1.rds.amazonaws.com:5432", underTest.getHostWithPort());
}
use of com.sequenceiq.cloudbreak.domain.RDSConfig in project cloudbreak by hortonworks.
the class RdsConfigController method getPublic.
@Override
public RDSConfigResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
RDSConfig rdsConfig = rdsConfigService.getPublicRdsConfig(name, user);
return conversionService.convert(rdsConfig, RDSConfigResponse.class);
}
use of com.sequenceiq.cloudbreak.domain.RDSConfig in project cloudbreak by hortonworks.
the class RdsConfigController method getPrivate.
@Override
public RDSConfigResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
RDSConfig rdsConfig = rdsConfigService.getPrivateRdsConfig(name, user);
return conversionService.convert(rdsConfig, RDSConfigResponse.class);
}
use of com.sequenceiq.cloudbreak.domain.RDSConfig in project cloudbreak by hortonworks.
the class RdsConfigController method getPublics.
@Override
public Set<RDSConfigResponse> getPublics() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<RDSConfig> rdsConfigs = rdsConfigService.retrieveAccountRdsConfigs(user);
return toJsonList(rdsConfigs);
}
Aggregations