From d8b0c25ce9f27a59e6a91ea41547de553206886b Mon Sep 17 00:00:00 2001 From: Julien Perrochet Date: Tue, 7 May 2024 16:55:51 +0200 Subject: [PATCH] [dss] update dss version to v0.15.0-rc1, add required scope to mock_uss (#681) --- build/dev/docker-compose.yaml | 2 +- monitoring/monitorlib/clients/scd.py | 4 ++-- monitoring/monitorlib/infrastructure.py | 1 + .../uss_qualifier/resources/astm/f3548/v21/dss.py | 10 +++++++++- .../astm/utm/off_nominal_planning/down_uss.py | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build/dev/docker-compose.yaml b/build/dev/docker-compose.yaml index 8ee88e50bd..4a87bbece3 100644 --- a/build/dev/docker-compose.yaml +++ b/build/dev/docker-compose.yaml @@ -43,7 +43,7 @@ services: dss: hostname: dss.uss1.localutm - image: interuss/dss:v0.14.0 + image: interuss/dss:v0.15.0-rc1 volumes: - $PWD/../test-certs:/var/test-certs:ro - dss_component_coordination:/var/dss_component_coordination diff --git a/monitoring/monitorlib/clients/scd.py b/monitoring/monitorlib/clients/scd.py index 563daeaca8..7f88384ba1 100644 --- a/monitoring/monitorlib/clients/scd.py +++ b/monitoring/monitorlib/clients/scd.py @@ -52,7 +52,7 @@ def create_operational_intent_reference( url = "/dss/v1/operational_intent_references/{}".format(id) subject = f"createOperationalIntentReference to {url}" query = fetch.query_and_describe( - utm_client, "PUT", url, json=req, scope=scd.SCOPE_SC + utm_client, "PUT", url, json=req, scopes=[scd.SCOPE_SC, scd.SCOPE_CM_SA] ) if query.status_code != 200 and query.status_code != 201: raise QueryError( @@ -84,7 +84,7 @@ def update_operational_intent_reference( url = "/dss/v1/operational_intent_references/{}/{}".format(id, ovn) subject = f"updateOperationalIntentReference to {url}" query = fetch.query_and_describe( - utm_client, "PUT", url, json=req, scope=scd.SCOPE_SC + utm_client, "PUT", url, json=req, scopes=[scd.SCOPE_SC, scd.SCOPE_CM_SA] ) if query.status_code != 200 and query.status_code != 201: raise QueryError( diff --git a/monitoring/monitorlib/infrastructure.py b/monitoring/monitorlib/infrastructure.py index ae526fd678..97bbff8550 100644 --- a/monitoring/monitorlib/infrastructure.py +++ b/monitoring/monitorlib/infrastructure.py @@ -13,6 +13,7 @@ "dss.write.identification_service_areas", "dss.read.identification_service_areas", "utm.strategic_coordination", + "utm.conformance_monitoring_sa", "utm.constraint_management", "utm.constraint_consumption", ] diff --git a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py index 77d61f0999..57b0962ef3 100644 --- a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py +++ b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py @@ -271,7 +271,15 @@ def put_op_intent( Raises: * QueryError: if request failed, if HTTP status code is different than 200 or 201, or if the parsing of the response failed. """ + scopes = [Scope.StrategicCoordination] self._uses_scope(Scope.StrategicCoordination) + if state in [ + OperationalIntentState.Nonconforming, + OperationalIntentState.Contingent, + ]: + scopes.append(Scope.ConformanceMonitoringForSituationalAwareness) + self._uses_scope(Scope.ConformanceMonitoringForSituationalAwareness) + oi_uuid = str(uuid.uuid4()) if oi_id is None else oi_id create = ovn is None if create: @@ -299,7 +307,7 @@ def put_op_intent( url, query_type, self.participant_id, - scope=Scope.StrategicCoordination, + scopes=scopes, json=req, ) if (create and query.status_code == 201) or ( 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 8ebf44518c..1f64c7d93a 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 @@ -73,6 +73,7 @@ def __init__( { Scope.StrategicCoordination: "search for operational intent references to verify outcomes of planning activities and retrieve operational intent details", Scope.AvailabilityArbitration: "declare virtual USS down in DSS", + Scope.ConformanceMonitoringForSituationalAwareness: "create operational intent references in an off-nominal state", } )