Ubuntu 22.04 and Python 3.10 preparation
[osm/LCM.git] / osm_lcm / lcm_helm_conn.py
index b8817a5..72bd7f5 100644 (file)
@@ -47,7 +47,7 @@ from osm_lcm.lcm_utils import deep_get
 
 def retryer(max_wait_time_var="_initial_retry_time", delay_time_var="_retry_delay"):
     def wrapper(func):
-        retry_exceptions = ConnectionRefusedError
+        retry_exceptions = (ConnectionRefusedError, TimeoutError)
 
         @functools.wraps(func)
         async def wrapped(*args, **kwargs):
@@ -90,10 +90,6 @@ def create_secure_context(
     ctx.load_verify_locations(trusted)
     ctx.set_ciphers("ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20")
     ctx.set_alpn_protocols(["h2"])
-    try:
-        ctx.set_npn_protocols(["h2"])
-    except NotImplementedError:
-        pass
     return ctx
 
 
@@ -101,7 +97,6 @@ class LCMHelmConn(N2VCConnector, LcmBase):
     def __init__(
         self,
         log: object = None,
-        loop: object = None,
         vca_config: VcaConfig = None,
         on_update_db=None,
     ):
@@ -114,7 +109,7 @@ class LCMHelmConn(N2VCConnector, LcmBase):
 
         # parent class constructor
         N2VCConnector.__init__(
-            self, log=log, loop=loop, on_update_db=on_update_db, db=self.db, fs=self.fs
+            self, log=log, on_update_db=on_update_db, db=self.db, fs=self.fs
         )
 
         self.vca_config = vca_config
@@ -674,7 +669,6 @@ class LCMHelmConn(N2VCConnector, LcmBase):
             )
 
         try:
-
             # Obtain cluster_uuid
             system_cluster_uuid = await self._get_system_cluster_id()
 
@@ -799,7 +793,6 @@ class LCMHelmConn(N2VCConnector, LcmBase):
             channel.close()
 
     def _write_op_detailed_status(self, db_dict, status, detailed_message):
-
         # write ee_id to database: _admin.deployed.VCA.x
         try:
             the_table = db_dict["collection"]