use of com.sequenceiq.sdx.api.model.SdxUpgradeResponse in project cloudbreak by hortonworks.
the class SdxCheckForUpgradeAction method action.
@Override
public SdxTestDto action(TestContext testContext, SdxTestDto testDto, SdxClient client) throws Exception {
Log.log(LOGGER, format(" Environment: %s", testDto.getRequest().getEnvironment()));
Log.whenJson(LOGGER, " SDX check for upgrade request: ", testDto.getRequest());
SdxUpgradeRequest request = new SdxUpgradeRequest();
request.setDryRun(true);
SdxUpgradeResponse upgradeResponse = client.getDefaultClient().sdxUpgradeEndpoint().upgradeClusterByName(testDto.getName(), request);
Log.whenJson(LOGGER, " SDX check for upgrade response: ", upgradeResponse);
Log.log(LOGGER, " SDX name: %s", client.getDefaultClient().sdxEndpoint().get(testDto.getName()).getName());
return testDto;
}
use of com.sequenceiq.sdx.api.model.SdxUpgradeResponse in project cloudbreak by hortonworks.
the class SdxInternalUpgradeAction method action.
@Override
public SdxInternalTestDto action(TestContext testContext, SdxInternalTestDto testDto, SdxClient client) throws Exception {
SdxUpgradeRequest upgradeRequest = testDto.getSdxUpgradeRequest();
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX upgrade request: ", upgradeRequest);
SdxUpgradeResponse upgradeResponse = client.getDefaultClient().sdxUpgradeEndpoint().upgradeClusterByName(testDto.getName(), upgradeRequest);
testDto.setFlow("SDX upgrade", upgradeResponse.getFlowIdentifier());
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX upgrade response: ", detailedResponse);
return testDto;
}
Aggregations