Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.Blueprint


        // GIVEN
        given(jsonNode.toString()).willReturn(DUMMY_BLUEPRINT_TEXT_WO_BLUEPRINTS);
        blueprintJson.setAmbariBlueprint(jsonNode);
        blueprintJson.setUrl(null);
        // WHEN
        Blueprint result = underTest.convert(blueprintJson);
        // THEN
        assertEquals(result.getBlueprintText(), blueprintJson.getAmbariBlueprint());
    }
View Full Code Here


        // GIVEN
        given(jsonNode.toString()).willReturn(DUMMY_BLUEPRINT_TEXT_WO_BLUEPRINT_NAME);
        blueprintJson.setAmbariBlueprint(jsonNode);
        blueprintJson.setUrl(null);
        // WHEN
        Blueprint result = underTest.convert(blueprintJson);
        // THEN
        assertEquals(result.getBlueprintText(), blueprintJson.getAmbariBlueprint());
    }
View Full Code Here

        // GIVEN
        given(jsonNode.toString()).willReturn(DUMMY_BLUEPRINT_TEXT_WO_HOST_GROUPS);
        blueprintJson.setAmbariBlueprint(jsonNode);
        blueprintJson.setUrl(null);
        // WHEN
        Blueprint result = underTest.convert(blueprintJson);
        // THEN
        assertEquals(result.getBlueprintText(), blueprintJson.getAmbariBlueprint());
    }
View Full Code Here

        // GIVEN
        given(jsonNode.toString()).willReturn(DUMMY_BLUEPRINT_TEXT_HOSTGROUPS_NOT_ARRAY);
        blueprintJson.setAmbariBlueprint(jsonNode);
        blueprintJson.setUrl(null);
        // WHEN
        Blueprint result = underTest.convert(blueprintJson);
        // THEN
        assertEquals(result.getBlueprintText(), blueprintJson.getAmbariBlueprint());
    }
View Full Code Here

        // GIVEN
        given(jsonNode.toString()).willReturn(DUMMY_BLUEPRINT_TEXT_HOSTGROUPS_DONT_HAVE_NAME);
        blueprintJson.setAmbariBlueprint(jsonNode);
        blueprintJson.setUrl(null);
        // WHEN
        Blueprint result = underTest.convert(blueprintJson);
        // THEN
        assertEquals(result.getBlueprintText(), blueprintJson.getAmbariBlueprint());
    }
View Full Code Here

        blueprintJson.setDescription(DUMMY_DESCRIPTION);
        return blueprintJson;
    }

    private Blueprint createBlueprint() {
        Blueprint blueprint = new Blueprint();
        blueprint.setBlueprintName(DUMMY_NAME);
        blueprint.setDescription(DUMMY_DESCRIPTION);
        blueprint.setId(Long.parseLong(DUMMY_ID));
        blueprint.setBlueprintText(DUMMY_BLUEPRINT_TEXT);
        blueprint.setPublicInAccount(true);
        return blueprint;
    }
View Full Code Here

    public static Blueprint createBlueprint() {
        return createBlueprint(DUMMY_OWNER, DUMMY_ACCOUNT);
    }

    public static Blueprint createBlueprint(String owner, String account) {
        Blueprint blueprint = new Blueprint();
        blueprint.setId(1L);
        blueprint.setBlueprintName("test-blueprint");
        blueprint.setBlueprintText("dummyText");
        blueprint.setHostGroupCount(3);
        blueprint.setDescription("test blueprint");
        blueprint.setName("multi-node-hdfs-yarn");
        blueprint.setOwner(owner);
        blueprint.setAccount(account);
        blueprint.setPublicInAccount(true);
        return blueprint;
    }
View Full Code Here

        cluster.setBlueprint(blueprint);
        return cluster;
    }

    private Blueprint createBlueprint() {
        Blueprint blueprint = new Blueprint();
        blueprint.setId(1L);
        blueprint.setBlueprintName("single-node-yarn");
        return blueprint;
    }
View Full Code Here

    @Test
    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);
View Full Code Here

        try {
            LOGGER.info("Starting Ambari cluster installation [Ambari server address: {}]", stack.getAmbariIp());
            stackUpdater.updateStackStatus(stack.getId(), Status.UPDATE_IN_PROGRESS);
            cluster.setCreationStarted(new Date().getTime());
            cluster = clusterRepository.save(cluster);
            Blueprint blueprint = cluster.getBlueprint();
            AmbariClient ambariClient = createAmbariClient(stack.getAmbariIp());

            addBlueprint(stack, ambariClient, blueprint);
            Map<String, List<String>> hostGroupMappings = recommend(stack, ambariClient, blueprint.getBlueprintName());
            saveHostMetadata(cluster, hostGroupMappings);
            ambariClient.createCluster(cluster.getName(), blueprint.getBlueprintName(), hostGroupMappings);
            waitForClusterInstall(stack, ambariClient);
            clusterCreateSuccess(cluster, new Date().getTime(), stack.getAmbariIp());
        } catch (AmbariHostsUnavailableException | AmbariOperationFailedException | InvalidHostGroupHostAssociation e) {
            LOGGER.error(e.getMessage(), e);
            clusterCreateFailed(cluster, e.getMessage());
View Full Code Here

TOP

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

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.