Search in sources :

Example 1 with ClusterTestDto

use of com.sequenceiq.it.cloudbreak.dto.ClusterTestDto in project cloudbreak by hortonworks.

the class SdxInternalTestDto method withTemplate.

public SdxInternalTestDto withTemplate(String template) {
    ClusterTestDto cluster = getTestContext().given(ClusterTestDto.class);
    cluster.withBlueprintName(String.format(template, commonClusterManagerProperties.getRuntimeVersion()));
    return this;
}
Also used : ClusterTestDto(com.sequenceiq.it.cloudbreak.dto.ClusterTestDto)

Example 2 with ClusterTestDto

use of com.sequenceiq.it.cloudbreak.dto.ClusterTestDto in project cloudbreak by hortonworks.

the class SdxInternalTestDto method withTemplate.

public SdxInternalTestDto withTemplate(JSONObject templateJson) {
    StackTestDto stack = getTestContext().given(StackTestDto.class);
    ClusterTestDto cluster = getTestContext().given(ClusterTestDto.class);
    cluster.withName(cluster.getName()).withBlueprintName(getBlueprintName()).withValidateBlueprint(Boolean.FALSE).withPassword(getClusterPassword(templateJson)).withUserName(getClusterUser(templateJson));
    stack.withName(getName()).withImageSettings(getImageCatalog(getTestContext().given(ImageSettingsTestDto.class), templateJson)).withPlacement(getTestContext().given(PlacementSettingsTestDto.class)).withInstanceGroupsEntity(InstanceGroupTestDto.sdxHostGroup(getTestContext())).withInstanceGroups(MASTER.getName(), IDBROKER.getName()).withStackAuthentication(getAuthentication(getTestContext().given(StackAuthenticationTestDto.class), templateJson)).withCluster(cluster);
    SdxInternalTestDto sdxInternalTestDto = withStackRequest(stack.getRequest());
    sdxInternalTestDto.withRuntimeVersion(commonClusterManagerProperties.getRuntimeVersion());
    return sdxInternalTestDto;
}
Also used : StackTestDto(com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto) ImageSettingsTestDto(com.sequenceiq.it.cloudbreak.dto.ImageSettingsTestDto) PlacementSettingsTestDto(com.sequenceiq.it.cloudbreak.dto.PlacementSettingsTestDto) ClusterTestDto(com.sequenceiq.it.cloudbreak.dto.ClusterTestDto) StackAuthenticationTestDto(com.sequenceiq.it.cloudbreak.dto.StackAuthenticationTestDto)

Example 3 with ClusterTestDto

use of com.sequenceiq.it.cloudbreak.dto.ClusterTestDto in project cloudbreak by hortonworks.

the class SdxInternalTestDto method withStackRequest.

public SdxInternalTestDto withStackRequest(RunningParameter clusterKey, RunningParameter stackKey) {
    ClusterTestDto cluster = getTestContext().get(clusterKey.getKey());
    StackTestDto stack = getTestContext().get(stackKey.getKey());
    if (cluster == null) {
        throw new IllegalArgumentException("Cluster is null with given key: " + clusterKey.getKey());
    }
    if (stack == null) {
        throw new IllegalArgumentException("Stack is null with given key: " + stackKey.getKey());
    }
    return withStackRequest(cluster, stack);
}
Also used : StackTestDto(com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto) ClusterTestDto(com.sequenceiq.it.cloudbreak.dto.ClusterTestDto)

Example 4 with ClusterTestDto

use of com.sequenceiq.it.cloudbreak.dto.ClusterTestDto in project cloudbreak by hortonworks.

the class SdxInternalTestDto method withDefaultSDXSettings.

public SdxInternalTestDto withDefaultSDXSettings(Optional<Integer> gatewayPort) {
    StackTestDto stack = getTestContext().given(StackTestDto.class);
    ClusterTestDto cluster = getTestContext().given(ClusterTestDto.class);
    getTestContext().given("master", InstanceGroupTestDto.class).withHostGroup(MASTER).withNodeCount(1).given("idbroker", InstanceGroupTestDto.class).withHostGroup(IDBROKER).withNodeCount(1);
    cluster.withName(cluster.getName()).withBlueprintName(commonClusterManagerProperties.getInternalSdxBlueprintName()).withValidateBlueprint(Boolean.FALSE);
    stack.withName(stack.getName()).withInstanceGroupsEntity(InstanceGroupTestDto.sdxHostGroup(getTestContext())).withInstanceGroups(MASTER.getName(), IDBROKER.getName()).withCluster(cluster);
    if (gatewayPort.isPresent()) {
        stack.withGatewayPort(gatewayPort.get());
    }
    SdxInternalTestDto sdxInternalTestDto = withStackRequest(stack.getRequest());
    sdxInternalTestDto.withRuntimeVersion(commonClusterManagerProperties.getRuntimeVersion());
    return sdxInternalTestDto;
}
Also used : StackTestDto(com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto) ClusterTestDto(com.sequenceiq.it.cloudbreak.dto.ClusterTestDto) InstanceGroupTestDto(com.sequenceiq.it.cloudbreak.dto.InstanceGroupTestDto)

Aggregations

ClusterTestDto (com.sequenceiq.it.cloudbreak.dto.ClusterTestDto)4 StackTestDto (com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto)3 ImageSettingsTestDto (com.sequenceiq.it.cloudbreak.dto.ImageSettingsTestDto)1 InstanceGroupTestDto (com.sequenceiq.it.cloudbreak.dto.InstanceGroupTestDto)1 PlacementSettingsTestDto (com.sequenceiq.it.cloudbreak.dto.PlacementSettingsTestDto)1 StackAuthenticationTestDto (com.sequenceiq.it.cloudbreak.dto.StackAuthenticationTestDto)1