Loading services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py +2 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ from .responses import internal_server_error, not_found_error, make_response, ba from ..db.db import MongoDatabse from ..util import serialize_clean_camel_case, clean_empty, dict_to_camel_case from .auth_manager import AuthManager import os class EventSubscriptionsOperations(Resource): Loading Loading @@ -75,8 +76,7 @@ class EventSubscriptionsOperations(Resource): self.auth_manager.add_auth_event(subscription_id, subscriber_id) res = make_response(object=serialize_clean_camel_case(event_subscription), status=201) res.headers['Location'] = "http://localhost:8080/capif-events/v1/" + \ str(subscriber_id) + "/subscriptions/" + str(subscription_id) res.headers['Location'] = f"http://{os.getenv("CAPIF_HOSTNAME")}/capif-events/v1/{str(subscriber_id)}/subscriptions/{str(subscription_id)}" return res Loading services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ class Notifications(): if not (key == "serviceAPIDescriptions" and redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"]): event_detail[key]=redis_event.get('information', None)[pos] else: if not (redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"] and key == "serviceAPIDescriptions" and not EventSubscription.return_supp_feat_dict(sub["supported_features"])["ApiStatusMonitoring"]): if not (redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"] and key == "serviceAPIDescriptions" and (not EventSubscription.return_supp_feat_dict(sub["supported_features"])["ApiStatusMonitoring"] or not EventSubscription.return_supp_feat_dict(sub["supported_features"])["EnhancedEventReport"])): event_detail[key]=redis_event.get('information', None)[pos] current_app.logger.debug(event_detail) Loading Loading
services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py +2 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ from .responses import internal_server_error, not_found_error, make_response, ba from ..db.db import MongoDatabse from ..util import serialize_clean_camel_case, clean_empty, dict_to_camel_case from .auth_manager import AuthManager import os class EventSubscriptionsOperations(Resource): Loading Loading @@ -75,8 +76,7 @@ class EventSubscriptionsOperations(Resource): self.auth_manager.add_auth_event(subscription_id, subscriber_id) res = make_response(object=serialize_clean_camel_case(event_subscription), status=201) res.headers['Location'] = "http://localhost:8080/capif-events/v1/" + \ str(subscriber_id) + "/subscriptions/" + str(subscription_id) res.headers['Location'] = f"http://{os.getenv("CAPIF_HOSTNAME")}/capif-events/v1/{str(subscriber_id)}/subscriptions/{str(subscription_id)}" return res Loading
services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ class Notifications(): if not (key == "serviceAPIDescriptions" and redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"]): event_detail[key]=redis_event.get('information', None)[pos] else: if not (redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"] and key == "serviceAPIDescriptions" and not EventSubscription.return_supp_feat_dict(sub["supported_features"])["ApiStatusMonitoring"]): if not (redis_event.get('event', None) in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"] and key == "serviceAPIDescriptions" and (not EventSubscription.return_supp_feat_dict(sub["supported_features"])["ApiStatusMonitoring"] or not EventSubscription.return_supp_feat_dict(sub["supported_features"])["EnhancedEventReport"])): event_detail[key]=redis_event.get('information', None)[pos] current_app.logger.debug(event_detail) Loading