From ebc73debaf522f6e067deb1594b3e4e661f15f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Misbach?= Date: Fri, 20 Oct 2023 10:25:25 +0200 Subject: [PATCH] rename server_id -> participant_id --- monitoring/monitorlib/fetch/__init__.py | 16 ++--- monitoring/monitorlib/fetch/rid.py | 68 +++++++++++-------- monitoring/monitorlib/mutate/rid.py | 30 ++++---- monitoring/monitorlib/mutate/scd.py | 13 ++-- .../uss_qualifier/reports/sequence_view.py | 6 +- .../templates/sequence_view/scenario.html | 2 +- .../resources/astm/f3548/v21/dss.py | 4 +- .../resources/interuss/mock_uss/client.py | 6 +- .../resources/netrid/observers.py | 6 +- .../resources/netrid/service_providers.py | 4 +- .../astm/netrid/common/aggregate_checks.py | 8 +-- .../astm/netrid/common/dss/isa_simple.py | 4 +- .../scenarios/astm/netrid/dss_wrapper.py | 34 +++++----- .../monitoring/monitorlib/fetch/Query.json | 14 ++-- 14 files changed, 116 insertions(+), 99 deletions(-) diff --git a/monitoring/monitorlib/fetch/__init__.py b/monitoring/monitorlib/fetch/__init__.py index b99816b69a..40fc6458eb 100644 --- a/monitoring/monitorlib/fetch/__init__.py +++ b/monitoring/monitorlib/fetch/__init__.py @@ -232,7 +232,7 @@ class Query(ImplicitDict): request: RequestDescription response: ResponseDescription - server_id: Optional[str] + participant_id: Optional[str] """If specified, identifier of the USS/participant hosting the server involved in this query.""" query_type: Optional[QueryType] @@ -273,7 +273,7 @@ def describe_query( resp: requests.Response, initiated_at: datetime.datetime, query_type: Optional[QueryType] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> Query: query = Query( request=describe_request(resp.request, initiated_at), @@ -281,8 +281,8 @@ def describe_query( ) if query_type is not None: query.query_type = query_type - if server_id is not None: - query.server_id = server_id + if participant_id is not None: + query.participant_id = participant_id return query @@ -291,7 +291,7 @@ def query_and_describe( verb: str, url: str, query_type: Optional[QueryType] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, **kwargs, ) -> Query: """Attempt to perform a query, and then describe the results of that attempt. @@ -304,7 +304,7 @@ def query_and_describe( verb: HTTP verb to perform at the specified URL. url: URL to query. query_type: If specified, the known type of query that this is. - server_id: If specified, the participant identifier of the server being queried. + participant_id: If specified, the participant identifier of the server being queried. **kwargs: Any keyword arguments that should be applied to the .request method when invoking it. Returns: @@ -340,7 +340,7 @@ def query_and_describe( client.request(verb, url, **req_kwargs), t0, query_type=query_type, - server_id=server_id, + participant_id=participant_id, ) except (requests.Timeout, urllib3.exceptions.ReadTimeoutError) as e: failure_message = f"query_and_describe attempt {attempt + 1} from PID {os.getpid()} to {verb} {url} failed with timeout {type(e).__name__}: {str(e)}" @@ -370,7 +370,7 @@ def query_and_describe( elapsed_s=(t1 - t0).total_seconds(), reported=StringBasedDateTime(t1), ), - server_id=server_id, + participant_id=participant_id, ) if query_type is not None: result.query_type = query_type diff --git a/monitoring/monitorlib/fetch/rid.py b/monitoring/monitorlib/fetch/rid.py index 8baeca8814..3ba0224fb2 100644 --- a/monitoring/monitorlib/fetch/rid.py +++ b/monitoring/monitorlib/fetch/rid.py @@ -124,7 +124,7 @@ def query_flights( session: UTMClientSession, area: s2sphere.LatLngRect, include_recent_positions: bool = True, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedUSSFlights: return uss_flights( self.flights_url, @@ -132,7 +132,7 @@ def query_flights( include_recent_positions, self.rid_version, session, - server_id=server_id, + participant_id=participant_id, ) @@ -640,13 +640,25 @@ def success(self) -> bool: def errors(self) -> List[str]: raise NotImplementedError("RIDQuery.errors must be overriden") - def set_server_id(self, server_id: str): + @property + def participant_id(self) -> Optional[str]: + if self.rid_version == RIDVersion.f3411_19: + return self.v19_query.participant_id + elif self.rid_version == RIDVersion.f3411_22a: + return self.v22a_query.participant_id + else: + raise NotImplementedError( + f"Cannot retrieve participant_id using RID version {self.rid_version}" + ) + + @participant_id.setter + def participant_id(self, participant_id: str) -> None: if self.v19_query is not None: - self.v19_query.server_id = server_id + self.v19_query.participant_id = participant_id elif self.v22a_query is not None: - self.v22a_query.server_id = server_id + self.v22a_query.participant_id = participant_id else: - raise NotImplementedError(f"Cannot set server_id") + raise NotImplementedError(f"Cannot set participant_id") class FetchedISA(RIDQuery): @@ -722,7 +734,7 @@ def isa( rid_version: RIDVersion, session: UTMClientSession, dss_base_url: str = "", - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedISA: if rid_version == RIDVersion.f3411_19: op = v19.api.OPERATIONS[v19.api.OperationID.GetIdentificationServiceArea] @@ -733,7 +745,7 @@ def isa( op.verb, url, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ) ) elif rid_version == RIDVersion.f3411_22a: @@ -745,7 +757,7 @@ def isa( op.verb, url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) ) else: @@ -857,7 +869,7 @@ def isas( rid_version: RIDVersion, session: UTMClientSession, dss_base_url: str = "", - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedISAs: url_time_params = "" if start_time is not None: @@ -875,7 +887,7 @@ def isas( op.verb, url, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ) ) elif rid_version == RIDVersion.f3411_22a: @@ -888,7 +900,7 @@ def isas( op.verb, url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) ) else: @@ -965,7 +977,7 @@ def uss_flights( include_recent_positions: bool, rid_version: RIDVersion, session: UTMClientSession, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedUSSFlights: if rid_version == RIDVersion.f3411_19: query = fetch.query_and_describe( @@ -984,7 +996,7 @@ def uss_flights( else "false", }, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ) query.query_type = QueryType.F3411v19Flights return FetchedUSSFlights(v19_query=query) @@ -1005,7 +1017,7 @@ def uss_flights( flights_url, params=params, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) query.query_type = QueryType.F3411v22aFlights return FetchedUSSFlights(v22a_query=query) @@ -1092,11 +1104,11 @@ def flight_details( enhanced_details: bool, rid_version: RIDVersion, session: UTMClientSession, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedUSSFlightDetails: url = f"{flights_url}/{flight_id}/details" if rid_version == RIDVersion.f3411_19: - kwargs = {"server_id": server_id} + kwargs = {"participant_id": participant_id} if enhanced_details: kwargs["params"] = {"enhanced": "true"} kwargs["scope"] = ( @@ -1112,7 +1124,7 @@ def flight_details( "GET", url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) return FetchedUSSFlightDetails(v22a_query=query) else: @@ -1164,7 +1176,7 @@ def all_flights( session: UTMClientSession, dss_base_url: str = "", enhanced_details: bool = False, - dss_server_id: Optional[str] = None, + dss_participant_id: Optional[str] = None, ) -> FetchedFlights: t = datetime.datetime.utcnow() isa_list = isas( @@ -1174,7 +1186,7 @@ def all_flights( rid_version, session, dss_base_url, - server_id=dss_server_id, + participant_id=dss_participant_id, ) uss_flight_queries: Dict[str, FetchedUSSFlights] = {} @@ -1188,7 +1200,7 @@ def all_flights( session, # Note that we have no clue at this point which participant the flights_url is for, # this can only be determined later by comparing injected and observed flights. - server_id=None, + participant_id=None, ) uss_flight_queries[flights_url] = flights_for_url @@ -1200,7 +1212,7 @@ def all_flights( enhanced_details, rid_version, session, - server_id=None, + participant_id=None, ) uss_flight_details_queries[flight.id] = details @@ -1278,7 +1290,7 @@ def subscription( rid_version: RIDVersion, session: UTMClientSession, dss_base_url: str = "", - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedSubscription: if rid_version == RIDVersion.f3411_19: op = v19.api.OPERATIONS[v19.api.OperationID.GetSubscription] @@ -1289,7 +1301,7 @@ def subscription( op.verb, url, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ) ) elif rid_version == RIDVersion.f3411_22a: @@ -1301,7 +1313,7 @@ def subscription( op.verb, url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) ) else: @@ -1385,7 +1397,7 @@ def subscriptions( rid_version: RIDVersion, session: UTMClientSession, dss_base_url: str = "", - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> FetchedSubscriptions: if rid_version == RIDVersion.f3411_19: op = v19.api.OPERATIONS[v19.api.OperationID.SearchSubscriptions] @@ -1396,7 +1408,7 @@ def subscriptions( op.verb, url, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ) ) elif rid_version == RIDVersion.f3411_22a: @@ -1408,7 +1420,7 @@ def subscriptions( op.verb, url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ) ) else: diff --git a/monitoring/monitorlib/mutate/rid.py b/monitoring/monitorlib/mutate/rid.py index dd42e2cfc4..1661fd41ee 100644 --- a/monitoring/monitorlib/mutate/rid.py +++ b/monitoring/monitorlib/mutate/rid.py @@ -104,7 +104,7 @@ def upsert_subscription( rid_version: RIDVersion, utm_client: infrastructure.UTMClientSession, subscription_version: Optional[str] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> ChangedSubscription: mutation = "create" if subscription_version is None else "update" if rid_version == RIDVersion.f3411_19: @@ -137,7 +137,7 @@ def upsert_subscription( url, json=body, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ), ) elif rid_version == RIDVersion.f3411_22a: @@ -165,7 +165,7 @@ def upsert_subscription( url, json=body, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ), ) else: @@ -179,7 +179,7 @@ def delete_subscription( subscription_version: str, rid_version: RIDVersion, utm_client: infrastructure.UTMClientSession, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> ChangedSubscription: if rid_version == RIDVersion.f3411_19: op = v19.api.OPERATIONS[v19.api.OperationID.DeleteSubscription] @@ -191,7 +191,7 @@ def delete_subscription( op.verb, url, scope=v19.constants.Scope.Read, - server_id=server_id, + participant_id=participant_id, ), ) elif rid_version == RIDVersion.f3411_22a: @@ -204,7 +204,7 @@ def delete_subscription( op.verb, url, scope=v22a.constants.Scope.DisplayProvider, - server_id=server_id, + participant_id=participant_id, ), ) else: @@ -259,7 +259,7 @@ def notify( isa_id: str, utm_session: infrastructure.UTMClientSession, isa: Optional[ISA] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> ISAChangeNotification: # Note that optional `extents` are not specified if self.rid_version == RIDVersion.f3411_19: @@ -276,7 +276,7 @@ def notify( url, json=body, scope=v19.constants.Scope.Write, - server_id=server_id, + participant_id=participant_id, ) ) elif self.rid_version == RIDVersion.f3411_22a: @@ -294,7 +294,7 @@ def notify( url, json=body, scope=v22a.constants.Scope.ServiceProvider, - server_id=server_id, + participant_id=participant_id, ) ) else: @@ -450,7 +450,7 @@ def put_isa( rid_version: RIDVersion, utm_client: infrastructure.UTMClientSession, isa_version: Optional[str] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> ISAChange: mutation = "create" if isa_version is None else "update" if rid_version == RIDVersion.f3411_19: @@ -479,7 +479,7 @@ def put_isa( url, json=body, scope=v19.constants.Scope.Write, - server_id=server_id, + participant_id=participant_id, ), ) elif rid_version == RIDVersion.f3411_22a: @@ -511,7 +511,7 @@ def put_isa( url, json=body, scope=v22a.constants.Scope.ServiceProvider, - server_id=server_id, + participant_id=participant_id, ), ) else: @@ -534,7 +534,7 @@ def delete_isa( isa_version: str, rid_version: RIDVersion, utm_client: infrastructure.UTMClientSession, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> ISAChange: if rid_version == RIDVersion.f3411_19: op = v19.api.OPERATIONS[v19.api.OperationID.DeleteIdentificationServiceArea] @@ -546,7 +546,7 @@ def delete_isa( op.verb, url, scope=v19.constants.Scope.Write, - server_id=server_id, + participant_id=participant_id, ), ) elif rid_version == RIDVersion.f3411_22a: @@ -559,7 +559,7 @@ def delete_isa( op.verb, url, scope=v22a.constants.Scope.ServiceProvider, - server_id=server_id, + participant_id=participant_id, ), ) else: diff --git a/monitoring/monitorlib/mutate/scd.py b/monitoring/monitorlib/mutate/scd.py index 179e2b29e0..cc22914331 100644 --- a/monitoring/monitorlib/mutate/scd.py +++ b/monitoring/monitorlib/mutate/scd.py @@ -57,7 +57,7 @@ def put_subscription( min_alt_m: float = 0, max_alt_m: float = 3048, version: Optional[str] = None, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> MutatedSubscription: body = { "extents": Volume4D.from_values( @@ -76,7 +76,12 @@ def put_subscription( url += f"/{version}" result = MutatedSubscription( fetch.query_and_describe( - utm_client, "PUT", url, json=body, scope=scd.SCOPE_SC, server_id=server_id + utm_client, + "PUT", + url, + json=body, + scope=scd.SCOPE_SC, + participant_id=participant_id, ) ) result.mutation = "update" if version else "create" @@ -87,12 +92,12 @@ def delete_subscription( utm_client: infrastructure.UTMClientSession, subscription_id: str, version: str, - server_id: Optional[str] = None, + participant_id: Optional[str] = None, ) -> MutatedSubscription: url = f"/dss/v1/subscriptions/{subscription_id}/{version}" result = MutatedSubscription( fetch.query_and_describe( - utm_client, "DELETE", url, scope=scd.SCOPE_SC, server_id=server_id + utm_client, "DELETE", url, scope=scd.SCOPE_SC, participant_id=participant_id ) ) result.mutation = "delete" diff --git a/monitoring/uss_qualifier/reports/sequence_view.py b/monitoring/uss_qualifier/reports/sequence_view.py index 40c19c774d..bae7ea0d75 100644 --- a/monitoring/uss_qualifier/reports/sequence_view.py +++ b/monitoring/uss_qualifier/reports/sequence_view.py @@ -255,11 +255,11 @@ def append_notes(new_notes): if "queries" in step and step.queries: for query in step.queries: events.append(Event(query=query)) - if "server_id" in query and query.server_id: + if "participant_id" in query and query.participant_id: p = scenario_participants.get( - query.server_id, TestedParticipant(has_failures=False) + query.participant_id, TestedParticipant(has_failures=False) ) - scenario_participants[query.server_id] = p + scenario_participants[query.participant_id] = p if "notes" in report and report.notes: for key, note in report.notes.items(): if step.start_time.datetime <= note.timestamp.datetime: diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html b/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html index c2fafc2f73..e7322a5707 100644 --- a/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html +++ b/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html @@ -146,7 +146,7 @@

{{ test_scenario.type }}

{% set collapsible.queries = collapsible.queries + [query_id] %} {% for participant_id in all_participants %} - {% if participant_id == event.query.get("server_id", None) %} + {% if participant_id == event.query.get("participant_id", None) %} 🌐 {% else %} diff --git a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py index c0b99aac18..b416ad3121 100644 --- a/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py +++ b/monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py @@ -66,7 +66,7 @@ def find_op_intent( url, scope=SCOPE_SC, json=req, - server_id=self.participant_id, + participant_id=self.participant_id, ) if query.status_code != 200: result = None @@ -81,7 +81,7 @@ def get_full_op_intent( ) -> Tuple[OperationalIntent, fetch.Query]: url = f"{op_intent_ref.uss_base_url}/uss/v1/operational_intents/{op_intent_ref.id}" query = fetch.query_and_describe( - self.client, "GET", url, scope=SCOPE_SC, server_id=self.participant_id + self.client, "GET", url, scope=SCOPE_SC, participant_id=self.participant_id ) if query.status_code != 200: result = None diff --git a/monitoring/uss_qualifier/resources/interuss/mock_uss/client.py b/monitoring/uss_qualifier/resources/interuss/mock_uss/client.py index e70ab45d10..2c6fd7f534 100644 --- a/monitoring/uss_qualifier/resources/interuss/mock_uss/client.py +++ b/monitoring/uss_qualifier/resources/interuss/mock_uss/client.py @@ -38,7 +38,7 @@ def get_status(self) -> fetch.Query: "GET", "/scdsc/v1/status", scope=SCOPE_SCD_QUALIFIER_INJECT, - server_id=self.participant_id, + participant_id=self.participant_id, ) def get_locality(self) -> Tuple[Optional[LocalityCode], fetch.Query]: @@ -46,7 +46,7 @@ def get_locality(self) -> Tuple[Optional[LocalityCode], fetch.Query]: self.session, "GET", "/configuration/locality", - server_id=self.participant_id, + participant_id=self.participant_id, ) if query.status_code != 200: return None, query @@ -62,7 +62,7 @@ def set_locality(self, locality_code: LocalityCode) -> fetch.Query: "PUT", "/configuration/locality", scope=MOCK_USS_CONFIG_SCOPE, - server_id=self.participant_id, + participant_id=self.participant_id, json=PutLocalityRequest(locality_code=locality_code), ) diff --git a/monitoring/uss_qualifier/resources/netrid/observers.py b/monitoring/uss_qualifier/resources/netrid/observers.py index 2448df2c79..b172672225 100644 --- a/monitoring/uss_qualifier/resources/netrid/observers.py +++ b/monitoring/uss_qualifier/resources/netrid/observers.py @@ -49,7 +49,7 @@ def observe_system( # TODO replace with 'uas_standards.interuss.automated_testing.rid.v1.constants.Scope.Observe' once # the standard is updated with https://github.com/interuss/uas_standards/pull/11/files scope="dss.read.identification_service_areas", - server_id=self.participant_id, + participant_id=self.participant_id, ) try: result = ( @@ -74,10 +74,10 @@ def observe_flight_details( # TODO replace with 'uas_standards.interuss.automated_testing.rid.v1.constants.Scope.Observe' once # the standard is updated with https://github.com/interuss/uas_standards/pull/11/files scope="dss.read.identification_service_areas", - server_id=self.participant_id, + participant_id=self.participant_id, ) # Record query metadata for later use in the aggregate checks - query.server_id = self.participant_id + query.participant_id = self.participant_id query.query_type = QueryType.flight_details(rid_version) try: result = ( diff --git a/monitoring/uss_qualifier/resources/netrid/service_providers.py b/monitoring/uss_qualifier/resources/netrid/service_providers.py index b7d6b4528b..ced5c50a00 100644 --- a/monitoring/uss_qualifier/resources/netrid/service_providers.py +++ b/monitoring/uss_qualifier/resources/netrid/service_providers.py @@ -66,7 +66,7 @@ def submit_test(self, request: CreateTestParameters, test_id: str) -> fetch.Quer url=f"/tests/{test_id}", json=request, scope=SCOPE_RID_QUALIFIER_INJECT, - server_id=self.participant_id, + participant_id=self.participant_id, ) def delete_test(self, test_id: str, version: str) -> fetch.Query: @@ -75,7 +75,7 @@ def delete_test(self, test_id: str, version: str) -> fetch.Query: "DELETE", url=f"/tests/{test_id}/{version}", scope=SCOPE_RID_QUALIFIER_INJECT, - server_id=self.participant_id, + participant_id=self.participant_id, ) diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/common/aggregate_checks.py b/monitoring/uss_qualifier/scenarios/astm/netrid/common/aggregate_checks.py index 01196fc52e..3bd3cfe942 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/common/aggregate_checks.py +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/common/aggregate_checks.py @@ -86,12 +86,12 @@ def __init__( break # Only consider queries with the participant/server explicitly identified - if query.has_field_with_value("server_id"): + if query.has_field_with_value("participant_id"): participant_queries = self._queries_by_participant.get( - query.server_id, [] + query.participant_id, [] ) participant_queries.append(query) - self._queries_by_participant[query.server_id] = participant_queries + self._queries_by_participant[query.participant_id] = participant_queries def run(self): self.begin_test_scenario() @@ -152,7 +152,7 @@ def _verify_https_everywhere(self): unattr_queries = [ query.request.url for query in self._queries - if query.get("server_id") is None + if query.get("participant_id") is None ] if len(unattr_queries) > 0: self.record_note( diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss/isa_simple.py b/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss/isa_simple.py index 24f43a1a26..b7ff7fa10e 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss/isa_simple.py +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/common/dss/isa_simple.py @@ -76,7 +76,7 @@ def _delete_isa_if_exists(self): self._isa_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self.record_query(fetched.query) with self.check("Successful ISA query", [self._dss.participant_id]) as check: @@ -94,7 +94,7 @@ def _delete_isa_if_exists(self): fetched.isa.version, self._dss.rid_version, self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self.record_query(deleted.dss_query.query) for subscriber_id, notification in deleted.notifications.items(): diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/dss_wrapper.py b/monitoring/uss_qualifier/scenarios/astm/netrid/dss_wrapper.py index dd8b8cbb0b..c22206a364 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/dss_wrapper.py +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/dss_wrapper.py @@ -118,7 +118,7 @@ def search_isas( end_time=end_time, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( main_check, @@ -168,7 +168,7 @@ def search_isas_expect_response_code( end_time=end_time, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -198,7 +198,7 @@ def get_isa( isa_id=isa_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result(check, isa, f"Failed to get ISA {isa_id}") @@ -237,7 +237,7 @@ def get_isa_expect_response_code( isa_id=isa_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -281,7 +281,7 @@ def put_isa( isa_version=isa_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( main_check, mutated_isa.dss_query, f"Failed to insert ISA {isa_id}" @@ -412,7 +412,7 @@ def del_isa( isa_version=isa_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( main_check, del_isa.dss_query, f"Failed to delete ISA {isa_id}" @@ -497,7 +497,7 @@ def del_isa_expect_response_code( isa_version=isa_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -525,7 +525,7 @@ def cleanup_isa( isa_id=isa_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -540,7 +540,7 @@ def cleanup_isa( isa_version=isa.isa.version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -575,7 +575,7 @@ def search_subs( area=area, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -606,7 +606,7 @@ def get_sub( subscription_id=sub_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -646,7 +646,7 @@ def no_sub( subscription_id=sub_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -689,7 +689,7 @@ def put_sub_expect_response_code( subscription_version=sub_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -738,7 +738,7 @@ def put_sub( subscription_version=sub_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -770,7 +770,7 @@ def del_sub( subscription_version=sub_version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -809,7 +809,7 @@ def cleanup_sub( subscription_id=sub_id, rid_version=self._dss.rid_version, session=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( @@ -828,7 +828,7 @@ def cleanup_sub( subscription_version=sub.subscription.version, rid_version=self._dss.rid_version, utm_client=self._dss.client, - server_id=self._dss.participant_id, + participant_id=self._dss.participant_id, ) self._handle_query_result( diff --git a/schemas/monitoring/monitorlib/fetch/Query.json b/schemas/monitoring/monitorlib/fetch/Query.json index 6c33dc6ede..6049fbd45f 100644 --- a/schemas/monitoring/monitorlib/fetch/Query.json +++ b/schemas/monitoring/monitorlib/fetch/Query.json @@ -7,6 +7,13 @@ "description": "Path to content that replaces the $ref", "type": "string" }, + "participant_id": { + "description": "If specified, identifier of the USS/participant hosting the server involved in this query.", + "type": [ + "string", + "null" + ] + }, "query_type": { "description": "If specified, the recognized type of this query.", "enum": [ @@ -49,13 +56,6 @@ }, "response": { "$ref": "ResponseDescription.json" - }, - "server_id": { - "description": "If specified, identifier of the USS/participant hosting the server involved in this query.", - "type": [ - "string", - "null" - ] } }, "required": [