diff --git a/monitoring/monitorlib/geo.py b/monitoring/monitorlib/geo.py index f921552bc0..82d18b12ed 100644 --- a/monitoring/monitorlib/geo.py +++ b/monitoring/monitorlib/geo.py @@ -19,8 +19,16 @@ class DistanceUnits(str, Enum): class LatLngPoint(ImplicitDict): + """Vertex in latitude and longitude""" + lat: float + """Latitude (degrees)""" + lng: float + """Longitude (degrees)""" + + def as_s2sphere(self) -> s2sphere.LatLng: + return s2sphere.LatLng.from_degrees(self.lat, self.lng) class Radius(ImplicitDict): @@ -251,16 +259,3 @@ def to_vertices(self) -> List[s2sphere.LatLng]: s2sphere.LatLng.from_degrees(self.lat_max, self.lng_max), s2sphere.LatLng.from_degrees(self.lat_min, self.lng_max), ] - - -class LatLngVertex(ImplicitDict): - """Vertex in latitude and longitude""" - - lat: float - """Latitude (degrees)""" - - lng: float - """Longitude (degrees)""" - - def as_s2sphere(self) -> s2sphere.LatLng: - return s2sphere.LatLng.from_degrees(self.lat, self.lng) diff --git a/monitoring/monitorlib/mutate/rid.py b/monitoring/monitorlib/mutate/rid.py index 2022a0b01e..7a08f87149 100644 --- a/monitoring/monitorlib/mutate/rid.py +++ b/monitoring/monitorlib/mutate/rid.py @@ -373,11 +373,11 @@ def errors(self) -> List[str]: # The augmented.yaml version of the definition should be fixed and then this can be applied to both version. if self.rid_version == RIDVersion.f3411_22a: validation_errors = schema_validation.validate( - self.rid_version.openapi_path, - self.rid_version.openapi_delete_isa_response_path + openapi_path=self.rid_version.openapi_path, + object_path=self.rid_version.openapi_delete_isa_response_path if self.mutation == "delete" else self.rid_version.openapi_put_isa_response_path, - self.query.response.json, + instance=self.query.response.json, ) if validation_errors: return [ diff --git a/monitoring/uss_qualifier/resources/netrid/service_area.py b/monitoring/uss_qualifier/resources/netrid/service_area.py index 9e2e01224a..826007354e 100644 --- a/monitoring/uss_qualifier/resources/netrid/service_area.py +++ b/monitoring/uss_qualifier/resources/netrid/service_area.py @@ -2,7 +2,7 @@ from typing import List from implicitdict import ImplicitDict, StringBasedDateTime -from monitoring.monitorlib.geo import LatLngVertex +from monitoring.monitorlib.geo import LatLngPoint from monitoring.uss_qualifier.resources.resource import Resource @@ -15,7 +15,7 @@ class ServiceAreaSpecification(ImplicitDict): This URL will probably not identify a real resource in tests.""" - footprint: List[LatLngVertex] + footprint: List[LatLngPoint] """2D outline of service area""" altitude_min: float = 0 @@ -33,12 +33,16 @@ class ServiceAreaSpecification(ImplicitDict): time_end: StringBasedDateTime """End time of service area (relative to reference_time)""" - def shifted_time_start(self, now: datetime.datetime) -> datetime.datetime: - dt = now - self.reference_time.datetime + def shifted_time_start( + self, new_reference_time: datetime.datetime + ) -> datetime.datetime: + dt = new_reference_time - self.reference_time.datetime return self.time_start.datetime + dt - def shifted_time_end(self, now: datetime.datetime) -> datetime.datetime: - dt = now - self.reference_time.datetime + def shifted_time_end( + self, new_reference_time: datetime.datetime + ) -> datetime.datetime: + dt = new_reference_time - self.reference_time.datetime return self.time_end.datetime + dt diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/isa_simple.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/isa_simple.md index 1cf6f6b767..348b72f318 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/isa_simple.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/isa_simple.md @@ -42,11 +42,11 @@ When a pre-existing ISA needs to be deleted to ensure a clean workspace, any sub ### [Create ISA test step](test_steps/put_isa.md) -This step attempts to create at the DSS the ISA provided as resource. +This step attempts to query the configured DSS with the ISA provided as a resource. ### Get ISA by ID test step -This step attempts to retrieve at the DSS the ISA just created. +This step attempts to retrieve the previously created ISA from the DSS. #### Successful ISA query check @@ -73,8 +73,8 @@ The cleanup phase of this test scenario attempts to remove the ISA if the test e ### Removed pre-existing ISA check -If an ISA with the intended ID is still present in the DSS, it needs to be removed before exiting the test. If that ISA cannot be deleted, then the **[astm.f3411.v19.DSS0030](../../../../../requirements/astm/f3411/v19.md)** requirement to implement the ISA deletion endpoint might not be met. +If an ISA with the intended ID is still present in the DSS, it needs to be removed before exiting the test. If that ISA cannot be deleted, then the **[astm.f3411.v19.DSS0030](../../../../../requirements/astm/f3411/v19.md)** requirement to implement the ISA deletion endpoint might not be met. ### Notified subscriber check -When an ISA is deleted, subscribers must be notified. If a subscriber cannot be notified, that subscriber USS did not correctly implement "POST Identification Service Area" in **[astm.f3411.v19.NET0730](../../../../../requirements/astm/f3411/v19.md)**. +When an ISA is deleted, subscribers must be notified. If a subscriber cannot be notified, that subscriber USS did not correctly implement "POST Identification Service Area" in **[astm.f3411.v19.NET0730](../../../../../requirements/astm/f3411/v19.md)**. diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/isa_simple.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/isa_simple.md index 51fd0b3c21..79c10a6413 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/isa_simple.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/isa_simple.md @@ -42,11 +42,11 @@ When a pre-existing ISA needs to be deleted to ensure a clean workspace, any sub ### [Create ISA test step](test_steps/put_isa.md) -This step attempts to create at the DSS the ISA provided as resource. +This step attempts to query the configured DSS with the ISA provided as a resource. ### Get ISA by ID test step -This step attempts to retrieve at the DSS the ISA just created. +This step attempts to retrieve the previously created ISA from the DSS. #### Successful ISA query check @@ -73,8 +73,8 @@ The cleanup phase of this test scenario attempts to remove the ISA if the test e ### Removed pre-existing ISA check -If an ISA with the intended ID is still present in the DSS, it needs to be removed before exiting the test. If that ISA cannot be deleted, then the **[astm.f3411.v22a.DSS0030](../../../../../requirements/astm/f3411/v22a.md)** requirement to implement the ISA deletion endpoint might not be met. +If an ISA with the intended ID is still present in the DSS, it needs to be removed before exiting the test. If that ISA cannot be deleted, then the **[astm.f3411.v22a.DSS0030](../../../../../requirements/astm/f3411/v22a.md)** requirement to implement the ISA deletion endpoint might not be met. ### Notified subscriber check -When an ISA is deleted, subscribers must be notified. If a subscriber cannot be notified, that subscriber USS did not correctly implement "POST Identification Service Area" in **[astm.f3411.v22a.NET0730](../../../../../requirements/astm/f3411/v22a.md)**. +When an ISA is deleted, subscribers must be notified. If a subscriber cannot be notified, that subscriber USS did not correctly implement "POST Identification Service Area" in **[astm.f3411.v22a.NET0730](../../../../../requirements/astm/f3411/v22a.md)**.