Fix LB creation failure with cluster name

Change Ibc0c6e7adc6cbdf87c1d1c5ec42f6954d6995253 has a bug for the
order of args which failed the lb creation with policy attach. This
change fixes the issue.

Change-Id: I38a0c768a16527d7f36f81f1e7ffddb8aa3b0146
This commit is contained in:
Hang Yang 2021-06-24 15:58:27 -05:00
parent 5c416ee6f0
commit 5922e74a61
2 changed files with 4 additions and 3 deletions

View File

@ -418,8 +418,9 @@ class LoadBalancingPolicy(base.Policy):
data['healthmonitor'] = self.hm_spec.get(self.HM_ID)
else:
res, data = lb_driver.lb_create(self.vip_spec, self.pool_spec,
cluster_name,
self.hm_spec, self.az_spec,
self.flavor_id_spec, cluster_name)
self.flavor_id_spec)
if res is False:
return False, data

View File

@ -391,10 +391,10 @@ class TestLoadBalancingPolicy(base.SenlinTestCase):
self.assertEqual('policy_data', data)
self.lb_driver.lb_create.assert_called_once_with(policy.vip_spec,
policy.pool_spec,
cluster_name,
policy.hm_spec,
policy.az_spec,
policy.flavor_id_spec,
cluster_name)
policy.flavor_id_spec)
member_add_calls = [
mock.call(node1, 'LB_ID', 'POOL_ID', 80, 'internal-subnet'),
mock.call(node2, 'LB_ID', 'POOL_ID', 80, 'internal-subnet')