diff --git a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py index d88349c00c..77d61f0999 100644 --- a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py +++ b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py @@ -262,6 +262,7 @@ def put_op_intent( base_url: UssBaseURL, oi_id: Optional[str] = None, ovn: Optional[str] = None, + subscription_id: Optional[str] = None, ) -> Tuple[OperationalIntentReference, List[SubscriberToNotify], Query,]: """ Create or update an operational intent. @@ -287,7 +288,10 @@ def put_op_intent( key=key, state=state, uss_base_url=base_url, - new_subscription=ImplicitSubscriptionParameters(uss_base_url=base_url), + subscription_id=subscription_id, + new_subscription=ImplicitSubscriptionParameters(uss_base_url=base_url) + if subscription_id is None + else None, ) query = query_and_describe( self.client, diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update.md b/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_correct.md similarity index 76% rename from monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update.md rename to monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_correct.md index a9dd87f725..916727aa93 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_correct.md @@ -2,9 +2,9 @@ This test step fragment validates that operational intent references can be updated. -## 🛑 Mutate operational intent reference query succeeds check +## [Update query succeeds](./update_query.md) -As per **[astm.f3548.v21.DSS0005,1](../../../../../../../requirements/astm/f3548/v21.md)**, the DSS API must allow callers to mutate an operational intent reference. +Check query succeeds. ## [Response Format](./update_format.md) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_query.md b/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_query.md new file mode 100644 index 0000000000..4bb7416141 --- /dev/null +++ b/monitoring/uss_qualifier/scenarios/astm/utm/dss/fragments/oir/crud/update_query.md @@ -0,0 +1,7 @@ +# Update operational intent reference test step fragment + +This test step fragment validates that a query to update an operational intent reference with valid parameters succeeds. + +## 🛑 Mutate operational intent reference query succeeds check + +As per **[astm.f3548.v21.DSS0005,1](../../../../../../../requirements/astm/f3548/v21.md)**, the DSS API must allow callers to mutate an operational intent reference. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.md b/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.md index 89402ce69a..ffc799cae2 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.md @@ -68,6 +68,34 @@ If the DSS omits any of the implicit subscriptions belonging to an OIR previousl any of the DSSes at which an earlier OIR was created, or the DSS at which the current OIR has been created, are in violation of **[astm.f3548.v21.DSS0210,A2-7-2,4b](../../../../requirements/astm/f3548/v21.md)**. +### Modify an OIR at every DSS in sequence test step + +This test step will modify the previously created operational intent reference and assorted subscription at every DSS, in sequence, each time verifying that the DSS +requires notifications for any previously established subscription that intersects with the modified OIR. + +Note that this step is run once for each involved DSS (that is, once for the primary DSS and once for every secondary DSS) + +#### [Modify OIR](./fragments/oir/crud/update_query.md) + +Check that the OIR modification query succeeds + +#### 🛑 DSS response contains the expected background subscription check + +The response from a DSS to a valid OIR modification request is expected to contain any relevant subscription for the OIR's extents. +This includes the subscription created earlier, as it is designed to intersect with the OIRs being modified. + +If the DSS omits the intersecting subscription, it fails to implement **[astm.f3548.v21.DSS0210,A2-7-2,4c](../../../../requirements/astm/f3548/v21.md)**. + +#### 🛑 DSS returns the implicit subscriptions from intersecting OIRs check + +The response from a DSS to a valid OIR modification request is expected to contain any relevant subscription for the OIR's extents. +This includes any implicit subscription previously created on the DSS as part of a previously created OIR. + +If the DSS omits any of the implicit subscriptions belonging to an OIR previously created over time range A on another DSS (which are designed to all intersect), +any of the DSSes at which an earlier OIR was created, or the DSS at which the current OIR has been modified, +are in violation of **[astm.f3548.v21.DSS0210,A2-7-2,4c](../../../../requirements/astm/f3548/v21.md)**. + + ## Subscription creation returns relevant OIRs test case This test case checks that, when a newly created subscription intersects with an existing OIR and that the subscription is intended for operational intent references, diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.py b/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.py index c5c62260fb..413bc59d55 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/dss/subscription_interactions.py @@ -226,6 +226,55 @@ def _implicit_subs_check( self._current_oirs[oir_id] = oir self.end_test_step() + self.begin_test_step("Modify an OIR at every DSS in sequence") + possible_culprits = [] + for i, dss in enumerate([self._dss] + self._secondary_instances): + oir_id = self._oir_ids[i] + oir = self._planning_area.get_new_operational_intent_ref_params( + key=[current_oir.ovn for current_oir in self._current_oirs.values()], + state=OperationalIntentState.Accepted, + uss_base_url="https://example.interuss.org/oir_base_url_bis", # dummy modification of the OIR + time_start=datetime.utcnow(), + time_end=self._time_send + timedelta(minutes=10), + subscription_id=self._current_oirs[oir_id].subscription_id, + ) + + with self.check( + "Mutate operational intent reference query succeeds", + [dss.participant_id], + ) as check: + try: + oir, subs, q = dss.put_op_intent( + extents=oir.extents, + key=oir.key, + state=oir.state, + base_url=oir.uss_base_url, + oi_id=oir_id, + ovn=self._current_oirs[oir_id].ovn, + subscription_id=oir.subscription_id, + ) + self.record_query(q) + except QueryError as qe: + self.record_queries(qe.queries) + check.record_failed( + summary="Failed to mutate operational intent reference", + details=f"Failed to mutate operational intent reference: {qe}", + query_timestamps=qe.query_timestamps, + ) + + notification_ids = to_sub_ids(subs) + possible_culprits.append(dss.participant_id) + + _expected_subs_check( + dss.participant_id, notification_ids, q.request.timestamp + ) + _implicit_subs_check( + possible_culprits, notification_ids, q.request.timestamp + ) + + self._current_oirs[oir_id] = oir + self.end_test_step() + def _steps_create_subs_at_each_dss(self): """Creates a subscription at each DSS instance""" diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.md b/monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.md index ab502f4121..d0b663b45a 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.md @@ -74,7 +74,7 @@ Verify that the operational intent reference's version fields are as expected. This test step mutates the previously created operational intent reference to verify that the DSS reacts properly: notably, it checks that the operational intent reference version is updated, including for changes that are not directly visible, such as changing the operational intent reference's footprint. -#### [Update OIR](../fragments/oir/crud/update.md) +#### [Update OIR](../fragments/oir/crud/update_correct.md) Confirm that the operational intent reference can be mutated. diff --git a/monitoring/uss_qualifier/suites/astm/utm/dss_probing.md b/monitoring/uss_qualifier/suites/astm/utm/dss_probing.md index 9d1b87c15c..3c34a6a6ad 100644 --- a/monitoring/uss_qualifier/suites/astm/utm/dss_probing.md +++ b/monitoring/uss_qualifier/suites/astm/utm/dss_probing.md @@ -26,7 +26,7 @@