Skip to content

Commit

Permalink
[mock_uss/flight_planning] Exclude OVN from key when USS is down (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmis authored Nov 17, 2023
1 parent 05bdd30 commit 1fd5bbc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion monitoring/mock_uss/f3548v21/flight_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ def get_down_uss_op_intent(
conflict, that way we can just retrieve the conflicting area instead of having to compute again the intersection
between the flight to be planned and the conflicting operational intent.
"""

# at that point the value of the OVN as it is returned by the DSS may be `Available from USS`, so we explicitly
# remove it so that it is excluded from the key
op_intent_ref.ovn = None

# USS is declared as down and does not answer for details : minimum - 1
if op_intent_ref.state == f3548_v21.OperationalIntentState.Accepted:
return f3548_v21.OperationalIntent(
Expand Down Expand Up @@ -437,7 +442,11 @@ def check_op_intent(
new_flight.op_intent, existing_flight, op_intents, locality, log
)

key = [f3548_v21.EntityOVN(op.reference.ovn) for op in op_intents]
key = [
f3548_v21.EntityOVN(op.reference.ovn)
for op in op_intents
if op.reference.ovn is not None
]
else:
# Flight is not nominal and therefore doesn't need to check intersections
key = []
Expand Down

0 comments on commit 1fd5bbc

Please sign in to comment.