Skip to content

Commit

Permalink
[uss_qualifier] dss_wrapper's handle_query_result function is made pu…
Browse files Browse the repository at this point in the history
…blic
  • Loading branch information
Shastick committed Nov 9, 2023
1 parent 1eacb0b commit c92e547
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _isa_missing_outline(self, create_isa_url: str, json_body: Dict[str, Any]):

rid_query.set_participant_id(self._dss_wrapper.participant_id)

self._dss_wrapper._handle_query_result(
self._dss_wrapper.handle_query_result(
check=check,
q=rid_query,
fail_msg="ISA Creation with missing outline has unexpected result code",
Expand Down Expand Up @@ -290,7 +290,7 @@ def _isa_missing_volume(self, create_isa_url: str, json_body: Dict[str, Any]):

rid_query.set_participant_id(self._dss_wrapper.participant_id)

self._dss_wrapper._handle_query_result(
self._dss_wrapper.handle_query_result(
check=check,
q=rid_query,
fail_msg="ISA Creation with missing outline has unexpected result code",
Expand Down Expand Up @@ -319,7 +319,7 @@ def _isa_missing_extents(self, create_isa_url: str, json_body: Dict[str, Any]):
else:
raise ValueError(f"Unknown RID version: {self._dss.rid_version}")

self._dss_wrapper._handle_query_result(
self._dss_wrapper.handle_query_result(
check=check,
q=rid_query,
fail_msg="ISA Creation with missing outline has unexpected result code",
Expand Down
48 changes: 24 additions & 24 deletions monitoring/uss_qualifier/scenarios/astm/netrid/dss_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _handle_query_error(
query_timestamps=[q.request.timestamp for q in e.queries],
)

def _handle_query_result(
def handle_query_result(
self,
check: PendingCheck,
q: RIDQuery,
Expand Down Expand Up @@ -127,7 +127,7 @@ def search_isas(
session=self._dss.client,
participant_id=self._dss.participant_id,
)
self._handle_query_result(
self.handle_query_result(
main_check,
isas,
f"Failed to search ISAs in {area} from {start_time} to {end_time}",
Expand Down Expand Up @@ -178,7 +178,7 @@ def search_isas_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=main_check,
q=isas,
required_status_code=expected_error_codes,
Expand Down Expand Up @@ -208,7 +208,7 @@ def get_isa(
participant_id=self._dss.participant_id,
)

self._handle_query_result(check, isa, f"Failed to get ISA {isa_id}")
self.handle_query_result(check, isa, f"Failed to get ISA {isa_id}")

if isa_id != isa.isa.id:
check.record_failed(
Expand Down Expand Up @@ -247,7 +247,7 @@ def get_isa_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=isa,
required_status_code=expected_error_codes,
Expand Down Expand Up @@ -284,7 +284,7 @@ def put_isa_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=mutated_isa.dss_query,
fail_msg="ISA Put succeeded when expecting a failure",
Expand Down Expand Up @@ -327,7 +327,7 @@ def put_isa(
utm_client=self._dss.client,
participant_id=self._dss.participant_id,
)
self._handle_query_result(
self.handle_query_result(
main_check, mutated_isa.dss_query, f"Failed to insert ISA {isa_id}"
)
for notification_query in mutated_isa.notifications.values():
Expand Down Expand Up @@ -458,7 +458,7 @@ def del_isa(
utm_client=self._dss.client,
participant_id=self._dss.participant_id,
)
self._handle_query_result(
self.handle_query_result(
main_check, del_isa.dss_query, f"Failed to delete ISA {isa_id}"
)
for notification_query in del_isa.notifications.values():
Expand Down Expand Up @@ -544,7 +544,7 @@ def del_isa_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=main_check,
q=del_isa.dss_query,
required_status_code=expected_error_codes,
Expand Down Expand Up @@ -572,7 +572,7 @@ def cleanup_isa(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, isa, f"Failed to get ISA {isa_id}", {404, 200}, Severity.Medium
)

Expand All @@ -587,7 +587,7 @@ def cleanup_isa(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check,
del_isa.dss_query,
f"Failed to delete ISA {isa_id}",
Expand Down Expand Up @@ -621,7 +621,7 @@ def search_subs_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=subs,
fail_msg=f"Search for subscriptions in area {area} failed to yield a result code in {expected_codes}",
Expand Down Expand Up @@ -654,7 +654,7 @@ def search_subs(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, subs, f"Failed to search subscriptions in {area}"
)
return subs
Expand Down Expand Up @@ -683,7 +683,7 @@ def get_sub_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=sub,
fail_msg=f"The request to get subscription with ID {sub_id} yielded a response code that wasn't in {expected_response_codes}",
Expand Down Expand Up @@ -718,7 +718,7 @@ def get_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, sub, f"Failed to get subscription {sub_id}"
)

Expand Down Expand Up @@ -758,7 +758,7 @@ def no_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, sub, f"Failed to get subscription {sub_id}", {404}
)
return
Expand Down Expand Up @@ -801,7 +801,7 @@ def put_sub_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=created_sub,
required_status_code=expected_error_codes,
Expand Down Expand Up @@ -850,7 +850,7 @@ def put_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, created_sub, f"Failed to insert subscription {sub_id}"
)
return created_sub
Expand Down Expand Up @@ -883,7 +883,7 @@ def del_sub_expect_response_code(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check=check,
q=del_sub,
fail_msg=f"Query to delete subscription with ID {sub_id} wit not yield a response code in {expected_response_codes}",
Expand Down Expand Up @@ -918,7 +918,7 @@ def del_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check, del_sub, f"Failed to delete subscription {sub_id}"
)

Expand Down Expand Up @@ -963,7 +963,7 @@ def cleanup_subs_in_area(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check,
del_sub,
f"Failed to delete subscription {sub}",
Expand Down Expand Up @@ -996,7 +996,7 @@ def cleanup_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check,
sub,
f"Failed to get subscription {sub_id}",
Expand All @@ -1018,7 +1018,7 @@ def cleanup_sub(
participant_id=self._dss.participant_id,
)

self._handle_query_result(
self.handle_query_result(
check,
del_sub,
f"Failed to delete subscription {sub_id}",
Expand Down Expand Up @@ -1075,7 +1075,7 @@ def raw_request_with_expected_code(
else:
raise ValueError(f"Unknown RID version: {self._dss.rid_version}")

self._handle_query_result(
self.handle_query_result(
check,
rid_query,
fail_msg,
Expand Down

0 comments on commit c92e547

Please sign in to comment.