use of com.sequenceiq.cloudbreak.api.model.StackResponse in project cloudbreak by hortonworks.
the class ScalingUtil method checkClusterScaled.
public static void checkClusterScaled(StackEndpoint stackV1Endpoint, String port, String stackId, String ambariUser, String ambariPassword, int expectedNodeCount, IntegrationTestContext itContext) {
StackResponse stackResponse = stackV1Endpoint.get(Long.valueOf(stackId), new HashSet<>());
checkClusterScaled(CloudbreakUtil.getAmbariIp(stackResponse, itContext), port, ambariUser, ambariPassword, expectedNodeCount, stackResponse);
}
use of com.sequenceiq.cloudbreak.api.model.StackResponse in project cloudbreak by hortonworks.
the class ScalingUtil method putInstanceCountToContext.
public static void putInstanceCountToContext(IntegrationTestContext itContext, String stackId) {
Collection<Map<String, Integer>> tmpInstanceCount = new ArrayList<>();
StackV1Endpoint stackV1Endpoint = itContext.getContextParam(CloudbreakITContextConstants.CLOUDBREAK_CLIENT, CloudbreakClient.class).stackV1Endpoint();
StackResponse stackResponse = stackV1Endpoint.get(Long.valueOf(stackId), new HashSet<>());
if (itContext.getContextParam(CloudbreakITContextConstants.INSTANCE_COUNT, List.class) != null) {
tmpInstanceCount = itContext.getContextParam(CloudbreakITContextConstants.INSTANCE_COUNT, List.class);
tmpInstanceCount.add(getNodeCountByHostgroup(stackResponse));
} else {
tmpInstanceCount.add(getNodeCountByHostgroup(stackResponse));
}
itContext.putContextParam(CloudbreakITContextConstants.INSTANCE_COUNT, tmpInstanceCount);
}
use of com.sequenceiq.cloudbreak.api.model.StackResponse in project cloudbreak by hortonworks.
the class CloudbreakUtil method checkClusterFailed.
public static void checkClusterFailed(StackEndpoint stackV1Endpoint, String stackId, CharSequence failMessage) {
StackResponse stackResponse = stackV1Endpoint.get(Long.valueOf(stackId), new HashSet<>());
Assert.assertNotEquals(stackResponse.getCluster().getStatus(), Status.AVAILABLE);
Assert.assertTrue(stackResponse.getCluster().getStatusReason().contains(failMessage));
}
use of com.sequenceiq.cloudbreak.api.model.StackResponse in project cloudbreak by hortonworks.
the class CloudbreakUtil method checkClusterStopped.
public static void checkClusterStopped(StackEndpoint stackV1Endpoint, String port, String stackId, String ambariUser, String ambariPassword) {
StackResponse stackResponse = stackV1Endpoint.get(Long.valueOf(stackId), new HashSet<>());
checkClusterStopped(port, ambariUser, ambariPassword, stackResponse);
}
use of com.sequenceiq.cloudbreak.api.model.StackResponse in project cloudbreak by hortonworks.
the class StackService method getJsonById.
@Transactional(TxType.NEVER)
public StackResponse getJsonById(Long id, Collection<String> entry) {
Stack stack = getByIdWithLists(id);
authorizationService.hasReadPermission(stack);
StackResponse stackResponse = conversionService.convert(stack, StackResponse.class);
stackResponse = stackResponseDecorator.decorate(stackResponse, stack, entry);
return stackResponse;
}
Aggregations