Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.Stack


        // THEN
        verify(reactor, times(1)).notify(any(ReactorConfig.class), any(Event.class));
    }

    private Stack createStack(Cluster cluster) {
        Stack stack = new Stack();
        stack.setId(1L);
        stack.setAmbariIp("172.17.0.2");
        stack.setNodeCount(2);
        stack.setCluster(cluster);
        return stack;
    }
View Full Code Here


    @Test
    public void testGenerateAwsStackEvent() throws Exception {
        //GIVEN
        Template template = ServiceTestUtils.createTemplate(ServiceTestUtils.DUMMY_OWNER, ServiceTestUtils.DUMMY_ACCOUNT, CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack("John", "Acme", template, null);

        BDDMockito.given(stackRepository.findById(1L)).willReturn(stack);

        //WHEN
        eventService.createStackEvent(1L, "STACK_CREATED", "Stack created");
View Full Code Here

    @Test
    public void testGenerateAzureStackEvent() throws Exception {
        //GIVEN
        Template template = ServiceTestUtils.createTemplate(ServiceTestUtils.DUMMY_OWNER, ServiceTestUtils.DUMMY_ACCOUNT, CloudPlatform.AZURE);
        Stack stack = ServiceTestUtils.createStack("John", "Acme", template, null);

        BDDMockito.given(stackRepository.findById(1L)).willReturn(stack);

        //WHEN
        eventService.createStackEvent(1L, "STACK_CREATED", "Stack created");
View Full Code Here

    public void testShouldClusterDataBePopulated() {
        //GIVEN
        Template template = ServiceTestUtils.createTemplate(ServiceTestUtils.DUMMY_OWNER, ServiceTestUtils.DUMMY_ACCOUNT, CloudPlatform.AZURE);
        Blueprint blueprint = ServiceTestUtils.createBlueprint(ServiceTestUtils.DUMMY_OWNER, ServiceTestUtils.DUMMY_ACCOUNT);
        Cluster cluster = ServiceTestUtils.createCluster("John", "Acme", blueprint);
        Stack stack = ServiceTestUtils.createStack("John", "Acme", template, cluster);

        BDDMockito.given(stackRepository.findById(1L)).willReturn(stack);

        //WHEN
        eventService.createStackEvent(1L, "STACK_CREATED", "Stack created");
View Full Code Here

    @Test
    @Ignore
    public void testGetYarnSiteConfigsShouldReturnDirectoriesProperlyWithTwoVolumes() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, String> result = underTest.getConfiguration(stack).get(HadoopConfigurationService.YARN_SITE);
        // THEN
        assertEquals("/mnt/fs1,/mnt/fs2", result.get(HadoopConfigurationService.YARN_NODEMANAGER_LOCAL_DIRS));
View Full Code Here

    @Test
    @Ignore
    public void testGetYarnSiteConfigsShouldReturnNotReturnYarnLocalDirsPropertyWhenThereAreNoVolumesAttached() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, Map<String, String>> configuration = underTest.getConfiguration(stack);
        // THEN
        assertEquals(0, configuration.size());
View Full Code Here

    @Test
    @Ignore
    public void testGetHdfsSiteConfigsShouldReturnDirectoriesProperlyWithTwoVolumes() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, String> result = underTest.getConfiguration(stack).get(HadoopConfigurationService.HDFS_SITE);
        // THEN
        assertEquals("/mnt/fs1,/mnt/fs2", result.get(HadoopConfigurationService.HDFS_DATANODE_DATA_DIRS));
View Full Code Here

    @Test
    @Ignore
    public void testGetHdfsSiteConfigsShouldNotReturnHdfsDatanodeDataDirsPropertyWhenThereAreNoVolumesAttached() {
        // GIVEN
        Template template = ServiceTestUtils.createTemplate(CloudPlatform.AWS);
        Stack stack = ServiceTestUtils.createStack(template, credential, resources);
        resources.add(new Resource(ResourceType.CLOUDFORMATION_STACK, "", stack));
        // WHEN
        Map<String, Map<String, String>> configuration = underTest.getConfiguration(stack);
        // THEN
        assertEquals(0, configuration.size());
View Full Code Here

    public static Stack createStack(String owner, String account, Template template, Credential credential, Set<Resource> resources) {
        return createStack(owner, account, template, credential, createCluster(owner, account), resources);
    }

    public static Stack createStack(String owner, String account, Template template, Credential credential, Cluster cluster, Set<Resource> resources) {
        Stack stack = new Stack();
        stack.setAmbariIp("168.192.12.13");
        stack.setCredential(credential);
        stack.setNodeCount(2);
        stack.setMetadataReady(true);
        stack.setOwner(owner);
        stack.setAccount(account);
        stack.setTemplate(template);
        stack.setCluster(cluster);
        stack.setPublicInAccount(true);
        stack.setResources(resources);
        return stack;
    }
View Full Code Here

        // THEN
        verify(ambariStartupListener, times(1)).waitForAmbariServer(stack.getId(), DUMMY_IP);
    }

    private Event<AmbariRoleAllocationComplete> createEvent() {
        return new Event<AmbariRoleAllocationComplete>(new AmbariRoleAllocationComplete(new Stack(), DUMMY_IP));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.domain.Stack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.