use of com.sequenceiq.sdx.api.model.SdxClusterResponse in project cloudbreak by hortonworks.
the class DataLakeStatusCheckerServiceTest method createSdxResponse.
private List<SdxClusterResponse> createSdxResponse(SdxClusterStatusResponse status, String statusReason) {
SdxClusterResponse sdxClusterResponse = new SdxClusterResponse();
sdxClusterResponse.setStatus(status);
sdxClusterResponse.setStatusReason(statusReason);
return Collections.singletonList(sdxClusterResponse);
}
use of com.sequenceiq.sdx.api.model.SdxClusterResponse in project cloudbreak by hortonworks.
the class SdxCreateCustomAction method action.
@Override
public SdxCustomTestDto action(TestContext testContext, SdxCustomTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX create request: ", testDto.getRequest());
SdxClusterResponse sdxClusterResponse = client.getDefaultClient().sdxEndpoint().create(testDto.getName(), testDto.getRequest());
testDto.setFlow("SDX create", sdxClusterResponse.getFlowIdentifier());
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetailByCrn(sdxClusterResponse.getCrn(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX create response: ", client.getDefaultClient().sdxEndpoint().get(testDto.getName()));
return testDto;
}
use of com.sequenceiq.sdx.api.model.SdxClusterResponse in project cloudbreak by hortonworks.
the class SdxCreateInternalAction method action.
@Override
public SdxInternalTestDto action(TestContext testContext, SdxInternalTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX create request: ", testDto.getRequest());
SdxClusterResponse sdxClusterResponse = client.getDefaultClient().sdxInternalEndpoint().create(testDto.getName(), testDto.getRequest());
testDto.setFlow("SDX create internal", sdxClusterResponse.getFlowIdentifier());
testDto.setResponse(client.getDefaultClient().sdxEndpoint().getDetailByCrn(sdxClusterResponse.getCrn(), Collections.emptySet()));
Log.whenJson(LOGGER, " SDX create response: ", testDto.getResponse());
return testDto;
}
use of com.sequenceiq.sdx.api.model.SdxClusterResponse in project cloudbreak by hortonworks.
the class SdxResizeAction method action.
/**
* Starts SDX resize operation, and retrieves the detailed SDX response after it's finished.
* @return result of the resize
* @throws Exception if the SdxClusterDetailResponse cannot be converted to JSON
*/
@Override
public SdxInternalTestDto action(TestContext testContext, SdxInternalTestDto testDto, SdxClient client) throws Exception {
SdxClusterResizeRequest clusterResizeRequest = testDto.getSdxResizeRequest();
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX resize request: ", clusterResizeRequest);
SdxClusterResponse sdxClusterResponse = client.getDefaultClient().sdxEndpoint().resize(testDto.getName(), clusterResizeRequest);
testDto.setFlow("SDX resize", sdxClusterResponse.getFlowIdentifier());
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX resize response: ", detailedResponse);
return testDto;
}
Aggregations