Skip to content

Commit

Permalink
Merge remote-tracking branch 'interuss/main' into flight-intent-valid…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
BenjaminPelletier committed Dec 8, 2023
2 parents 1c4d8a5 + 5b4bd9e commit e876850
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
3 changes: 3 additions & 0 deletions monitoring/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN apt-get update && apt-get install -y openssl curl libgeos-dev gcc && apt-get
# required for gevent to build without error in an ARM environment
RUN apt-get update && apt-get install -y libffi-dev libssl-dev python3-dev build-essential

# required for lxml to install successfully with pip (at least on an ARM environment)
RUN apt-get update && apt-get install -y libxml2-dev libxslt-dev

RUN mkdir -p /app/monitoring
COPY ./requirements.txt /app/monitoring/requirements.txt
RUN pip install -r /app/monitoring/requirements.txt
Expand Down
10 changes: 10 additions & 0 deletions monitoring/mock_uss/f3548v21/flight_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,16 @@ def check_op_intent(
f"Operational intent state transition from {state_transition_from} to {state_transition_to} is invalid"
)

# Check the priority is allowed in the locality
priority = new_flight.op_intent.details.priority
if (
priority > locality.highest_priority()
or priority <= locality.lowest_bound_priority()
):
raise PlanningError(
f"Operational intent priority {priority} is outside the bounds of the locality priority range (]{locality.lowest_bound_priority()},{locality.highest_priority()}])"
)

if new_flight.op_intent.reference.state in (
f3548_v21.OperationalIntentState.Accepted,
f3548_v21.OperationalIntentState.Activated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ v1:
resources:
flight_planners: flight_planners
conflicting_flights: conflicting_flights
priority_preemption_flights: priority_preemption_flights
invalid_flight_intents: invalid_flight_intents
non_conflicting_flights: non_conflicting_flights
dss: dss
Expand Down Expand Up @@ -57,13 +56,6 @@ v1:
file:
path: file://./test_data/che/flight_intents/conflicting_flights.yaml

# Details of priority-preemption flights (used in nominal planning priority scenario)
priority_preemption_flights:
resource_type: resources.flight_planning.FlightIntentsResource
specification:
file:
path: test_data.che.flight_intents.conflicting_flights

# Details of flights with invalid operational intents (used in flight intent validation scenario)
invalid_flight_intents:
resource_type: resources.flight_planning.FlightIntentsResource
Expand Down
27 changes: 18 additions & 9 deletions monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,23 @@ def expect_shared(
"Operational intent shared correctly", [self._flight_planner.participant_id]
) as check:
if self._orig_oi_ref is None:
# we expect a new op intent to have been created
# We expect a new op intent to have been created. Exception made if skip_if_not_found=True: step is
# skipped.
if self._new_oi_ref is None:
check.record_failed(
summary="Operational intent reference not found in DSS",
severity=Severity.High,
details=f"USS {self._flight_planner.participant_id} was supposed to have shared a new operational intent with the DSS, but no matching operational intent references were found in the DSS in the area of the flight intent",
query_timestamps=[self._after_query.request.timestamp],
)
if not skip_if_not_found:
check.record_failed(
summary="Operational intent reference not found in DSS",
severity=Severity.High,
details=f"USS {self._flight_planner.participant_id} was supposed to have shared a new operational intent with the DSS, but no matching operational intent references were found in the DSS in the area of the flight intent",
query_timestamps=[self._after_query.request.timestamp],
)
else:
self._scenario.record_note(
f"{self._flight_planner.participant_id} skipped step",
f"No new operational intent was found in DSS, instructed to skip test step '{self._test_step}'.",
)
self._scenario.end_test_step()
return None
oi_ref = self._new_oi_ref

elif self._new_oi_ref is None:
Expand Down Expand Up @@ -223,8 +232,8 @@ def expect_shared(
)
else:
self._scenario.record_note(
self._flight_planner.participant_id,
f"Operational intent reference with ID {self._orig_oi_ref.id} not found in DSS, instructed to skip test step.",
f"{self._flight_planner.participant_id} skipped step",
f"Operational intent reference with ID {self._orig_oi_ref.id} not found in DSS, instructed to skip test step '{self._test_step}'.",
)
self._scenario.end_test_step()
return None
Expand Down
2 changes: 1 addition & 1 deletion monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resources:
dss: resources.astm.f3548.v21.DSSInstanceResource
dss_instances: resources.astm.f3548.v21.DSSInstancesResource?
conflicting_flights: resources.flight_planning.FlightIntentsResource
priority_preemption_flights: resources.flight_planning.FlightIntentsResource
priority_preemption_flights: resources.flight_planning.FlightIntentsResource?
invalid_flight_intents: resources.flight_planning.FlightIntentsResource
non_conflicting_flights: resources.flight_planning.FlightIntentsResource
nominal_planning_selector: resources.flight_planning.FlightPlannerCombinationSelectorResource?
Expand Down

0 comments on commit e876850

Please sign in to comment.