From 2a29ff3b2ad63198bf3e58d646e3535227ad4889 Mon Sep 17 00:00:00 2001 From: Julien Perrochet Date: Wed, 6 Nov 2024 15:16:52 +0100 Subject: [PATCH] [uss_qualifier] dss-interop - DSS0130: implement leftover todo (#841) --- .../netrid/common/dss_interoperability.py | 23 +++++++++++++++---- .../astm/netrid/v19/dss_interoperability.md | 4 +--- .../astm/netrid/v22a/dss_interoperability.md | 4 +--- .../suites/astm/netrid/f3411_19.md | 2 +- .../astm/netrid/f3411_19/dss_probing.md | 2 +- .../suites/astm/netrid/f3411_22a.md | 2 +- .../astm/netrid/f3411_22a/dss_probing.md | 2 +- .../suites/interuss/dss/all_tests.md | 4 ++-- .../suites/uspace/network_identification.md | 2 +- .../suites/uspace/required_services.md | 2 +- 10 files changed, 29 insertions(+), 18 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss_interoperability.py b/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss_interoperability.py index b9f2b629d0..aef642edad 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss_interoperability.py +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss_interoperability.py @@ -1,8 +1,8 @@ +import datetime import ipaddress import socket import uuid from dataclasses import dataclass -import datetime from enum import Enum from typing import List, Dict, Optional from urllib.parse import urlparse @@ -429,6 +429,7 @@ def step5(self): subscription notification requests""" isa_1 = self._context["isa_1"] + sub_1_0 = self._context["sub_1_0"] with self.check( "Can get ISA from primary DSS", [self._dss_primary.participant_id] @@ -439,15 +440,29 @@ def step5(self): with self.check( "Can modify ISA in primary DSS", [self._dss_primary.participant_id] ) as check: - mutated_isa = self._dss_primary.put_isa( + mutated_isa_primary = self._dss_primary.put_isa( check, isa_id=isa_1.uuid, isa_version=isa_1.version, + do_not_notify="https://testdummy.interuss.org", **_default_params(datetime.timedelta(seconds=SHORT_WAIT_SEC)), ) - isa_1.version = mutated_isa.dss_query.isa.version + isa_1.version = mutated_isa_primary.dss_query.isa.version + + subs_to_notify_primary = [] + for subscriber in mutated_isa_primary.subscribers: + for s in subscriber.raw.subscriptions: + subs_to_notify_primary.append(s.subscription_id) - # TODO: Implement "ISA modification triggers subscription notification requests check" + with self.check( + "ISA modification on primary DSS triggers subscription notification requests", + [self._dss_primary.participant_id], + ) as check: + if sub_1_0.uuid not in subs_to_notify_primary: + check.record_failed( + summary=f"Subscription {sub_1_0.uuid} was not notified of ISA modification", + details=f"Subscription {sub_1_0.uuid} was created on the primary DSS and should have been notified of the ISA modification that happened on the primary DSS, but was not.", + ) def step6(self): """Can delete all Subscription in primary DSS""" diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss_interoperability.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss_interoperability.md index 0be76b5bc2..a4fbffda05 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss_interoperability.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss_interoperability.md @@ -160,9 +160,7 @@ Qualitatively proves: ISA[*P*] modified with proper response, all Subscription[i **[astm.f3411.v19.DSS0130,A2-6-1,1b](../../../../requirements/astm/f3411/v19.md)** -#### ISA modification triggers subscription notification requests check - -TODO: Implement +#### ⚠️ ISA modification on primary DSS triggers subscription notification requests check **[astm.f3411.v19.DSS0130,A2-6-1,3c](../../../../requirements/astm/f3411/v19.md)** diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss_interoperability.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss_interoperability.md index caa30a9b9c..342ebc4f03 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss_interoperability.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss_interoperability.md @@ -159,9 +159,7 @@ Qualitatively proves: ISA[*P*] modified with proper response, all Subscription[i **[astm.f3411.v22a.DSS0130,A2-6-1,1b](../../../../requirements/astm/f3411/v22a.md)** -#### ISA modification triggers subscription notification requests check - -TODO: Implement +#### ⚠️ ISA modification on primary DSS triggers subscription notification requests check **[astm.f3411.v22a.DSS0130,A2-6-1,3c](../../../../requirements/astm/f3411/v22a.md)** diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md index b211863f2f..bbe1e5ddbc 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md @@ -173,7 +173,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-19 NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19/dss_probing.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19/dss_probing.md index 4353e6d3d2..1772b7348e 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19/dss_probing.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19/dss_probing.md @@ -177,7 +177,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-19 NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md index d4fab3ad42..da5c264601 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md @@ -178,7 +178,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-22a NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a/dss_probing.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a/dss_probing.md index 1d46cfe2f4..6a31483122 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a/dss_probing.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a/dss_probing.md @@ -182,7 +182,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-22a NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/interuss/dss/all_tests.md b/monitoring/uss_qualifier/suites/interuss/dss/all_tests.md index 3f8915e3d1..7cf6096c14 100644 --- a/monitoring/uss_qualifier/suites/interuss/dss/all_tests.md +++ b/monitoring/uss_qualifier/suites/interuss/dss/all_tests.md @@ -173,7 +173,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-19 NetRID DSS interoperability @@ -369,7 +369,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-22a NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/uspace/network_identification.md b/monitoring/uss_qualifier/suites/uspace/network_identification.md index 264d2265eb..978433bee6 100644 --- a/monitoring/uss_qualifier/suites/uspace/network_identification.md +++ b/monitoring/uss_qualifier/suites/uspace/network_identification.md @@ -174,7 +174,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-22a NetRID DSS interoperability diff --git a/monitoring/uss_qualifier/suites/uspace/required_services.md b/monitoring/uss_qualifier/suites/uspace/required_services.md index 39486aee44..50a717451f 100644 --- a/monitoring/uss_qualifier/suites/uspace/required_services.md +++ b/monitoring/uss_qualifier/suites/uspace/required_services.md @@ -175,7 +175,7 @@ DSS0130,A2-6-1,3c - Implemented + TODO + Implemented ASTM F3411-22a NetRID DSS interoperability