Commit eaf9090f authored by Stavros-Anastasios Charismiadis's avatar Stavros-Anastasios Charismiadis
Browse files

Merge with latest staging

parents adf45d6b 4b6bd428
Loading
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -6,20 +6,20 @@ Flask == 3.0.3
pymongo == 4.7.3
pymongo == 4.7.3
redis ==  4.5.4
redis ==  4.5.4
flask_jwt_extended == 4.6.0
flask_jwt_extended == 4.6.0
cryptography == 42.0.8
cryptography == 43.0.1
rfc3987 == 1.3.8
rfc3987 == 1.3.8
opentelemetry-instrumentation == 0.40b0
opentelemetry-instrumentation == 0.41b0
opentelemetry-instrumentation-flask == 0.40b0
opentelemetry-instrumentation-flask == 0.41b0
opentelemetry-instrumentation-redis == 0.40b0
opentelemetry-instrumentation-redis == 0.41b0
opentelemetry-instrumentation-pymongo == 0.40b0
opentelemetry-instrumentation-pymongo == 0.41b0
opentelemetry-exporter-otlp == 1.19.0
opentelemetry-exporter-otlp == 1.20.0
opentelemetry-exporter-jaeger == 1.19.0
opentelemetry-exporter-jaeger == 1.20.0
fluent == 0.10.0
fluent == 0.10.0
fluent-logger == 0.10.0
fluent-logger == 0.10.0
opentelemetry-api == 1.19.0
opentelemetry-api == 1.20.0
opentelemetry-sdk == 1.19.0
opentelemetry-sdk == 1.20.0
flask_executor == 1.0.0
flask_executor == 1.0.0
Flask-APScheduler == 1.13.1
Flask-APScheduler == 1.13.1
werkzeug == 3.0.4
werkzeug == 3.0.6
gunicorn == 22.0.0
gunicorn == 22.0.0
packaging == 24.0
packaging == 24.0
 No newline at end of file
+0 −7
Original line number Original line Diff line number Diff line
@@ -55,13 +55,6 @@ def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_t


    :rtype: Union[DiscoveredAPIs, Tuple[DiscoveredAPIs, int], Tuple[DiscoveredAPIs, int, Dict[str, str]]
    :rtype: Union[DiscoveredAPIs, Tuple[DiscoveredAPIs, int], Tuple[DiscoveredAPIs, int, Dict[str, str]]
    """
    """
    if request.is_json:
        comm_type = CommunicationType.from_dict(request.get_json()())  # noqa: E501
        protocol = Protocol.from_dict(request.get_json()())  # noqa: E501
        data_format = DataFormat.from_dict(request.get_json()())  # noqa: E501
        preferred_aef_loc = AefLocation.from_dict(request.get_json()())  # noqa: E501
        ue_ip_addr = IpAddrInfo.from_dict(request.get_json()())  # noqa: E501
        service_kpis = ServiceKpis.from_dict(request.get_json()())  # noqa: E501


    current_app.logger.info("Discovering service apis")
    current_app.logger.info("Discovering service apis")


+1 −1
Original line number Original line Diff line number Diff line
@@ -12,7 +12,7 @@ def filter_fields(filtered_apis):
    key_filter = [
    key_filter = [
        "api_name", "api_id", "aef_profiles", "description",
        "api_name", "api_id", "aef_profiles", "description",
        "supported_features", "shareable_info", "service_api_category",
        "supported_features", "shareable_info", "service_api_category",
        "api_supp_feats", "pub_api_path", "ccf_id"
        "api_supp_feats", "pub_api_path", "ccf_id", "api_status"
    ]
    ]
    field_filtered_api = {}
    field_filtered_api = {}
    for key in filtered_apis.keys():
    for key in filtered_apis.keys():
+3 −0
Original line number Original line Diff line number Diff line
@@ -1183,6 +1183,7 @@ components:
          type: string
          type: string
      type: object
      type: object
    CommunicationType:
    CommunicationType:
      type: string
      anyOf:
      anyOf:
      - enum:
      - enum:
        - REQUEST_RESPONSE
        - REQUEST_RESPONSE
@@ -1197,6 +1198,7 @@ components:
        \ type subscribe-notify.\n"
        \ type subscribe-notify.\n"
      title: CommunicationType
      title: CommunicationType
    Protocol:
    Protocol:
      type: string
      anyOf:
      anyOf:
      - enum:
      - enum:
        - HTTP_1_1
        - HTTP_1_1
@@ -1214,6 +1216,7 @@ components:
        \ Indicates that the protocol is Websocket.\n"
        \ Indicates that the protocol is Websocket.\n"
      title: Protocol
      title: Protocol
    DataFormat:
    DataFormat:
      type: string
      anyOf:
      anyOf:
      - enum:
      - enum:
        - JSON
        - JSON
+2 −1
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ from flask import current_app
import asyncio
import asyncio
import aiohttp
import aiohttp
from util import dict_to_camel_case, clean_empty, serialize_clean_camel_case
from util import dict_to_camel_case, clean_empty, serialize_clean_camel_case
import os


class Notifications():
class Notifications():


@@ -67,7 +68,7 @@ class Notifications():


    def request_post(self, url, data):
    def request_post(self, url, data):
        headers = {'content-type': 'application/json'}
        headers = {'content-type': 'application/json'}
        return requests.post(url, json={'text': str(data.to_str())}, headers=headers)
        return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=os.getenv("TIMEOUT"))
    
    
    async def send_request(self, url, data):
    async def send_request(self, url, data):
        async with aiohttp.ClientSession() as session:
        async with aiohttp.ClientSession() as session:
Loading