From: Adurti Date: Wed, 8 May 2024 05:37:59 +0000 (+0000) Subject: Bug 2375 Fixed Unable to get notification during NS instantiation using SOL003 APIs X-Git-Tag: v14.0.3~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9103e5445b4bf264e5ce2566721e0eda17c1ea69;p=osm%2FNBI.git Bug 2375 Fixed Unable to get notification during NS instantiation using SOL003 APIs Change-Id: I01c29de775156b737a1c298283bc50d2f51da33a Signed-off-by: Adurti Signed-off-by: garciadeblas --- diff --git a/osm_nbi/notifications.py b/osm_nbi/notifications.py index 63d4ce8..6d20968 100644 --- a/osm_nbi/notifications.py +++ b/osm_nbi/notifications.py @@ -18,6 +18,8 @@ __date__ = "$28-Apr-2020 23:59:59$" import asyncio import aiohttp +import ssl +import certifi from http import HTTPStatus import json import logging @@ -154,7 +156,9 @@ class NotificationBase: if notifications: tasks = [] - async with aiohttp.ClientSession() as session: + ssl_context = ssl.create_default_context(cafile=certifi.where()) + conn = aiohttp.TCPConnector(ssl=ssl_context) + async with aiohttp.ClientSession(connector=conn) as session: for notification in notifications: tasks.append( asyncio.ensure_future(