From 685dc89943fd3035ac349c18b4857000f25a90e7 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Fri, 28 Feb 2025 13:06:06 +0100 Subject: [PATCH 1/4] Fix enhanced Event report flag --- .../capif_events/core/events_apis.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py index e5348759..b2a0b716 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py @@ -87,11 +87,20 @@ class EventSubscriptionsOperations(Resource): return result - if EventSubscription.return_supp_feat_dict(event_subscription.supported_features)["EnhancedEventReport"] and event_subscription.event_filters: - current_app.logger.debug(event_subscription.event_filters) - result = self.__check_event_filters(event_subscription.events, clean_empty(event_subscription.to_dict()["event_filters"])) - if isinstance(result, Response): - return result + if EventSubscription.return_supp_feat_dict(event_subscription.supported_features)["EnhancedEventReport"]: + if event_subscription.event_filters: + current_app.logger.debug(event_subscription.event_filters) + result = self.__check_event_filters(event_subscription.events, clean_empty(event_subscription.to_dict()["event_filters"])) + if isinstance(result, Response): + return result + else: + if event_subscription.event_filters: + current_app.logger.error("Event filters provided but EnhancedEventReport is not enabled") + return bad_request_error( + detail="Bad Param", + cause="Event filters provided but EnhancedEventReport is not enabled", + invalid_params=[{"param": "eventFilters", "reason": "EnhancedEventReport is not enabled"}] + ) # Generate subscriptionID subscription_id = secrets.token_hex(15) -- GitLab From 17f94cdee3a4f52fae76d4a58d0ed96b281c72ec Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Fri, 28 Feb 2025 13:13:08 +0100 Subject: [PATCH 2/4] doc line --- .../TS29222_CAPIF_Events_API/capif_events/core/events_apis.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py index b2a0b716..d6b0bdf2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py @@ -87,6 +87,8 @@ class EventSubscriptionsOperations(Resource): return result + # Check if EnhancedEventReport is enabled and validate event filters + if EventSubscription.return_supp_feat_dict(event_subscription.supported_features)["EnhancedEventReport"]: if event_subscription.event_filters: current_app.logger.debug(event_subscription.event_filters) -- GitLab From 942ba13cd48507dd98a4f03cc83f47a8c7811cc3 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 3 Mar 2025 09:17:11 +0100 Subject: [PATCH 3/4] Set fixed version at docker-compose monitoring file --- services/monitoring/docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/monitoring/docker-compose.yml b/services/monitoring/docker-compose.yml index e71dff52..3a83d239 100644 --- a/services/monitoring/docker-compose.yml +++ b/services/monitoring/docker-compose.yml @@ -32,7 +32,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock:rw grafana: - image: grafana/grafana + image: grafana/grafana:11.5.2 user: "${DUID}:${DGID}" environment: - GF_SECURITY_ADMIN_PASSWORD=secure_pass @@ -68,7 +68,7 @@ services: # grafana image renderer renderer: - image: grafana/grafana-image-renderer:latest + image: grafana/grafana-image-renderer:3.12.1 container_name: grafana-image-renderer expose: - "8081" @@ -77,7 +77,7 @@ services: # fluent-bit send logs to loki fluent-bit: - image: grafana/fluent-bit-plugin-loki:latest + image: grafana/fluent-bit-plugin-loki:3.1.2 container_name: fluent-bit environment: - LOKI_URL=http://loki:3100/loki/api/v1/push @@ -89,7 +89,7 @@ services: # opentelemetry collector otel-collector: - image: otel/opentelemetry-collector:latest + image: otel/opentelemetry-collector:0.120.0 ports: - 55680:55680 - 4317:4317 @@ -99,7 +99,7 @@ services: # tempo is a distributed tracing backend tempo: - image: grafana/tempo:latest + image: grafana/tempo:r190-70f6095 command: [ "-config.file=/etc/tempo.yaml" ] volumes: - ./tempo/tempo.yaml:/etc/tempo.yaml -- GitLab From e11502a81a5b8f02b5cc6f5b93303362036198a8 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Mon, 3 Mar 2025 10:42:51 +0100 Subject: [PATCH 4/4] remove filter in capif_api_events-14, 15, 16 --- tests/features/CAPIF Api Events/capif_events_api.robot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/features/CAPIF Api Events/capif_events_api.robot b/tests/features/CAPIF Api Events/capif_events_api.robot index 69071ab5..1368e0cf 100644 --- a/tests/features/CAPIF Api Events/capif_events_api.robot +++ b/tests/features/CAPIF Api Events/capif_events_api.robot @@ -717,7 +717,7 @@ Invoker receives Service API Invocation events without Enhanced Event Report ${request_body}= Create Events Subscription ... events=@{events_list} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing - ... event_filters=${event_filters} + # ... event_filters=${event_filters} ... supported_features=0 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions @@ -791,7 +791,7 @@ Invoker subscribe to Service API Available and Unavailable events without Enhanc ${request_body}= Create Events Subscription ... events=@{events_list} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing - ... event_filters=${event_filters} + # ... event_filters=${event_filters} ... supported_features=0 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions @@ -863,7 +863,7 @@ Invoker subscribe to Service API Update without Enhanced Event Report ${request_body}= Create Events Subscription ... events=@{events_list} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing - ... event_filters=${event_filters} + # ... event_filters=${event_filters} ... supported_features=0 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions -- GitLab