Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename SystemStatus to TerraformBootSystemStatus #12

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.xpanse.terraform.boot.models.SystemStatus;
import org.eclipse.xpanse.terraform.boot.models.TerraformBootSystemStatus;
import org.eclipse.xpanse.terraform.boot.models.request.TerraformDeployRequest;
import org.eclipse.xpanse.terraform.boot.models.request.TerraformDestroyRequest;
import org.eclipse.xpanse.terraform.boot.models.request.async.TerraformAsyncDeployRequest;
Expand Down Expand Up @@ -56,7 +56,7 @@ public TerraformApiController(TerraformExecutor terraformExecutor) {
@Operation(description = "Check health of Terraform API service")
@GetMapping(value = "/health", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
public SystemStatus healthCheck() {
public TerraformBootSystemStatus healthCheck() {
return this.terraformExecutor.tfHealthCheck();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Describes health status of the system.
*/
@Data
public class SystemStatus {
public class TerraformBootSystemStatus {

@NotNull
@Schema(description = "The health status of Xpanse api service.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.UUID;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.xpanse.terraform.boot.models.SystemStatus;
import org.eclipse.xpanse.terraform.boot.models.TerraformBootSystemStatus;
import org.eclipse.xpanse.terraform.boot.models.enums.HealthStatus;
import org.eclipse.xpanse.terraform.boot.models.exceptions.TerraformExecutorException;
import org.eclipse.xpanse.terraform.boot.models.exceptions.TerraformHealthCheckException;
Expand Down Expand Up @@ -269,9 +269,9 @@ public TerraformValidationResult tfValidate(String moduleDirectory) {
/**
* Perform Terraform health checks by creating a Terraform test configuration file.
*
* @return SystemStatus.
* @return TerraformBootSystemStatus.
*/
public SystemStatus tfHealthCheck() {
public TerraformBootSystemStatus tfHealthCheck() {
String filePath = getModuleFullPath(HEALTH_CHECK_DIR) + File.separator
+ TEST_FILE_NAME;
try {
Expand All @@ -288,7 +288,7 @@ public SystemStatus tfHealthCheck() {
"Error creating or writing to file '" + filePath + "': " + e.getMessage());
}
TerraformValidationResult terraformValidationResult = tfValidate(HEALTH_CHECK_DIR);
SystemStatus systemStatus = new SystemStatus();
TerraformBootSystemStatus systemStatus = new TerraformBootSystemStatus();
if (terraformValidationResult.isValid()) {
systemStatus.setHealthStatus(HealthStatus.OK);
return systemStatus;
Expand Down