Merge "Fix UDP pool transform in LVS driver"
This commit is contained in:
commit
ec2f89830d
@ -136,8 +136,8 @@ class LvsJinjaTemplater(object):
|
||||
ret_value = {
|
||||
'id': pool.id,
|
||||
'protocol': PROTOCOL_MAP[pool.protocol],
|
||||
'lb_algorithm': BALANCE_MAP.get(pool.lb_algorithm,
|
||||
'roundrobin'),
|
||||
'lb_algorithm': (BALANCE_MAP.get(pool.lb_algorithm) or
|
||||
BALANCE_MAP[constants.LB_ALGORITHM_ROUND_ROBIN]),
|
||||
'members': [],
|
||||
'health_monitor': '',
|
||||
'session_persistence': '',
|
||||
|
@ -265,6 +265,15 @@ class TestLvsCfg(base.TestCase):
|
||||
ret = self.udp_jinja_cfg._transform_pool(in_pool)
|
||||
self.assertEqual(sample_configs_combined.RET_UDP_POOL, ret)
|
||||
|
||||
in_pool = sample_configs_combined.sample_pool_tuple(
|
||||
proto=constants.PROTOCOL_UDP,
|
||||
persistence_type=constants.SESSION_PERSISTENCE_SOURCE_IP,
|
||||
persistence_timeout=33, persistence_granularity='255.0.0.0',
|
||||
lb_algorithm=None,
|
||||
)
|
||||
ret = self.udp_jinja_cfg._transform_pool(in_pool)
|
||||
self.assertEqual(sample_configs_combined.RET_UDP_POOL, ret)
|
||||
|
||||
in_pool = sample_configs_combined.sample_pool_tuple(
|
||||
proto=constants.PROTOCOL_UDP,
|
||||
persistence_type=constants.SESSION_PERSISTENCE_SOURCE_IP,
|
||||
|
@ -788,7 +788,8 @@ def sample_pool_tuple(listener_id=None, proto=None, monitor=True,
|
||||
hm_host_http_check=False,
|
||||
provisioning_status=constants.ACTIVE,
|
||||
tls_ciphers=constants.CIPHERS_OWASP_SUITE_B,
|
||||
tls_versions=constants.TLS_VERSIONS_OWASP_SUITE_B):
|
||||
tls_versions=constants.TLS_VERSIONS_OWASP_SUITE_B,
|
||||
lb_algorithm=constants.LB_ALGORITHM_ROUND_ROBIN):
|
||||
proto = 'HTTP' if proto is None else proto
|
||||
if not tls_enabled:
|
||||
tls_ciphers = None
|
||||
@ -836,7 +837,7 @@ def sample_pool_tuple(listener_id=None, proto=None, monitor=True,
|
||||
return in_pool(
|
||||
id=id,
|
||||
protocol=proto,
|
||||
lb_algorithm='ROUND_ROBIN',
|
||||
lb_algorithm=lb_algorithm,
|
||||
members=members,
|
||||
health_monitor=mon,
|
||||
session_persistence=persis if persistence is True else None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user