@@ -467,7 +467,7 @@ def _get_neutron_client(self):
467
467
try :
468
468
return clients .get_neutron_client ()
469
469
except driver_exceptions .DriverError as e :
470
- LOG .warn (f"Cannot get client from neutron { e } " )
470
+ LOG .warning (f"Cannot get client from neutron { e } " )
471
471
return None
472
472
473
473
def _get_vip_port_and_subnet_from_lb (self , neutron_client , vip_port_id ,
@@ -482,10 +482,10 @@ def _get_vip_port_and_subnet_from_lb(self, neutron_client, vip_port_id,
482
482
subnet_requested
483
483
)
484
484
except openstack .exceptions .ResourceNotFound :
485
- LOG .warn ("Load balancer VIP port and subnet not found." )
485
+ LOG .warning ("Load balancer VIP port and subnet not found." )
486
486
return None , None
487
487
except AttributeError :
488
- LOG .warn ("Load Balancer VIP port missing information." )
488
+ LOG .warning ("Load Balancer VIP port missing information." )
489
489
return None , None
490
490
491
491
def _build_external_ids (self , loadbalancer , port ):
@@ -3179,7 +3179,7 @@ def get_lsp(self, port_id, network_id):
3179
3179
try :
3180
3180
ls = self .ovn_nbdb_api .lookup ('Logical_Switch' , ls_name )
3181
3181
except idlutils .RowNotFound :
3182
- LOG .warn (f"Logical Switch { ls_name } not found." )
3182
+ LOG .warning (f"Logical Switch { ls_name } not found." )
3183
3183
return
3184
3184
for port in ls .ports :
3185
3185
if port_id in port .name :
@@ -3211,9 +3211,9 @@ def get_fip_from_vip(self, lb):
3211
3211
try :
3212
3212
return list (neutron_client .ips (port_id = lb .vip_port_id ))
3213
3213
except openstack .exceptions .HttpException as e :
3214
- LOG .warn ("Error on fetch fip for "
3215
- f"{ lb .loadbalancer_id } "
3216
- f"Error: { str (e )} " )
3214
+ LOG .warning ("Error on fetch fip for "
3215
+ f"{ lb .loadbalancer_id } "
3216
+ f"Error: { str (e )} " )
3217
3217
3218
3218
def _add_lbhc (self , ovn_lb , pool_key , info ):
3219
3219
hm_id = info [constants .ID ]
@@ -3787,7 +3787,8 @@ def hm_sync(self, hm, ovn_lb, pool_key):
3787
3787
:param ovn_lb: The OVN LoadBalancer object that needs to be sync
3788
3788
:param pool_key: The pool_key where health monitor is associated
3789
3789
"""
3790
- lbhcs , ovn_lb = self ._find_ovn_lb_from_hm_id (hm [constants .ID ])
3790
+ lbhcs , _ovn_lb = self ._find_ovn_lb_from_hm_id (hm [constants .ID ])
3791
+ ovn_lb = _ovn_lb if _ovn_lb else ovn_lb
3791
3792
if not lbhcs :
3792
3793
LOG .debug ("Loadbalancer health check %s not found!" ,
3793
3794
hm [constants .ID ])
0 commit comments