Loading src/open_exposure_gateway/adapters/database/core.py +1 −0 Changes for src/open_exposure_gateway/adapters/database/core.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ _ADDED_COLUMNS = ( "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS status_info VARCHAR(32)", "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS device JSONB", "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS application_server JSONB", "ALTER TABLE app_registrations ADD COLUMN IF NOT EXISTS app_provider_id VARCHAR(255)", ) Loading src/open_exposure_gateway/adapters/database/mappers.py +2 −0 Changes for src/open_exposure_gateway/adapters/database/mappers.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class AppRegistrationMapper: app_registration_id=row.app_registration_id, app_id=row.app_id, tenant_id=row.tenant_id, app_provider_id=row.app_provider_id, name=row.name, version=row.version, package_type=row.package_type, Loading @@ -47,6 +48,7 @@ class AppRegistrationMapper: app_registration_id=domain.app_registration_id, app_id=domain.app_id, tenant_id=domain.tenant_id, app_provider_id=domain.app_provider_id, name=domain.name, version=domain.version, package_type=domain.package_type, Loading src/open_exposure_gateway/adapters/database/sql.py +1 −0 Changes for src/open_exposure_gateway/adapters/database/sql.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class AppRegistrationRow(AuditedMixin, Base): app_registration_id: Mapped[UUID] = mapped_column(PG_UUID(as_uuid=True), primary_key=True) app_id: Mapped[UUID] = mapped_column(PG_UUID(as_uuid=True), nullable=False) tenant_id: Mapped[str] = mapped_column(String(255), nullable=False) app_provider_id: Mapped[str | None] = mapped_column(String(255)) name: Mapped[str] = mapped_column(String(64), nullable=False) version: Mapped[str] = mapped_column(String(64), nullable=False) package_type: Mapped[PackageType] = mapped_column(_enum_type(PackageType), nullable=False) Loading src/open_exposure_gateway/application/services/edge_application_management_service.py +10 −0 Changes for src/open_exposure_gateway/application/services/edge_application_management_service.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ from open_exposure_gateway.core.exceptions import ( AbortedException, AlreadyExistsException, BadRequestException, ConflictException, DownstreamServiceException, NotFoundException, NotImplementedException, Loading Loading @@ -410,6 +411,7 @@ class EdgeApplicationManagementService: app_registration_id=app_registration_id, app_id=translation.app_id, tenant_id=translation.tenant_id, app_provider_id=translation.app_provider_id, name=translation.name, version=translation.version, package_type=PackageType(translation.package_type), Loading Loading @@ -486,6 +488,10 @@ class EdgeApplicationManagementService: tenant_id, idempotency_key ) if existing_operation is not None: if existing_operation.app_provider_id != app_provider_id: raise ConflictException( message="Idempotency-Key was already used for a different operation" ) existing_instance = await self._app_instance_repo.get_by_operation_id( existing_operation.operation_id ) Loading Loading @@ -598,6 +604,10 @@ class EdgeApplicationManagementService: tenant_id, idempotency_key ) if existing_operation is not None: if existing_operation.app_provider_id != app_provider_id: raise ConflictException( message="Idempotency-Key was already used for a different operation" ) existing_deployment = await self._app_deployment_repo.get_by_operation_id( existing_operation.operation_id ) Loading src/open_exposure_gateway/application/services/traffic_influence_service.py +9 −4 Changes for src/open_exposure_gateway/application/services/traffic_influence_service.py: 9 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -196,8 +196,13 @@ class TrafficInfluenceService: raise not_registered return app_registration.app_registration_id async def _replay_create(self, operation: Operation) -> TrafficInfluenceResponse: if operation.operation_type != OperationType.TRAFFIC_INFLUENCE: async def _replay_create( self, operation: Operation, app_provider_id: str ) -> TrafficInfluenceResponse: if ( operation.operation_type != OperationType.TRAFFIC_INFLUENCE or operation.app_provider_id != app_provider_id ): raise ConflictException( message="Idempotency-Key was already used for a different operation" ) Loading Loading @@ -251,7 +256,7 @@ class TrafficInfluenceService: if idempotency_key is not None: existing = await self._operation_repo.get_by_idempotency_key(tenant_id, idempotency_key) if existing is not None: return await self._replay_create(existing) return await self._replay_create(existing, app_provider_id) app_registration_id = await self._resolve_app_registration_id( request.appId, app_provider_id, x_correlator Loading Loading @@ -299,7 +304,7 @@ class TrafficInfluenceService: existing = await self._operation_repo.get_by_idempotency_key(tenant_id, idempotency_key) if existing is None: raise return await self._replay_create(existing) return await self._replay_create(existing, app_provider_id) source_filter = request.sourceTrafficFilters destination_filter = request.destinationTrafficFilters Loading Loading
src/open_exposure_gateway/adapters/database/core.py +1 −0 Changes for src/open_exposure_gateway/adapters/database/core.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ _ADDED_COLUMNS = ( "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS status_info VARCHAR(32)", "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS device JSONB", "ALTER TABLE qod_sessions ADD COLUMN IF NOT EXISTS application_server JSONB", "ALTER TABLE app_registrations ADD COLUMN IF NOT EXISTS app_provider_id VARCHAR(255)", ) Loading
src/open_exposure_gateway/adapters/database/mappers.py +2 −0 Changes for src/open_exposure_gateway/adapters/database/mappers.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class AppRegistrationMapper: app_registration_id=row.app_registration_id, app_id=row.app_id, tenant_id=row.tenant_id, app_provider_id=row.app_provider_id, name=row.name, version=row.version, package_type=row.package_type, Loading @@ -47,6 +48,7 @@ class AppRegistrationMapper: app_registration_id=domain.app_registration_id, app_id=domain.app_id, tenant_id=domain.tenant_id, app_provider_id=domain.app_provider_id, name=domain.name, version=domain.version, package_type=domain.package_type, Loading
src/open_exposure_gateway/adapters/database/sql.py +1 −0 Changes for src/open_exposure_gateway/adapters/database/sql.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class AppRegistrationRow(AuditedMixin, Base): app_registration_id: Mapped[UUID] = mapped_column(PG_UUID(as_uuid=True), primary_key=True) app_id: Mapped[UUID] = mapped_column(PG_UUID(as_uuid=True), nullable=False) tenant_id: Mapped[str] = mapped_column(String(255), nullable=False) app_provider_id: Mapped[str | None] = mapped_column(String(255)) name: Mapped[str] = mapped_column(String(64), nullable=False) version: Mapped[str] = mapped_column(String(64), nullable=False) package_type: Mapped[PackageType] = mapped_column(_enum_type(PackageType), nullable=False) Loading
src/open_exposure_gateway/application/services/edge_application_management_service.py +10 −0 Changes for src/open_exposure_gateway/application/services/edge_application_management_service.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ from open_exposure_gateway.core.exceptions import ( AbortedException, AlreadyExistsException, BadRequestException, ConflictException, DownstreamServiceException, NotFoundException, NotImplementedException, Loading Loading @@ -410,6 +411,7 @@ class EdgeApplicationManagementService: app_registration_id=app_registration_id, app_id=translation.app_id, tenant_id=translation.tenant_id, app_provider_id=translation.app_provider_id, name=translation.name, version=translation.version, package_type=PackageType(translation.package_type), Loading Loading @@ -486,6 +488,10 @@ class EdgeApplicationManagementService: tenant_id, idempotency_key ) if existing_operation is not None: if existing_operation.app_provider_id != app_provider_id: raise ConflictException( message="Idempotency-Key was already used for a different operation" ) existing_instance = await self._app_instance_repo.get_by_operation_id( existing_operation.operation_id ) Loading Loading @@ -598,6 +604,10 @@ class EdgeApplicationManagementService: tenant_id, idempotency_key ) if existing_operation is not None: if existing_operation.app_provider_id != app_provider_id: raise ConflictException( message="Idempotency-Key was already used for a different operation" ) existing_deployment = await self._app_deployment_repo.get_by_operation_id( existing_operation.operation_id ) Loading
src/open_exposure_gateway/application/services/traffic_influence_service.py +9 −4 Changes for src/open_exposure_gateway/application/services/traffic_influence_service.py: 9 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -196,8 +196,13 @@ class TrafficInfluenceService: raise not_registered return app_registration.app_registration_id async def _replay_create(self, operation: Operation) -> TrafficInfluenceResponse: if operation.operation_type != OperationType.TRAFFIC_INFLUENCE: async def _replay_create( self, operation: Operation, app_provider_id: str ) -> TrafficInfluenceResponse: if ( operation.operation_type != OperationType.TRAFFIC_INFLUENCE or operation.app_provider_id != app_provider_id ): raise ConflictException( message="Idempotency-Key was already used for a different operation" ) Loading Loading @@ -251,7 +256,7 @@ class TrafficInfluenceService: if idempotency_key is not None: existing = await self._operation_repo.get_by_idempotency_key(tenant_id, idempotency_key) if existing is not None: return await self._replay_create(existing) return await self._replay_create(existing, app_provider_id) app_registration_id = await self._resolve_app_registration_id( request.appId, app_provider_id, x_correlator Loading Loading @@ -299,7 +304,7 @@ class TrafficInfluenceService: existing = await self._operation_repo.get_by_idempotency_key(tenant_id, idempotency_key) if existing is None: raise return await self._replay_create(existing) return await self._replay_create(existing, app_provider_id) source_filter = request.sourceTrafficFilters destination_filter = request.destinationTrafficFilters Loading