Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.Cluster


    private Stack createStack() {
        Stack stack = new Stack();
        stack.setAmbariIp(AMBARI_IP);
        stack.setStackCompleted(CF_STACK_COMPLETED);
        stack.setCluster(new Cluster());
        stack.setCredential(awsCredential);
        stack.setTemplate(awsTemplate);
        stack.setDescription(DESCRIPTION);
        stack.setHash(DUMMY_HASH);
        stack.setId(DUMMY_ID);
View Full Code Here


    @Test
    public void testConvertClusterEntityToJson() {
        // GIVEN
        given(blueprintRepository.findOne(anyLong())).willReturn(blueprint);
        // WHEN
        Cluster result = underTest.convert(clusterRequest);
        // THEN
        assertEquals(result.getDescription(), clusterRequest.getDescription());
        assertEquals(result.getBlueprint().getId(), clusterRequest.getBlueprintId());
    }
View Full Code Here

        // THEN
        assertEquals(response.getDescription(), "");
    }

    private Cluster createCluster() {
        Cluster cluster = new Cluster();
        cluster.setBlueprint(blueprint);
        cluster.setCreationFinished(100L);
        cluster.setCreationStarted(0L);
        cluster.setDescription(DUMMY_DESCRIPTION);
        cluster.setId(1L);
        cluster.setName(DUMMY_NAME);
        cluster.setStatus(Status.AVAILABLE);
        cluster.setStatusReason(DUMMY_STATUS_REASON);
        cluster.setOwner(DUMMY_EMAIL);
        cluster.setAccount(DUMMY_ACCOUNT);
        return cluster;
    }
View Full Code Here

        stack.setCluster(cluster);
        return stack;
    }

    private Cluster createCluster() {
        Cluster cluster = new Cluster();
        cluster.setId(1L);
        cluster.setName("dummyCluster");
        Blueprint blueprint = new Blueprint();
        blueprint.setId(1L);
        cluster.setBlueprint(blueprint);
        return cluster;
    }
View Full Code Here

        // THEN
        verify(ambariClusterInstaller, times(0)).installAmbariCluster(any(Stack.class));
    }

    private Cluster createClusterWithStatus(Status status) {
        Cluster cluster = new Cluster();
        cluster.setStatus(status);
        return cluster;
    }
View Full Code Here

    public void setUp() {
        underTest = new ClusterCreationSuccessHandler();
        MockitoAnnotations.initMocks(this);
        clusterCreationSuccess = new ClusterCreationSuccess(1L, 20L, "1.1.1.1");
        event = new Event<>(clusterCreationSuccess);
        cluster = new Cluster();
        cluster.setEmailNeeded(false);
        stack = new Stack();
        Set<InstanceMetaData> instanceMetaData = new HashSet<>();
        stack.setInstanceMetaData(instanceMetaData);
        cluster.setOwner("John");
View Full Code Here

        stack.setCluster(cluster);
        return stack;
    }

    private Cluster createCluster(Blueprint blueprint) {
        Cluster cluster = new Cluster();
        cluster.setId(1L);
        cluster.setName("dummyCluster");
        cluster.setBlueprint(blueprint);
        return cluster;
    }
View Full Code Here

        stack.setResources(resources);
        return stack;
    }

    public static Cluster createCluster(String owner, String account, Blueprint blueprint) {
        Cluster cluster = new Cluster();
        cluster.setName("test-cluster");
        cluster.setDescription("test cluster");
        cluster.setEmailNeeded(false);
        cluster.setStatus(Status.AVAILABLE);
        cluster.setStatusReason("");
        cluster.setCreationStarted(123456789L);
        cluster.setCreationFinished(223456789L);
        cluster.setOwner(owner);
        cluster.setAccount(account);
        cluster.setBlueprint(blueprint);
        return cluster;
    }
View Full Code Here

    public void setUp() {
        underTest = new ClusterCreationFailureHandler();
        MockitoAnnotations.initMocks(this);
        clusterCreationFailure = new ClusterCreationFailure(1L, "dummyMessage");
        event = new Event<>(clusterCreationFailure);
        cluster = new Cluster();
        cluster.setEmailNeeded(false);
        cluster.setOwner("dummy@myemail.com");
        cluster.setAccount("myaccount");
    }
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);

        //WHEN
View Full Code Here

TOP

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

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.