@@ -4347,16 +4347,16 @@ def test__get_port_from_info_port_not_without_match_address(self, net_cli):
4347
4347
self .assertEqual (result_port , fake_port )
4348
4348
self .assertIsNone (result_subnet )
4349
4349
net_cli .get_port .assert_called_once_with (port_id )
4350
- net_cli .get_subnet .not_called ()
4350
+ net_cli .get_subnet .assert_not_called ()
4351
4351
4352
4352
@mock .patch ('ovn_octavia_provider.common.clients.get_neutron_client' )
4353
4353
def test__get_port_from_info_port_insufficient_data (self , net_cli ):
4354
4354
result_port , result_subnet = self .helper ._get_port_from_info (
4355
4355
net_cli , None , None , None )
4356
4356
self .assertIsNone (result_port )
4357
4357
self .assertIsNone (result_subnet )
4358
- net_cli .get_port .not_called ()
4359
- net_cli .get_subnet .not_called ()
4358
+ net_cli .get_port .assert_not_called ()
4359
+ net_cli .get_subnet .assert_not_called ()
4360
4360
4361
4361
def test__get_vip_port_from_loadbalancer_id (self ):
4362
4362
fake_lb = fakes .FakeLB (
@@ -4530,21 +4530,30 @@ def test_hm_create_no_vip_port(self, folbpi):
4530
4530
vip = ''
4531
4531
options = {'interval' : '6' ,
4532
4532
'timeout' : '7' ,
4533
- 'failure_count ' : '5 ' ,
4534
- 'success_count ' : '3 ' }
4533
+ 'success_count ' : '3 ' ,
4534
+ 'failure_count ' : '5 ' }
4535
4535
self .ovn_hm .external_ids .pop (ovn_const .LB_EXT_IDS_HM_KEY )
4536
- external_ids = {
4536
+ external_ids_vip = {
4537
4537
ovn_const .LB_EXT_IDS_HM_KEY : self .healthmonitor_id ,
4538
4538
ovn_const .LB_EXT_IDS_HM_POOL_KEY : self .pool_id ,
4539
4539
ovn_const .LB_EXT_IDS_HM_VIP : self .ovn_hm_lb .external_ids .get (
4540
4540
ovn_const .LB_EXT_IDS_VIP_KEY )}
4541
- kwargs = {'vip' : vip ,
4542
- 'options' : options ,
4543
- 'external_ids' : external_ids }
4541
+ external_ids_fip = {
4542
+ ovn_const .LB_EXT_IDS_HM_KEY : self .healthmonitor_id ,
4543
+ ovn_const .LB_EXT_IDS_HM_POOL_KEY : self .pool_id ,
4544
+ ovn_const .LB_EXT_IDS_HM_VIP : self .ovn_hm_lb .external_ids .get (
4545
+ ovn_const .LB_EXT_IDS_VIP_FIP_KEY )}
4546
+ kwargs_first = {'vip' : vip ,
4547
+ 'options' : options ,
4548
+ 'external_ids' : external_ids_vip }
4549
+ kwargs_second = {'vip' : vip ,
4550
+ 'options' : options ,
4551
+ 'external_ids' : external_ids_fip }
4544
4552
expected_lbhc_calls = [
4545
- mock .call ('Load_Balancer_Health_Check' , ** kwargs ),
4546
- mock .call ('Load_Balancer_Health_Check' , ** kwargs )]
4547
- self .helper .ovn_nbdb_api .db_create .has_calls (expected_lbhc_calls )
4553
+ mock .call ('Load_Balancer_Health_Check' , ** kwargs_first ),
4554
+ mock .call ('Load_Balancer_Health_Check' , ** kwargs_second )]
4555
+ self .helper .ovn_nbdb_api .db_create .assert_has_calls (
4556
+ expected_lbhc_calls )
4548
4557
self .assertEqual (self .helper .ovn_nbdb_api .db_add .call_count , 2 )
4549
4558
4550
4559
@mock .patch .object (ovn_helper .OvnProviderHelper , '_find_ovn_lb_by_pool_id' )
0 commit comments