Search in sources :

Example 1 with AmbariDatabase

use of com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase in project cloudbreak by hortonworks.

the class AmbariClusterSetupServiceTest method ambariDatabase.

private AmbariDatabase ambariDatabase() {
    AmbariDatabase ambariDatabase = new AmbariDatabase();
    ambariDatabase.setFancyName("mysql");
    ambariDatabase.setHost("10.0.0.2");
    ambariDatabase.setName("ambari-database");
    ambariDatabase.setPassword("password123#$@");
    ambariDatabase.setPort(3000);
    ambariDatabase.setUserName("ambari-database-user");
    ambariDatabase.setVendor("mysql");
    return ambariDatabase;
}
Also used : AmbariDatabase(com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase)

Example 2 with AmbariDatabase

use of com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase in project cloudbreak by hortonworks.

the class StackToStackResponseConverterTest method setUp.

@Before
public void setUp() throws CloudbreakImageNotFoundException {
    underTest = new StackToStackResponseConverter();
    MockitoAnnotations.initMocks(this);
    when(imageService.getImage(anyLong())).thenReturn(new Image("cb-centos66-amb200-2015-05-25", new HashMap<>(), "redhat6", "", "default", "default-id"));
    when(componentConfigProvider.getCloudbreakDetails(anyLong())).thenReturn(new CloudbreakDetails("version"));
    when(componentConfigProvider.getStackTemplate(anyLong())).thenReturn(new StackTemplate("{}", "version"));
    when(clusterComponentConfigProvider.getHDPRepo(anyLong())).thenReturn(new StackRepoDetails());
    when(clusterComponentConfigProvider.getAmbariDatabase(anyLong())).thenReturn(new AmbariDatabase());
    when(clusterComponentConfigProvider.getAmbariRepo(anyLong())).thenReturn(new AmbariRepo());
}
Also used : AmbariDatabase(com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase) StackRepoDetails(com.sequenceiq.cloudbreak.cloud.model.component.StackRepoDetails) HashMap(java.util.HashMap) CloudbreakDetails(com.sequenceiq.cloudbreak.cloud.model.CloudbreakDetails) StackTemplate(com.sequenceiq.cloudbreak.cloud.model.StackTemplate) AmbariRepo(com.sequenceiq.cloudbreak.cloud.model.AmbariRepo) Image(com.sequenceiq.cloudbreak.cloud.model.Image) Before(org.junit.Before)

Example 3 with AmbariDatabase

use of com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase in project cloudbreak by hortonworks.

the class BlueprintTemplateProcessorTest method ambariDatabase.

private AmbariDatabase ambariDatabase() {
    AmbariDatabase ambariDatabase = new AmbariDatabase();
    ambariDatabase.setFancyName("mysql");
    ambariDatabase.setHost("10.0.0.2");
    ambariDatabase.setName("ambari-database");
    ambariDatabase.setPassword("password123#$@");
    ambariDatabase.setPort(3000);
    ambariDatabase.setUserName("ambari-database-user");
    ambariDatabase.setVendor("mysql");
    return ambariDatabase;
}
Also used : AmbariDatabase(com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase)

Example 4 with AmbariDatabase

use of com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase in project cloudbreak by hortonworks.

the class AmbariDatabaseMapperTest method testMapAmbariDatabaseToAmbariDatabaseDetailJson.

@Test
public void testMapAmbariDatabaseToAmbariDatabaseDetailJson() {
    AmbariDatabase ambariDatabase = new AmbariDatabase();
    ambariDatabase.setVendor(DatabaseVendor.POSTGRES.ambariVendor());
    AmbariDatabaseDetailsJson ambariDatabaseDetailsJson = mapper.mapAmbariDatabaseToAmbariDatabaseDetailJson(ambariDatabase);
    assertEquals(mapper.mapVendorByValue(DatabaseVendor.POSTGRES.ambariVendor()), ambariDatabaseDetailsJson.getVendor());
}
Also used : AmbariDatabase(com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase) AmbariDatabaseDetailsJson(com.sequenceiq.cloudbreak.api.model.AmbariDatabaseDetailsJson) Test(org.junit.Test)

Aggregations

AmbariDatabase (com.sequenceiq.cloudbreak.cloud.model.AmbariDatabase)4 AmbariDatabaseDetailsJson (com.sequenceiq.cloudbreak.api.model.AmbariDatabaseDetailsJson)1 AmbariRepo (com.sequenceiq.cloudbreak.cloud.model.AmbariRepo)1 CloudbreakDetails (com.sequenceiq.cloudbreak.cloud.model.CloudbreakDetails)1 Image (com.sequenceiq.cloudbreak.cloud.model.Image)1 StackTemplate (com.sequenceiq.cloudbreak.cloud.model.StackTemplate)1 StackRepoDetails (com.sequenceiq.cloudbreak.cloud.model.component.StackRepoDetails)1 HashMap (java.util.HashMap)1 Before (org.junit.Before)1 Test (org.junit.Test)1