use of com.sequenceiq.distrox.api.v1.distrox.model.upgrade.DistroXUpgradeV1Response in project cloudbreak by hortonworks.
the class DistroXUpgradeAction method action.
@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
DistroXUpgradeV1Request upgradeRequest = testDto.getDistroXUpgradeRequest();
Log.when(LOGGER, format(" Starting DistroX upgrade: %s ", testDto.getName()));
Log.whenJson(LOGGER, " DistroX upgrade request: ", upgradeRequest);
DistroXUpgradeV1Response response = client.getDefaultClient().distroXUpgradeV1Endpoint().upgradeClusterByName(testDto.getName(), upgradeRequest);
testDto.setFlow("DistroX upgrade flow identifier", response.getFlowIdentifier());
StackV4Response stackV4Response = client.getDefaultClient().distroXV1Endpoint().getByName(testDto.getName(), Collections.emptySet());
testDto.setResponse(stackV4Response);
Log.whenJson(LOGGER, " DistroX upgrade response: ", stackV4Response);
return testDto;
}
Aggregations