use of com.sequenceiq.cloudbreak.cloud.model.base.ResponseStatus in project cloudbreak by hortonworks.
the class S3GuardTableDeleteHandler method deleteS3GuardTable.
private void deleteS3GuardTable(Environment environment, AwsParameters awsParameters) {
if (S3GuardTableCreation.CREATE_NEW == awsParameters.getS3guardTableCreation()) {
LocationAwareCredential locationAwareCredential = getLocationAwareCredential(environment);
ResponseStatus responseStatus = deleteNoSqlTable(locationAwareCredential, awsParameters.getS3guardTableName());
if (responseStatus == ResponseStatus.OK) {
LOGGER.info("'{}' DynamoDB table deletion initiated at cloud provider.", awsParameters.getS3guardTableName());
} else if (responseStatus == ResponseStatus.RESOURCE_NOT_FOUND) {
LOGGER.warn("'{}' DynamoDB table deletion initiated but table was not found.", awsParameters.getS3guardTableName());
}
} else {
LOGGER.info("'{}' DynamoDB table had already been existing before environment creation. Will not delete it.", awsParameters.getS3guardTableName());
}
}
Aggregations