diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/__init__.py b/monitoring/uss_qualifier/scenarios/astm/utm/__init__.py index e87ac2555b..07d2b0f5a9 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/__init__.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/__init__.py @@ -9,3 +9,6 @@ from .aggregate_checks import AggregateChecks from .prep_planners import PrepareFlightPlanners from .off_nominal_planning.down_uss import DownUSS +from .off_nominal_planning.down_uss_equal_priority_not_permitted import ( + DownUSSEqualPriorityNotPermitted, +) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md index 24556a788c..ce6967bb65 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md @@ -1,9 +1,8 @@ # Off-Nominal planning: down USS test scenario ## Description -This test aims to test the strategic coordination requirements that relate to the down USS mechanism: +This test aims to test the strategic coordination requirements that relate to the down USS mechanism in the general case: - **[astm.f3548.v21.SCD0005](../../../../requirements/astm/f3548/v21.md)** -- **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)** It involves a single tested USS. The USS qualifier acts as a virtual USS that may have its availability set to down. @@ -17,24 +16,12 @@ FlightIntentsResource that provides the following flight intents: Flight name Priority State - Must conflict with - Must not conflict with flight_1_planned_vol_A Flight 1 Any Accepted - Flight 2 - Flight 2m - - - flight_2_planned_vol_A - Flight 2 - Higher than Flight 1* - Accepted - Flight 1 - N/A @@ -62,11 +49,12 @@ Delete any leftover operational intents created at DSS by virtual USS. #### Successful operational intents cleanup check If the search for own operational intents or their deletion fail, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + ## Plan flight in conflict with planned flight managed by down USS test case This test case aims at testing requirement **[astm.f3548.v21.SCD0005](../../../../requirements/astm/f3548/v21.md)**. -### Virtual USS plans high-priority flight 2 test step -The USS qualifier, acting as a virtual USS, creates an operational intent at the DSS with a high priority and a non-working base URL. +### Virtual USS creates conflicting operational intent test step +The USS qualifier, acting as a virtual USS, creates an operational intent at the DSS with a non-working base URL. The objective is to make the later request by the tested USS to retrieve operational intent details to fail. #### Operational intent successfully created check @@ -75,15 +63,15 @@ If the creation of the operational intent reference at the DSS fails, this check ### [Declare virtual USS as down at DSS test step](../set_uss_down.md) ### Tested USS attempts to plan low-priority flight 1 test step -The low-priority flight 1 of the tested USS conflicts with high-priority flight 2 of the virtual USS. +The low-priority flight 1 of the tested USS conflicts with the operational intent of the virtual USS. However, since: - the virtual USS is declared as down at the DSS, - it does not respond for operational intent details, and -- the operational intent for flight 2 is in 'Planned' state, -The tested USS should evaluate the operational intent of flight 2 as having the lowest bound priority status, i.e. a priority strictly lower than the lowest priority allowed by the local regulation. +- the conflicting operational intent is in the 'Accepted' state, +The tested USS should evaluate the conflicting operational intent as having the lowest bound priority status, i.e. a priority strictly lower than the lowest priority allowed by the local regulation. As such, the tested USS may either: -- Successfully plan flight 1 over the higher-priority flight 2, or +- Successfully plan flight 1 over the conflicting operational intent, or - Decide to be more conservative and reject the planning of flight 1. #### Successful planning check diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py index 2b766306bc..11361b0608 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py @@ -1,10 +1,13 @@ -from typing import Optional, List +from typing import Dict, Optional import arrow from monitoring.monitorlib.geotemporal import Volume4DCollection from monitoring.uss_qualifier.common_data_definitions import Severity -from uas_standards.astm.f3548.v21.api import OperationalIntentState +from uas_standards.astm.f3548.v21.api import ( + OperationalIntentState, + OperationalIntentReference, +) from uas_standards.interuss.automated_testing.scd.v1.api import ( InjectFlightResponseResult, ) @@ -37,11 +40,8 @@ class DownUSS(TestScenario): - flight_1_id: Optional[str] = None flight_1_planned_vol_A: FlightIntent - flight_2_planned_vol_A: FlightIntent - uss_qualifier_sub: str tested_uss: FlightPlanner @@ -57,7 +57,7 @@ def __init__( self.tested_uss = tested_uss.flight_planner self.dss = dss.dss - _flight_intents = { + _flight_intents: Dict[str, FlightIntent] = { k: FlightIntent.from_flight_info_template(v) for k, v in flight_intents.get_flight_intents().items() } @@ -70,47 +70,31 @@ def __init__( extents ).bounding_volume.to_f3548v21() - try: - (self.flight_1_planned_vol_A, self.flight_2_planned_vol_A,) = ( - _flight_intents["flight_1_planned_vol_A"], - _flight_intents["flight_2_planned_vol_A"], - ) + now = arrow.utcnow().datetime + for intent_name, intent in _flight_intents.items(): + if ( + intent.request.operational_intent.state + == OperationalIntentState.Activated + ): + if not Volume4DCollection.from_interuss_scd_api( + intent.request.operational_intent.volumes + + intent.request.operational_intent.off_nominal_volumes + ).has_active_volume(now): + err_msg = f"at least one volume of activated intent {intent_name} must be active now (now is {now})" + raise ValueError( + f"`{self.me()}` TestScenario requirements for flight_intents not met: {err_msg}" + ) - now = arrow.utcnow().datetime - for intent_name, intent in _flight_intents.items(): - if ( - intent.request.operational_intent.state - == OperationalIntentState.Activated - ): - assert Volume4DCollection.from_interuss_scd_api( - intent.request.operational_intent.volumes - + intent.request.operational_intent.off_nominal_volumes - ).has_active_volume( - now - ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" + self._parse_flight_intents(_flight_intents) + + def _parse_flight_intents(self, flight_intents: Dict[str, FlightIntent]) -> None: + try: + self.flight_1_planned_vol_A = flight_intents["flight_1_planned_vol_A"] assert ( self.flight_1_planned_vol_A.request.operational_intent.state == OperationalIntentState.Accepted ), "flight_1_planned_vol_A must have state Accepted" - assert ( - self.flight_2_planned_vol_A.request.operational_intent.state - == OperationalIntentState.Accepted - ), "flight_2_planned_vol_A must have state Accepted" - - # TODO: check that flight data is the same across the different versions of the flight - - assert ( - self.flight_2_planned_vol_A.request.operational_intent.priority - > self.flight_1_planned_vol_A.request.operational_intent.priority - ), "flight_2 must have higher priority than flight_1" - assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes - ).intersects_vol4s( - Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_vol_A.request.operational_intent.volumes - ) - ), "flight_1_planned_vol_A and flight_2_planned_vol_A must intersect" except KeyError as e: raise ValueError( @@ -168,30 +152,68 @@ def _setup(self): self._clear_op_intents() self.end_test_step() - def _plan_flight_conflict_planned(self): - - # Virtual USS plans high-priority flight 2 test step - self.begin_test_step("Virtual USS plans high-priority flight 2") + def _put_conflicting_op_intent_step( + self, + conflicting_intent: FlightIntent, + target_state: OperationalIntentState, + old_op_intent: Optional[OperationalIntentReference] = None, + ) -> OperationalIntentReference: + if old_op_intent is not None: + key = [old_op_intent.ovn] + oi_id = old_op_intent.id + oi_ovn = old_op_intent.ovn + else: + key = None + oi_id = None + oi_ovn = None + + if target_state == OperationalIntentState.Accepted: + msg_action = "creates" + msg_action_past = "created" + elif target_state == OperationalIntentState.Activated: + msg_action = "activates" + msg_action_past = "activated" + elif target_state == OperationalIntentState.Nonconforming: + msg_action = "transitions to Nonconforming" + msg_action_past = "transitioned to Nonconforming" + elif target_state == OperationalIntentState.Contingent: + msg_action = "transitions to Contingent" + msg_action_past = "transitioned to Contingent" + else: + raise ValueError(f"Invalid state {target_state}") + + self.begin_test_step(f"Virtual USS {msg_action} conflicting operational intent") oi_ref, _, query = self.dss.put_op_intent( Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_vol_A.request.operational_intent.volumes + conflicting_intent.request.operational_intent.volumes ).to_f3548v21(), - [], # we assume there is no other operational intent in that area - OperationalIntentState.Accepted, + key, + target_state, "https://fake.uss/down", + oi_id, + oi_ovn, ) self.record_query(query) with self.check( - "Operational intent successfully created", [self.dss.participant_id] + f"Operational intent successfully {msg_action_past}", + [self.dss.participant_id], ) as check: if oi_ref is None: check.record_failed( - "Operational intent not successfully created", + f"Operational intent not successfully {msg_action_past}", Severity.High, f"DSS responded code {query.status_code}; error message: {query.error_message}", query_timestamps=[query.request.timestamp], ) self.end_test_step() + return oi_ref + + def _plan_flight_conflict_planned(self): + + # Virtual USS creates conflicting operational intent test step + self._put_conflicting_op_intent_step( + self.flight_1_planned_vol_A, OperationalIntentState.Accepted + ) # Declare virtual USS as down at DSS test step set_uss_down( diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md new file mode 100644 index 0000000000..66ffb473d0 --- /dev/null +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md @@ -0,0 +1,179 @@ +# Off-Nominal planning: down USS with equal priority conflicts not permitted test scenario + +## Description +This test aims to test the strategic coordination requirements that relate to the down USS mechanism in the case where +equal priority conflicts are not permitted: +- **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)** + +It involves a single tested USS. The USS qualifier acts as a virtual USS that may have its availability set to down. + +## Resources +### flight_intents +FlightIntentsResource that provides the following flight intents: + + + + + + + + + + + + + + +
Flight intent IDFlight namePriorityState
flight_2_planned_vol_AFlight 2High priorityAccepted
+ + +### tested_uss +FlightPlannerResource that is under test and will manage flight 2. + +### dss +DSSInstanceResource that provides access to a DSS instance where: +- flight creation/sharing can be verified, +- the USS qualifier acting as a virtual USS can create operational intents, and +- the USS qualifier can act as an availability arbitrator. + +## Setup test case +### Resolve USS ID of virtual USS test step +Make a dummy request to the DSS in order to resolve the USS ID of the virtual USS. + +#### Successful dummy query check + +### [Restore virtual USS availability test step](../set_uss_available.md) + +### Clear operational intents created by virtual USS test step +Delete any leftover operational intents created at DSS by virtual USS. + +#### Successful operational intents cleanup check +If the search for own operational intents or their deletion fail, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + +## Plan flight in conflict with activated flight managed by down USS test case +This test case aims at testing requirement **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. + +### Virtual USS creates conflicting operational intent test step +The USS qualifier, acting as a virtual USS, creates an operational intent at the DSS with a non-working base URL. +The objective is to make the later request by the tested USS to retrieve operational intent details to fail. + +#### Operational intent successfully created check +If the creation of the operational intent reference at the DSS fails, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + +### Virtual USS activates conflicting operational intent test step +The USS qualifier, acting as a virtual USS, activates the operational intent previously created at the DSS with a non-working base URL. +The objective is to make the later request by the tested USS to retrieve operational intent details to fail. + +#### Operational intent successfully activated check +If the activation of the operational intent reference at the DSS fails, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + +### [Declare virtual USS as down at DSS test step](../set_uss_down.md) + +### Tested USS attempts to plan high-priority flight 2 test step +The high-priority flight 2 of the tested USS conflicts with the operational intent of the virtual USS. +However, since: +- the virtual USS is declared as down at the DSS, +- it does not respond for operational intent details, and +- the conflicting operational intent is in the 'Activated' state, +- the local regulation does not allow for equal priority conflicts at the highest priority level, +The tested USS should evaluate the conflicting operational intent as having the highest priority status allowed by the local regulation. +As such, the tested USS should reject the planning of flight 2. + +#### Incorrectly planned check +All flight intent data provided is correct and the USS should have rejected properly the planning per **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. +If the USS indicates that the injection attempt failed, this check will fail. +If the USS successfully plans the flight or otherwise fails to indicate a conflict, this check will fail. + +#### Failure check +All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS +to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per +**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. + +### [Validate high-priority flight 2 not shared test step](../validate_not_shared_operational_intent.md) + +### [Restore virtual USS availability at DSS test step](../set_uss_available.md) + + +## Plan flight in conflict with nonconforming flight managed by down USS test case +This test case aims at testing requirement **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. + +### Virtual USS transitions to Nonconforming conflicting operational intent test step +The USS qualifier, acting as a virtual USS, transitions to Nonconforming the operational intent previously created at the DSS with a non-working base URL. +The objective is to make the later request by the tested USS to retrieve operational intent details to fail. + +#### Operational intent successfully transitioned to Nonconforming check +If the transition of the operational intent reference at the DSS fails, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + +### [Declare virtual USS as down at DSS test step](../set_uss_down.md) + +### Tested USS attempts to plan high-priority flight 2 test step +The high-priority flight 2 of the tested USS conflicts with the operational intent of the virtual USS. +However, since: +- the virtual USS is declared as down at the DSS, +- it does not respond for operational intent details, and +- the conflicting operational intent is in the 'Nonconforming' state, +- the local regulation does not allow for equal priority conflicts at the highest priority level, +The tested USS should evaluate the conflicting operational intent as having the highest priority status allowed by the local regulation. +As such, the tested USS should reject the planning of flight 2. + +#### Incorrectly planned check +All flight intent data provided is correct and the USS should have rejected properly the planning per **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. +If the USS indicates that the injection attempt failed, this check will fail. +If the USS successfully plans the flight or otherwise fails to indicate a conflict, this check will fail. + +#### Failure check +All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS +to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per +**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. + +### [Validate high-priority flight 2 not shared test step](../validate_not_shared_operational_intent.md) + +### [Restore virtual USS availability at DSS test step](../set_uss_available.md) + + +## Plan flight in conflict with contingent flight managed by down USS test case +This test case aims at testing requirement **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. + +### Virtual USS transitions to Contingent conflicting operational intent test step +The USS qualifier, acting as a virtual USS, transitions to Contingent the operational intent previously created at the DSS with a non-working base URL. +The objective is to make the later request by the tested USS to retrieve operational intent details to fail. + +#### Operational intent successfully transitioned to Contingent check +If the transition of the operational intent reference at the DSS fails, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. + +### [Declare virtual USS as down at DSS test step](../set_uss_down.md) + +### Tested USS attempts to plan high-priority flight 2 test step +The high-priority flight 2 of the tested USS conflicts with the operational intent of the virtual USS. +However, since: +- the virtual USS is declared as down at the DSS, +- it does not respond for operational intent details, and +- the conflicting operational intent is in the 'Contingent' state, +- the local regulation does not allow for equal priority conflicts at the highest priority level, +The tested USS should evaluate the conflicting operational intent as having the highest priority status allowed by the local regulation. +As such, the tested USS should reject the planning of flight 2. + +#### Incorrectly planned check +All flight intent data provided is correct and the USS should have rejected properly the planning per **[astm.f3548.v21.SCD0010](../../../../requirements/astm/f3548/v21.md)**. +If the USS indicates that the injection attempt failed, this check will fail. +If the USS successfully plans the flight or otherwise fails to indicate a conflict, this check will fail. + +#### Failure check +All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS +to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per +**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. + +### [Validate high-priority flight 2 not shared test step](../validate_not_shared_operational_intent.md) + + +## Cleanup +### Availability of virtual USS restored check +**[astm.f3548.v21.DSS0100](../../../../requirements/astm/f3548/v21.md)** + +### Successful flight deletion check +Delete flights injected at USS through the flight planning interface. +**[interuss.automated_testing.flight_planning.DeleteFlightSuccess](../../../../requirements/interuss/automated_testing/flight_planning.md)** + +### Successful operational intents cleanup check +Delete operational intents created at DSS by virtual USS. +If the search for own operational intents or their deletion fail, this check fails per **[astm.f3548.v21.DSS0005](../../../../requirements/astm/f3548/v21.md)**. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.py b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.py new file mode 100644 index 0000000000..83d4789802 --- /dev/null +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.py @@ -0,0 +1,213 @@ +from typing import Dict + +from uas_standards.astm.f3548.v21.api import ( + OperationalIntentState, + OperationalIntentReference, +) +from uas_standards.interuss.automated_testing.scd.v1.api import ( + InjectFlightResponseResult, +) + +from monitoring.uss_qualifier.resources.flight_planning.flight_intent import ( + FlightIntent, +) + +from monitoring.uss_qualifier.scenarios.astm.utm import DownUSS +from monitoring.uss_qualifier.scenarios.astm.utm.test_steps import ( + OpIntentValidator, + set_uss_down, + set_uss_available, +) +from monitoring.uss_qualifier.scenarios.flight_planning.test_steps import ( + submit_flight_intent, +) +from monitoring.uss_qualifier.suites.suite import ExecutionContext + + +class DownUSSEqualPriorityNotPermitted(DownUSS): + flight_2_planned_vol_A: FlightIntent + + def _parse_flight_intents(self, flight_intents: Dict[str, FlightIntent]) -> None: + try: + self.flight_2_planned_vol_A = flight_intents["flight_2_planned_vol_A"] + + assert ( + self.flight_2_planned_vol_A.request.operational_intent.state + == OperationalIntentState.Accepted + ), "flight_2_planned_vol_A must have state Accepted" + + except KeyError as e: + raise ValueError( + f"`{self.me()}` TestScenario requirements for flight_intents not met: missing flight intent {e}" + ) + except AssertionError as e: + raise ValueError( + f"`{self.me()}` TestScenario requirements for flight_intents not met: {e}" + ) + + def run(self, context: ExecutionContext): + self.begin_test_scenario(context) + + self.record_note( + "Tested USS", + f"{self.tested_uss.config.participant_id}", + ) + + self.begin_test_case("Setup") + self._setup() + self.end_test_case() + + self.begin_test_case( + "Plan flight in conflict with activated flight managed by down USS" + ) + oi_ref = self._plan_flight_conflict_activated() + self.end_test_case() + + self.begin_test_case( + "Plan flight in conflict with nonconforming flight managed by down USS" + ) + oi_ref = self._plan_flight_conflict_nonconforming(oi_ref) + self.end_test_case() + + self.begin_test_case( + "Plan flight in conflict with contingent flight managed by down USS" + ) + self._plan_flight_conflict_contingent(oi_ref) + self.end_test_case() + + self.end_test_scenario() + + def _plan_flight_conflict_activated(self) -> OperationalIntentReference: + + # Virtual USS creates conflicting operational intent test step + oi_ref = self._put_conflicting_op_intent_step( + self.flight_2_planned_vol_A, OperationalIntentState.Accepted + ) + + # Virtual USS activates conflicting operational intent test step + oi_ref = self._put_conflicting_op_intent_step( + self.flight_2_planned_vol_A, OperationalIntentState.Activated, oi_ref + ) + + # Declare virtual USS as down at DSS test step + set_uss_down( + self, "Declare virtual USS as down at DSS", self.dss, self.uss_qualifier_sub + ) + + # Tested USS attempts to plan high-priority flight 2 test step + with OpIntentValidator( + self, + self.tested_uss, + self.dss, + "Validate high-priority flight 2 not shared", + self._intents_extent, + ) as validator: + submit_flight_intent( + self, + "Tested USS attempts to plan high-priority flight 2", + "Incorrectly planned", + { + InjectFlightResponseResult.Rejected, + InjectFlightResponseResult.ConflictWithFlight, + }, + { + InjectFlightResponseResult.Failed: "Failure", + }, + self.tested_uss, + self.flight_2_planned_vol_A.request, + ) + validator.expect_not_shared() + + # Restore virtual USS availability at DSS test step + set_uss_available( + self, + "Restore virtual USS availability at DSS", + self.dss, + self.uss_qualifier_sub, + ) + + return oi_ref + + def _plan_flight_conflict_nonconforming( + self, oi_ref: OperationalIntentReference + ) -> OperationalIntentReference: + + # Virtual USS transitions to Nonconforming conflicting operational intent test step + oi_ref = self._put_conflicting_op_intent_step( + self.flight_2_planned_vol_A, OperationalIntentState.Nonconforming, oi_ref + ) + + # Declare virtual USS as down at DSS test step + set_uss_down( + self, "Declare virtual USS as down at DSS", self.dss, self.uss_qualifier_sub + ) + + # Tested USS attempts to plan high-priority flight 2 test step + with OpIntentValidator( + self, + self.tested_uss, + self.dss, + "Validate high-priority flight 2 not shared", + self._intents_extent, + ) as validator: + submit_flight_intent( + self, + "Tested USS attempts to plan high-priority flight 2", + "Incorrectly planned", + { + InjectFlightResponseResult.Rejected, + InjectFlightResponseResult.ConflictWithFlight, + }, + { + InjectFlightResponseResult.Failed: "Failure", + }, + self.tested_uss, + self.flight_2_planned_vol_A.request, + ) + validator.expect_not_shared() + + # Restore virtual USS availability at DSS test step + set_uss_available( + self, + "Restore virtual USS availability at DSS", + self.dss, + self.uss_qualifier_sub, + ) + + return oi_ref + + def _plan_flight_conflict_contingent(self, oi_ref: OperationalIntentReference): + + # Virtual USS transitions to Contingent conflicting operational intent test step + self._put_conflicting_op_intent_step( + self.flight_2_planned_vol_A, OperationalIntentState.Contingent, oi_ref + ) + + # Declare virtual USS as down at DSS test step + set_uss_down( + self, "Declare virtual USS as down at DSS", self.dss, self.uss_qualifier_sub + ) + + # Tested USS attempts to plan high-priority flight 2 test step + with OpIntentValidator( + self, + self.tested_uss, + self.dss, + "Validate high-priority flight 2 not shared", + self._intents_extent, + ) as validator: + submit_flight_intent( + self, + "Tested USS attempts to plan high-priority flight 2", + "Incorrectly planned", + { + InjectFlightResponseResult.Rejected, + InjectFlightResponseResult.ConflictWithFlight, + }, + { + InjectFlightResponseResult.Failed: "Failure", + }, + self.tested_uss, + self.flight_2_planned_vol_A.request, + ) + validator.expect_not_shared() diff --git a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.md b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.md index 4c49a431c3..c386c384ee 100644 --- a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.md +++ b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.md @@ -17,7 +17,9 @@ 1. Scenario: [Data Validation of GET operational intents by USS](../../../scenarios/astm/utm/data_exchange_validation/get_op_data_validation.md) ([`scenarios.astm.utm.data_exchange_validation.GetOpResponseDataValidationByUSS`](../../../scenarios/astm/utm/data_exchange_validation/get_op_data_validation.py)) 7. Action generator: [`action_generators.flight_planning.FlightPlannerCombinations`](../../../action_generators/flight_planning/planner_combinations.py) 1. Scenario: [Off-Nominal planning: down USS](../../../scenarios/astm/utm/off_nominal_planning/down_uss.md) ([`scenarios.astm.utm.DownUSS`](../../../scenarios/astm/utm/off_nominal_planning/down_uss.py)) -8. Scenario: [ASTM F3548 UTM aggregate checks](../../../scenarios/astm/utm/aggregate_checks.md) ([`scenarios.astm.utm.AggregateChecks`](../../../scenarios/astm/utm/aggregate_checks.py)) +8. Action generator: [`action_generators.flight_planning.FlightPlannerCombinations`](../../../action_generators/flight_planning/planner_combinations.py) + 1. Scenario: [Off-Nominal planning: down USS with equal priority conflicts not permitted](../../../scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.md) ([`scenarios.astm.utm.DownUSSEqualPriorityNotPermitted`](../../../scenarios/astm/utm/off_nominal_planning/down_uss_equal_priority_not_permitted.py)) +9. Scenario: [ASTM F3548 UTM aggregate checks](../../../scenarios/astm/utm/aggregate_checks.md) ([`scenarios.astm.utm.AggregateChecks`](../../../scenarios/astm/utm/aggregate_checks.py)) ## [Checked requirements](../../README.md#checked-requirements) @@ -29,15 +31,15 @@ Checked in - astm
.f3548
.v21
+ astm
.f3548
.v21
DSS0005 Implemented - ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents DSS0100 Implemented - Off-Nominal planning: down USS + Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted DSS0300 @@ -84,6 +86,11 @@ Implemented Off-Nominal planning: down USS + + SCD0010 + Implemented + Off-Nominal planning: down USS with equal priority conflicts not permitted + SCD0015 Implemented @@ -153,12 +160,12 @@ DeleteFlightSuccess Implemented - Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents ExpectedBehavior Implemented - Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents FlightCoveredByOperationalIntent diff --git a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml index 99e1f60fe4..9f683bdcbe 100644 --- a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml +++ b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml @@ -145,6 +145,28 @@ actions: roles: - uss1 on_failure: Continue +- action_generator: + generator_type: action_generators.flight_planning.FlightPlannerCombinations + resources: + flight_planners: flight_planners + nominal_planning_selector: nominal_planning_selector? + conflicting_flights: conflicting_flights + dss: dss + specification: + action_to_repeat: + test_scenario: + # TODO: ability for this scenario to be skipped + scenario_type: scenarios.astm.utm.DownUSSEqualPriorityNotPermitted + resources: + flight_intents: conflicting_flights + tested_uss: uss1 + dss: dss + on_failure: Continue + combination_selector_source: nominal_planning_selector + flight_planners_source: flight_planners + roles: + - uss1 + on_failure: Continue - test_scenario: scenario_type: scenarios.astm.utm.AggregateChecks resources: diff --git a/monitoring/uss_qualifier/suites/faa/uft/message_signing.md b/monitoring/uss_qualifier/suites/faa/uft/message_signing.md index 475cae5788..d9d4233d56 100644 --- a/monitoring/uss_qualifier/suites/faa/uft/message_signing.md +++ b/monitoring/uss_qualifier/suites/faa/uft/message_signing.md @@ -18,15 +18,15 @@ Checked in - astm
.f3548
.v21
+ astm
.f3548
.v21
DSS0005 Implemented - ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents DSS0100 Implemented - Off-Nominal planning: down USS + Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted DSS0300 @@ -73,6 +73,11 @@ Implemented Off-Nominal planning: down USS + + SCD0010 + Implemented + Off-Nominal planning: down USS with equal priority conflicts not permitted + SCD0015 Implemented @@ -142,12 +147,12 @@ DeleteFlightSuccess Implemented - Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents ExpectedBehavior Implemented - Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents FlightCoveredByOperationalIntent diff --git a/monitoring/uss_qualifier/suites/uspace/flight_auth.md b/monitoring/uss_qualifier/suites/uspace/flight_auth.md index 1a677d1cd7..5395733f8b 100644 --- a/monitoring/uss_qualifier/suites/uspace/flight_auth.md +++ b/monitoring/uss_qualifier/suites/uspace/flight_auth.md @@ -19,15 +19,15 @@ Checked in - astm
.f3548
.v21
+ astm
.f3548
.v21
DSS0005 Implemented - ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents DSS0100 Implemented - Off-Nominal planning: down USS + Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted DSS0300 @@ -74,6 +74,11 @@ Implemented Off-Nominal planning: down USS + + SCD0010 + Implemented + Off-Nominal planning: down USS with equal priority conflicts not permitted + SCD0015 Implemented @@ -143,12 +148,12 @@ DeleteFlightSuccess Implemented - Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents ExpectedBehavior Implemented - Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents FlightCoveredByOperationalIntent diff --git a/monitoring/uss_qualifier/suites/uspace/required_services.md b/monitoring/uss_qualifier/suites/uspace/required_services.md index d1cfdf0887..265b6f557f 100644 --- a/monitoring/uss_qualifier/suites/uspace/required_services.md +++ b/monitoring/uss_qualifier/suites/uspace/required_services.md @@ -449,15 +449,15 @@ ASTM NetRID DSS: ISA Expiry
ASTM NetRID DSS: ISA Subscription Interactions
ASTM NetRID DSS: Simple ISA
ASTM NetRID DSS: Submitted ISA Validations
ASTM NetRID DSS: Token Validation - astm
.f3548
.v21
+ astm
.f3548
.v21
DSS0005 Implemented - ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + ASTM F3548 flight planners preparation
Data Validation of GET operational intents by USS
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents DSS0100 Implemented - Off-Nominal planning: down USS + Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted DSS0300 @@ -504,6 +504,11 @@ Implemented Off-Nominal planning: down USS + + SCD0010 + Implemented + Off-Nominal planning: down USS with equal priority conflicts not permitted + SCD0015 Implemented @@ -573,12 +578,12 @@ DeleteFlightSuccess Implemented - Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents ExpectedBehavior Implemented - Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Validation of operational intents + Data Validation of GET operational intents by USS
Flight authorisation validation
Nominal planning: conflict with higher priority
Nominal planning: not permitted conflict with equal priority
Off-Nominal planning: down USS
Off-Nominal planning: down USS with equal priority conflicts not permitted
Validation of operational intents FlightCoveredByOperationalIntent