use of com.sequenceiq.sdx.api.model.SdxClusterDetailResponse 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.sdx.api.model.SdxClusterDetailResponse in project cloudbreak by hortonworks.
the class SdxBackupAction method action.
@Override
public SdxTestDto action(TestContext testContext, SdxTestDto testDto, SdxClient client) throws Exception {
String sdxName = testDto.getName();
testContext.waitingFor(Duration.ofMinutes(2), "Waiting for CM services to be synchronized has been interrupted");
Log.when(LOGGER, format(" SDX '%s' backup has been started to '%s' by name '%s'... ", sdxName, backupLocation, backupName));
Log.whenJson(LOGGER, " SDX backup request: ", testDto.getRequest());
LOGGER.info(format(" SDX '%s' backup has been started to '%s' by name '%s'... ", sdxName, backupLocation, backupName));
SdxBackupResponse sdxBackupResponse = client.getDefaultClient().sdxBackupEndpoint().backupDatalakeByName(sdxName, backupLocation, backupName);
testDto.setFlow("SDX backup", sdxBackupResponse.getFlowIdentifier());
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(sdxName, Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX response after backup: ", client.getDefaultClient().sdxEndpoint().get(sdxName));
return testDto;
}
use of com.sequenceiq.sdx.api.model.SdxClusterDetailResponse in project cloudbreak by hortonworks.
the class SdxBackupInternalAction method action.
@Override
public SdxInternalTestDto action(TestContext testContext, SdxInternalTestDto testDto, SdxClient client) throws Exception {
String sdxName = testDto.getName();
testContext.waitingFor(Duration.ofMinutes(2), "Waiting for CM services to be synchronized has been interrupted");
Log.when(LOGGER, format(" Internal SDX '%s' backup has been started to '%s' by name '%s'... ", sdxName, backupLocation, backupName));
Log.whenJson(LOGGER, " Internal SDX backup request: ", testDto.getRequest());
LOGGER.info(format(" Internal SDX '%s' backup has been started to '%s' by name '%s'... ", sdxName, backupLocation, backupName));
SdxBackupResponse sdxBackupResponse = client.getDefaultClient().sdxBackupEndpoint().backupDatalakeByName(sdxName, backupLocation, backupName);
testDto.setFlow("SDX backup", sdxBackupResponse.getFlowIdentifier());
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(sdxName, Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " Internal SDX response after backup: ", client.getDefaultClient().sdxEndpoint().get(sdxName));
return testDto;
}
use of com.sequenceiq.sdx.api.model.SdxClusterDetailResponse in project cloudbreak by hortonworks.
the class SdxCreateAction 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 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.SdxClusterDetailResponse 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