Merged PR 253: Make observations use software health state visible instead of actual.
We already merged this change into dev, I just replicated it for b5. Related work items: #2161, #2174
This commit is contained in:
@@ -140,7 +140,10 @@ class ServiceObservation(AbstractObservation):
|
|||||||
service_state = access_from_nested_dict(state, self.where)
|
service_state = access_from_nested_dict(state, self.where)
|
||||||
if service_state is NOT_PRESENT_IN_STATE:
|
if service_state is NOT_PRESENT_IN_STATE:
|
||||||
return self.default_observation
|
return self.default_observation
|
||||||
return {"operating_status": service_state["operating_state"], "health_status": service_state["health_state"]}
|
return {
|
||||||
|
"operating_status": service_state["operating_state"],
|
||||||
|
"health_status": service_state["health_state_visible"],
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def space(self) -> spaces.Space:
|
def space(self) -> spaces.Space:
|
||||||
|
|||||||
@@ -145,8 +145,8 @@ class Software(SimComponent):
|
|||||||
state = super().describe_state()
|
state = super().describe_state()
|
||||||
state.update(
|
state.update(
|
||||||
{
|
{
|
||||||
"health_state": self.health_state_actual.value,
|
"health_state_actual": self.health_state_actual.value,
|
||||||
"health_state_red_view": self.health_state_visible.value,
|
"health_state_visible": self.health_state_visible.value,
|
||||||
"criticality": self.criticality.value,
|
"criticality": self.criticality.value,
|
||||||
"patching_count": self.patching_count,
|
"patching_count": self.patching_count,
|
||||||
"scanning_count": self.scanning_count,
|
"scanning_count": self.scanning_count,
|
||||||
|
|||||||
Reference in New Issue
Block a user