Merge "NSXv3: Fix LB pool algorithm"
This commit is contained in:
commit
e844e2204b
@ -86,6 +86,11 @@ NSXV3_MONITOR_MAP = {LB_HEALTH_MONITOR_PING: 'LbIcmpMonitor',
|
||||
LB_HEALTH_MONITOR_TCP: 'LbTcpMonitor',
|
||||
LB_HEALTH_MONITOR_HTTP: 'LbHttpMonitor',
|
||||
LB_HEALTH_MONITOR_HTTPS: 'LbHttpsMonitor'}
|
||||
LB_POOL_ALGORITHM_MAP = {
|
||||
LB_METHOD_ROUND_ROBIN: 'WEIGHTED_ROUND_ROBIN',
|
||||
LB_METHOD_LEAST_CONNECTIONS: 'LEAST_CONNECTION',
|
||||
LB_METHOD_SOURCE_IP: 'IP_HASH',
|
||||
}
|
||||
LB_STATS_MAP = {'active_connections': 'current_sessions',
|
||||
'bytes_in': 'bytes_in',
|
||||
'bytes_out': 'bytes_out',
|
||||
|
@ -44,11 +44,12 @@ class EdgePoolManager(base_mgr.Nsxv3LoadbalancerBaseManager):
|
||||
tags = lb_utils.get_tags(self.core_plugin, pool.id,
|
||||
lb_const.LB_POOL_TYPE, pool.tenant_id,
|
||||
context.project_name)
|
||||
lb_algorithm = lb_const.LB_POOL_ALGORITHM_MAP.get(pool.lb_algorithm)
|
||||
try:
|
||||
snat_translation = {'type': "LbSnatAutoMap"}
|
||||
lb_pool = pool_client.create(display_name=pool_name,
|
||||
tags=tags,
|
||||
algorithm=pool.lb_algorithm,
|
||||
algorithm=lb_algorithm,
|
||||
snat_translation=snat_translation)
|
||||
nsx_db.add_nsx_lbaas_pool_binding(
|
||||
context.session, lb_id, pool.id, lb_pool['id'])
|
||||
|
Loading…
Reference in New Issue
Block a user