From f04599c2bde183b283b9069bc18f2bac341ad098 Mon Sep 17 00:00:00 2001 From: Hrishikesh Ballal Date: Fri, 27 Mar 2026 09:22:05 +0000 Subject: [PATCH] Changing verification clients --- scenarios/README.md | 6 ++-- scenarios/sdsp-f3623/sdsp_heartbeat.yaml | 6 ++-- scenarios/sdsp-f3623/sdsp_track.yaml | 6 ++-- scenarios/sdsp-f3623/verify_sdsp_metrics.yaml | 4 +-- .../flight_blender/flight_blender_client.py | 30 +++++++++---------- tests/test_client_steps.py | 6 ++-- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/scenarios/README.md b/scenarios/README.md index 21bb2099..85650419 100644 --- a/scenarios/README.md +++ b/scenarios/README.md @@ -20,7 +20,7 @@ steps: step: Start / Stop SDSP Session arguments: action: START - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} - step: Wait X seconds arguments: @@ -28,7 +28,7 @@ steps: - step: Verify SDSP Heartbeat arguments: - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} expected_heartbeat_interval_seconds: 1 expected_heartbeat_count: 3 @@ -40,7 +40,7 @@ steps: - step: Start / Stop SDSP Session arguments: action: STOP - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} ``` ## Step Groups (Reusable Step Collections) diff --git a/scenarios/sdsp-f3623/sdsp_heartbeat.yaml b/scenarios/sdsp-f3623/sdsp_heartbeat.yaml index e34fa1d7..43028bb4 100644 --- a/scenarios/sdsp-f3623/sdsp_heartbeat.yaml +++ b/scenarios/sdsp-f3623/sdsp_heartbeat.yaml @@ -8,7 +8,7 @@ steps: step: Start / Stop SDSP Session arguments: action: START - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} - step: Wait X seconds arguments: @@ -16,7 +16,7 @@ steps: - step: Verify SDSP Heartbeat arguments: - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} expected_heartbeat_interval_seconds: 1 expected_heartbeat_count: 3 @@ -28,4 +28,4 @@ steps: - step: Start / Stop SDSP Session arguments: action: STOP - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} diff --git a/scenarios/sdsp-f3623/sdsp_track.yaml b/scenarios/sdsp-f3623/sdsp_track.yaml index bec7867e..9e5e69ab 100644 --- a/scenarios/sdsp-f3623/sdsp_track.yaml +++ b/scenarios/sdsp-f3623/sdsp_track.yaml @@ -5,7 +5,7 @@ steps: - id: start_sdsp_session step: Start / Stop SDSP Session arguments: - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} action: START - id: stream_air_traffic step: Stream Air Traffic @@ -21,7 +21,7 @@ steps: arguments: expected_track_interval_seconds: 1 expected_track_count: 3 - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} - id: wait_5_seconds step: Wait X seconds arguments: @@ -29,7 +29,7 @@ steps: - id: stop_sdsp_session step: Start / Stop SDSP Session arguments: - session_id: ${{ steps.Generate UUID.result }} + surveillance_session_id: ${{ steps.Generate UUID.result }} action: STOP needs: - stream_air_traffic diff --git a/scenarios/sdsp-f3623/verify_sdsp_metrics.yaml b/scenarios/sdsp-f3623/verify_sdsp_metrics.yaml index 169b2b3c..64de850e 100644 --- a/scenarios/sdsp-f3623/verify_sdsp_metrics.yaml +++ b/scenarios/sdsp-f3623/verify_sdsp_metrics.yaml @@ -18,7 +18,7 @@ steps: - id: start_sdsp_session step: Start / Stop SDSP Session arguments: - session_id: ${{ steps.generated_sdsp_session_id.result }} + surveillance_session_id: ${{ steps.generated_sdsp_session_id.result }} action: START - id: wait_10_seconds step: Wait X seconds @@ -33,7 +33,7 @@ steps: - id: stop_sdsp_session step: Start / Stop SDSP Session arguments: - session_id: ${{ steps.generated_sdsp_session_id.result }} + surveillance_session_id: ${{ steps.generated_sdsp_session_id.result }} action: STOP needs: - stream_air_traffic diff --git a/src/openutm_verification/core/clients/flight_blender/flight_blender_client.py b/src/openutm_verification/core/clients/flight_blender/flight_blender_client.py index 8f978bb8..0aa692dd 100644 --- a/src/openutm_verification/core/clients/flight_blender/flight_blender_client.py +++ b/src/openutm_verification/core/clients/flight_blender/flight_blender_client.py @@ -1146,7 +1146,7 @@ async def list_sensor_failure_notifications(self) -> StepResult: ) @scenario_step("Start / Stop SDSP Session") - async def start_stop_sdsp_session(self, session_id: str, action: SDSPSessionAction) -> str: + async def start_stop_sdsp_session(self, surveillance_session_id: str, action: SDSPSessionAction) -> str: """ Starts or stops an SDSP (Strategic Deconfliction Service Provider) session based on the specified action. This method interacts with the Flight Blender service to manage the lifecycle of an SDSP session. @@ -1162,26 +1162,26 @@ async def start_stop_sdsp_session(self, session_id: str, action: SDSPSessionActi FlightBlenderError: If the action fails due to service errors. """ - endpoint = f"/surveillance_monitoring_ops/start_stop_surveillance_heartbeat_track/{session_id}" + endpoint = f"/surveillance_monitoring_ops/start_stop_surveillance_heartbeat_track/{surveillance_session_id}" payload = {"action": action.value} response = await self.put(endpoint, json=payload) - logger.info(f"SDSP session {session_id} action {action.value} response: {response.status_code}") + logger.info(f"SDSP session {surveillance_session_id} action {action.value} response: {response.status_code}") if response.status_code == 200: - logger.info(f"SDSP session {session_id} action {action.value} completed successfully.") - return f"{action.value} Heartbeat Track message received for {session_id}" + logger.info(f"SDSP session {surveillance_session_id} action {action.value} completed successfully.") + return f"{action.value} Heartbeat Track message received for {surveillance_session_id}" else: - logger.error(f"Failed to perform action {action.value} on SDSP session {session_id}. Response: {response.text}") - raise FlightBlenderError(f"{action.value} Heartbeat Track message not received for {session_id}") + logger.error(f"Failed to perform action {action.value} on SDSP session {surveillance_session_id}. Response: {response.text}") + raise FlightBlenderError(f"{action.value} Heartbeat Track message not received for {surveillance_session_id}") - async def initialize_heartbeat_websocket_connection(self, session_id: str) -> ClientConnection: - endpoint = f"/ws/surveillance/heartbeat/{session_id}" + async def initialize_heartbeat_websocket_connection(self, surveillance_session_id: str) -> ClientConnection: + endpoint = f"/ws/surveillance/heartbeat/{surveillance_session_id}" ws = await self.create_websocket_connection(endpoint=endpoint) return ws - async def initialize_track_websocket_connection(self, session_id: str) -> ClientConnection: - endpoint = f"/ws/surveillance/track/{session_id}" + async def initialize_track_websocket_connection(self, surveillance_session_id: str) -> ClientConnection: + endpoint = f"/ws/surveillance/track/{surveillance_session_id}" ws = await self.create_websocket_connection(endpoint=endpoint) return ws @@ -1190,9 +1190,9 @@ async def initialize_verify_sdsp_track( self, expected_track_interval_seconds: int, expected_track_count: int, - session_id: str, + surveillance_session_id: str, ) -> StepResult: - ws_connection = await self.initialize_track_websocket_connection(session_id=session_id) + ws_connection = await self.initialize_track_websocket_connection(surveillance_session_id=surveillance_session_id) start_time = time.time() all_received_messages = [] @@ -1252,9 +1252,9 @@ async def initialize_verify_sdsp_heartbeat( self, expected_heartbeat_interval_seconds: int, expected_heartbeat_count: int, - session_id: str, + surveillance_session_id: str, ) -> StepResult: - ws_connection = await self.initialize_heartbeat_websocket_connection(session_id=session_id) + ws_connection = await self.initialize_heartbeat_websocket_connection(surveillance_session_id=surveillance_session_id) start_time = time.time() all_received_messages = [] diff --git a/tests/test_client_steps.py b/tests/test_client_steps.py index 61b154c1..d4f95506 100644 --- a/tests/test_client_steps.py +++ b/tests/test_client_steps.py @@ -272,7 +272,7 @@ async def test_start_stop_sdsp_session(fb_client): mock_response.status_code = 200 fb_client.put.return_value = mock_response - result = await fb_client.start_stop_sdsp_session(session_id="sess_123", action=SDSPSessionAction.START) + result = await fb_client.start_stop_sdsp_session(surveillance_session_id="sess_123", action=SDSPSessionAction.START) assert "start Heartbeat Track message received" in result.result fb_client.put.assert_called_once() @@ -319,7 +319,7 @@ async def test_initialize_verify_sdsp_track(fb_client): except Exception: pass # Expected to fail due to complex mocking needs, but we verified the call - fb_client.initialize_track_websocket_connection.assert_called_with(session_id="sess_123") + fb_client.initialize_track_websocket_connection.assert_called_with(surveillance_session_id="sess_123") async def test_submit_simulated_air_traffic(fb_client): @@ -484,7 +484,7 @@ async def test_initialize_verify_sdsp_heartbeat(fb_client): except Exception: # noqa: E722 pass - fb_client.initialize_heartbeat_websocket_connection.assert_called_with(session_id="sess_123") + fb_client.initialize_heartbeat_websocket_connection.assert_called_with(surveillance_session_id="sess_123") async def test_setup_flight_declaration(fb_client):