#2404 change software state from patching to fixing to align with CAOS v0.8

This commit is contained in:
Cristian-VM2
2024-03-26 16:41:11 +00:00
parent b3c1b6b7a5
commit 5860c74ef9
8 changed files with 28 additions and 28 deletions

View File

@@ -43,8 +43,8 @@ class SoftwareHealthState(Enum):
"Unused state."
GOOD = 1
"The software is in a good and healthy condition."
PATCHING = 2
"The software is undergoing patching or updates."
FIXING = 2
"The software is undergoing FIXING or updates."
COMPROMISED = 3
"The software's security has been compromised."
OVERWHELMED = 4
@@ -198,7 +198,7 @@ class Software(SimComponent):
"""Perform a fix on the software."""
if self.health_state_actual in (SoftwareHealthState.COMPROMISED, SoftwareHealthState.GOOD):
self._fixing_countdown = self.fixing_duration
self.set_health_state(SoftwareHealthState.PATCHING)
self.set_health_state(SoftwareHealthState.FIXING)
return True
return False
@@ -221,7 +221,7 @@ class Software(SimComponent):
:param timestep: The current timestep of the simulation.
"""
super().apply_timestep(timestep)
if self.health_state_actual == SoftwareHealthState.PATCHING:
if self.health_state_actual == SoftwareHealthState.FIXING:
self._update_fix_status()