use of com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto 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;
}
use of com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto 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);
}
use of com.sequenceiq.it.cloudbreak.dto.stack.StackTestDto 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;
}
Aggregations