Search in sources :

Example 6 with DistroXUpgradeV1Response

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;
}
Also used : StackV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackV4Response) DistroXUpgradeV1Response(com.sequenceiq.distrox.api.v1.distrox.model.upgrade.DistroXUpgradeV1Response) DistroXUpgradeV1Request(com.sequenceiq.distrox.api.v1.distrox.model.upgrade.DistroXUpgradeV1Request)

Aggregations

DistroXUpgradeV1Response (com.sequenceiq.distrox.api.v1.distrox.model.upgrade.DistroXUpgradeV1Response)6 UpgradeV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.upgrade.UpgradeV4Response)5 DistroXUpgradeV1Request (com.sequenceiq.distrox.api.v1.distrox.model.upgrade.DistroXUpgradeV1Request)5 Test (org.junit.jupiter.api.Test)5 InternalUpgradeSettings (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.InternalUpgradeSettings)4 UpgradeV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.tags.upgrade.UpgradeV4Request)4 StackV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackV4Response)1 ImageInfoV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.image.ImageInfoV4Response)1 FlowIdentifier (com.sequenceiq.flow.api.model.FlowIdentifier)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1