Merge "NSX|V: Keep existing members when updating LBaaS pool"
This commit is contained in:
commit
467329c1e9
@ -122,6 +122,10 @@ class EdgePoolManager(base_mgr.EdgeLoadbalancerBaseManager):
|
||||
if monitor_id:
|
||||
edge_pool['monitorId'] = monitor_id
|
||||
|
||||
# Keep the current members
|
||||
if org_edge_pool.get('member'):
|
||||
edge_pool['member'] = org_edge_pool['member']
|
||||
|
||||
self.vcns.update_pool(edge_id, edge_pool_id, edge_pool)
|
||||
|
||||
self.lbv2_driver.pool.successful_completion(context, new_pool)
|
||||
|
@ -430,12 +430,14 @@ class TestEdgeLbaasV2Pool(BaseTestEdgeLbaasV2):
|
||||
mock_get_pool_binding.return_value = POOL_BINDING
|
||||
fake_edge = EDGE_POOL_DEF.copy()
|
||||
fake_edge['monitorId'] = 'monitor-7'
|
||||
fake_edge['member'] = ['member1', 'member2']
|
||||
mock_get_pool.return_value = (None, fake_edge)
|
||||
self.edge_driver.pool.update(self.context, self.pool, new_pool)
|
||||
|
||||
edge_pool_def = EDGE_POOL_DEF.copy()
|
||||
edge_pool_def['algorithm'] = 'leastconn'
|
||||
edge_pool_def['monitorId'] = 'monitor-7'
|
||||
edge_pool_def['member'] = ['member1', 'member2']
|
||||
mock_upd_pool.assert_called_with(
|
||||
LB_EDGE_ID, EDGE_POOL_ID, edge_pool_def)
|
||||
mock_upd_app_prof.assert_called_with(LB_EDGE_ID,
|
||||
|
Loading…
x
Reference in New Issue
Block a user