Loading src/open_exposure_gateway/adapters/database/repos/qod_sessions.py +1 −0 Viewed Changes for src/open_exposure_gateway/adapters/database/repos/qod_sessions.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ class SqlQodSessionRepository(QodSessionRepository): and_( QodSessionRow.state == QodSessionState.UNAVAILABLE, QodSessionRow.status_info == "NETWORK_TERMINATED", QodSessionRow.started_at.is_not(None), ), ), or_(*identifier_matches), Loading src/open_exposure_gateway/application/mappers/traffic_influence_mapper.py +1 −0 Viewed Changes for src/open_exposure_gateway/application/mappers/traffic_influence_mapper.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ def build_activate_command( target = NetworkCapabilityTarget( application_reference=NetworkCapabilityTargetApplicationReference( service_specification_ref=str(request.appId), external_app_id=str(request.appId), ), ) Loading src/open_exposure_gateway/application/services/edge_application_management_service.py +2 −1 Viewed Changes for src/open_exposure_gateway/application/services/edge_application_management_service.py: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ from open_exposure_gateway.domain.edge_application_management import ( SRMCompletedInstance, SRMOperationCompleted, Subject, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, Loading Loading @@ -1075,7 +1076,7 @@ class EdgeApplicationManagementService: operation_update: dict[str, Any] = { "status": status, "result": result, "error": event.error, "error": completion_error(event), } if not partial_delivery: operation_update["completed_at"] = datetime.fromisoformat(event.completed_at) Loading src/open_exposure_gateway/application/services/quality_on_demand_service.py +5 −2 Viewed Changes for src/open_exposure_gateway/application/services/quality_on_demand_service.py: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -35,7 +35,10 @@ from open_exposure_gateway.core.exceptions import ( NotImplementedException, UnprocessableEntityException, ) from open_exposure_gateway.domain.edge_application_management import SRMOperationCompleted from open_exposure_gateway.domain.edge_application_management import ( SRMOperationCompleted, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, CallbackCredentialRevokedError, Loading Loading @@ -446,7 +449,7 @@ class QualityOnDemandService: update={ "status": status, "result": result, "error": event.error, "error": completion_error(event), "completed_at": datetime.fromisoformat(event.completed_at), } ) Loading src/open_exposure_gateway/application/services/traffic_influence_service.py +10 −5 Viewed Changes for src/open_exposure_gateway/application/services/traffic_influence_service.py: 10 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ from open_exposure_gateway.application.mappers.traffic_influence_mapper import ( build_traffic_influence_changed_event, build_traffic_influence_response, ) from open_exposure_gateway.core.config import get_settings from open_exposure_gateway.core.config import DEFAULT_TI_SERVICE_SPECIFICATION_ID, get_settings from open_exposure_gateway.core.exceptions import ( BadRequestException, ConflictException, Loading @@ -31,7 +31,10 @@ from open_exposure_gateway.core.exceptions import ( NotFoundException, NotImplementedException, ) from open_exposure_gateway.domain.edge_application_management import SRMOperationCompleted from open_exposure_gateway.domain.edge_application_management import ( SRMOperationCompleted, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, CallbackCredentialRevokedError, Loading Loading @@ -104,6 +107,7 @@ class TrafficInfluenceService: app_instance_repo: Optional[AppInstanceRepository] = None, callback_credential_repo: Optional[CallbackCredentialRepository] = None, callback_secret_key: Optional[bytes] = None, service_specification_id: UUID = DEFAULT_TI_SERVICE_SPECIFICATION_ID, ) -> None: self.srm_client = srm_client self._publisher = publisher Loading @@ -116,6 +120,7 @@ class TrafficInfluenceService: self._app_instance_repo = app_instance_repo self._callback_credential_repo = callback_credential_repo self._callback_secret_key = callback_secret_key self._service_specification_id = service_specification_id def _parse_traffic_influence_id(self, traffic_influence_id: str) -> UUID: try: Loading Loading @@ -274,7 +279,7 @@ class TrafficInfluenceService: operation_id=operation_id, correlation_id=correlation_id, requested_at=requested_at, service_specification_id=app_registration_id, service_specification_id=self._service_specification_id, service_instance_id=traffic_influence_id, app_provider_id=app_provider_id, zone_id=zone_id, Loading Loading @@ -554,7 +559,7 @@ class TrafficInfluenceService: update={ "status": status, "result": result, "error": event.error, "error": completion_error(event), "completed_at": datetime.fromisoformat(event.completed_at), } ) Loading Loading @@ -785,7 +790,7 @@ class TrafficInfluenceService: try: capabilities = await self.srm_client.get_traffic_influences( app_provider_id=app_provider_id, service_specification_id=app_registration_id, service_specification_id=self._service_specification_id, x_correlator=x_correlator, ) capabilities_by_id = {c.service_instance_id: c for c in capabilities} Loading Loading
src/open_exposure_gateway/adapters/database/repos/qod_sessions.py +1 −0 Viewed Changes for src/open_exposure_gateway/adapters/database/repos/qod_sessions.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ class SqlQodSessionRepository(QodSessionRepository): and_( QodSessionRow.state == QodSessionState.UNAVAILABLE, QodSessionRow.status_info == "NETWORK_TERMINATED", QodSessionRow.started_at.is_not(None), ), ), or_(*identifier_matches), Loading
src/open_exposure_gateway/application/mappers/traffic_influence_mapper.py +1 −0 Viewed Changes for src/open_exposure_gateway/application/mappers/traffic_influence_mapper.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ def build_activate_command( target = NetworkCapabilityTarget( application_reference=NetworkCapabilityTargetApplicationReference( service_specification_ref=str(request.appId), external_app_id=str(request.appId), ), ) Loading
src/open_exposure_gateway/application/services/edge_application_management_service.py +2 −1 Viewed Changes for src/open_exposure_gateway/application/services/edge_application_management_service.py: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ from open_exposure_gateway.domain.edge_application_management import ( SRMCompletedInstance, SRMOperationCompleted, Subject, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, Loading Loading @@ -1075,7 +1076,7 @@ class EdgeApplicationManagementService: operation_update: dict[str, Any] = { "status": status, "result": result, "error": event.error, "error": completion_error(event), } if not partial_delivery: operation_update["completed_at"] = datetime.fromisoformat(event.completed_at) Loading
src/open_exposure_gateway/application/services/quality_on_demand_service.py +5 −2 Viewed Changes for src/open_exposure_gateway/application/services/quality_on_demand_service.py: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -35,7 +35,10 @@ from open_exposure_gateway.core.exceptions import ( NotImplementedException, UnprocessableEntityException, ) from open_exposure_gateway.domain.edge_application_management import SRMOperationCompleted from open_exposure_gateway.domain.edge_application_management import ( SRMOperationCompleted, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, CallbackCredentialRevokedError, Loading Loading @@ -446,7 +449,7 @@ class QualityOnDemandService: update={ "status": status, "result": result, "error": event.error, "error": completion_error(event), "completed_at": datetime.fromisoformat(event.completed_at), } ) Loading
src/open_exposure_gateway/application/services/traffic_influence_service.py +10 −5 Viewed Changes for src/open_exposure_gateway/application/services/traffic_influence_service.py: 10 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ from open_exposure_gateway.application.mappers.traffic_influence_mapper import ( build_traffic_influence_changed_event, build_traffic_influence_response, ) from open_exposure_gateway.core.config import get_settings from open_exposure_gateway.core.config import DEFAULT_TI_SERVICE_SPECIFICATION_ID, get_settings from open_exposure_gateway.core.exceptions import ( BadRequestException, ConflictException, Loading @@ -31,7 +31,10 @@ from open_exposure_gateway.core.exceptions import ( NotFoundException, NotImplementedException, ) from open_exposure_gateway.domain.edge_application_management import SRMOperationCompleted from open_exposure_gateway.domain.edge_application_management import ( SRMOperationCompleted, completion_error, ) from open_exposure_gateway.domain.errors import ( CallbackCredentialExpiredError, CallbackCredentialRevokedError, Loading Loading @@ -104,6 +107,7 @@ class TrafficInfluenceService: app_instance_repo: Optional[AppInstanceRepository] = None, callback_credential_repo: Optional[CallbackCredentialRepository] = None, callback_secret_key: Optional[bytes] = None, service_specification_id: UUID = DEFAULT_TI_SERVICE_SPECIFICATION_ID, ) -> None: self.srm_client = srm_client self._publisher = publisher Loading @@ -116,6 +120,7 @@ class TrafficInfluenceService: self._app_instance_repo = app_instance_repo self._callback_credential_repo = callback_credential_repo self._callback_secret_key = callback_secret_key self._service_specification_id = service_specification_id def _parse_traffic_influence_id(self, traffic_influence_id: str) -> UUID: try: Loading Loading @@ -274,7 +279,7 @@ class TrafficInfluenceService: operation_id=operation_id, correlation_id=correlation_id, requested_at=requested_at, service_specification_id=app_registration_id, service_specification_id=self._service_specification_id, service_instance_id=traffic_influence_id, app_provider_id=app_provider_id, zone_id=zone_id, Loading Loading @@ -554,7 +559,7 @@ class TrafficInfluenceService: update={ "status": status, "result": result, "error": event.error, "error": completion_error(event), "completed_at": datetime.fromisoformat(event.completed_at), } ) Loading Loading @@ -785,7 +790,7 @@ class TrafficInfluenceService: try: capabilities = await self.srm_client.get_traffic_influences( app_provider_id=app_provider_id, service_specification_id=app_registration_id, service_specification_id=self._service_specification_id, x_correlator=x_correlator, ) capabilities_by_id = {c.service_instance_id: c for c in capabilities} Loading