Skip to content

Commit

Permalink
Rename SystemStatus to TerraformBootSystemStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyangyang222 committed Aug 29, 2023
1 parent bf23036 commit 470ac1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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

0 comments on commit 470ac1b

Please sign in to comment.