use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class DistroXRepairAction method action.
@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
DistroXRepairV1Request distroXRepairV1Request = createRepairRequest();
Log.when(LOGGER, format(" Starting repair on DistroX: %s ", testDto.getName()));
Log.whenJson(LOGGER, " DistroX repair request: ", distroXRepairV1Request);
FlowIdentifier flowIdentifier = client.getDefaultClient().distroXV1Endpoint().repairClusterByName(testDto.getName(), distroXRepairV1Request);
testDto.setFlow("DistroX repair flow identifier", flowIdentifier);
StackV4Response stackV4Response = client.getDefaultClient().distroXV1Endpoint().getByName(testDto.getName(), Collections.emptySet());
testDto.setResponse(stackV4Response);
Log.whenJson(LOGGER, " DistroX repair response: ", stackV4Response);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class DistroXRepairInstancesAction method action.
@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
DistroXRepairV1Request distroXRepairV1Request = createRepairRequest(testDto.getRepairableInstanceIds().orElse(Collections.emptyList()));
Log.when(LOGGER, format("Starting repair instances on DistroX: %s ", testDto.getName()));
Log.whenJson(LOGGER, "DistroX instance id based repair request: ", distroXRepairV1Request);
FlowIdentifier flowIdentifier = client.getDefaultClient().distroXV1Endpoint().repairClusterByName(testDto.getName(), distroXRepairV1Request);
testDto.setFlow("DistroX instance id based repair flow identifier", flowIdentifier);
StackV4Response stackV4Response = client.getDefaultClient().distroXV1Endpoint().getByName(testDto.getName(), Collections.emptySet());
testDto.setResponse(stackV4Response);
Log.whenJson(LOGGER, " DistroX instance id based repair response: ", stackV4Response);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxAutotlsCertRotationAction method action.
@Override
public SdxTestDto action(TestContext testContext, SdxTestDto testDto, SdxClient client) throws Exception {
CertificatesRotationV4Request certificatesRotationV4Request = new CertificatesRotationV4Request();
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX autotls cert rotation request: ", certificatesRotationV4Request);
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().rotateAutoTlsCertificatesByName(testDto.getName(), new CertificatesRotationV4Request());
testDto.setFlow("SDX autotls cert rotation", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX response after autotls cert rotation: ", detailedResponse);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class DistroXStartAction method action.
@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
Log.when(LOGGER, format(" Starting Distrox: %s ", testDto.getName()));
Log.whenJson(LOGGER, " Distrox start request: ", testDto.getRequest());
FlowIdentifier flowIdentifier = client.getDefaultClient().distroXV1Endpoint().putStartByName(testDto.getName());
testDto.setFlow("DistroX start", flowIdentifier);
StackV4Response stackV4Response = client.getDefaultClient().distroXV1Endpoint().getByName(testDto.getName(), Collections.emptySet());
testDto.setResponse(stackV4Response);
Log.whenJson(LOGGER, " Distrox start response: ", stackV4Response);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxDeleteAction method action.
@Override
public SdxTestDto action(TestContext testContext, SdxTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, " SDX endpoint: %s" + client.getDefaultClient().sdxEndpoint() + ", SDX's environment: " + testDto.getRequest().getEnvironment());
Log.whenJson(LOGGER, " SDX delete request: ", testDto.getRequest());
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().delete(testDto.getName(), false);
testDto.setFlow("SDX delete", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX delete response: ", detailedResponse);
return testDto;
}
Aggregations