Merge "Do not set log format when 'no log' is set"
This commit is contained in:
commit
d775d95fb9
octavia
common/jinja/haproxy
tests/unit
amphorae/backends/agent/api_server
common
jinja/haproxy
sample_configs
@ -260,8 +260,6 @@ class JinjaTemplater(object):
|
||||
'protocol': listener.protocol,
|
||||
'insert_headers': listener.insert_headers,
|
||||
'enabled': listener.enabled,
|
||||
'user_log_format': self._format_log_string(loadbalancer,
|
||||
listener.protocol),
|
||||
'timeout_client_data': (
|
||||
listener.timeout_client_data or
|
||||
CONF.haproxy_amphora.timeout_client_data),
|
||||
@ -274,6 +272,9 @@ class JinjaTemplater(object):
|
||||
'timeout_tcp_inspect': (listener.timeout_tcp_inspect or
|
||||
CONF.haproxy_amphora.timeout_tcp_inspect),
|
||||
}
|
||||
if self.connection_logging:
|
||||
ret_value['user_log_format'] = (
|
||||
self._format_log_string(loadbalancer, listener.protocol))
|
||||
if listener.connection_limit and listener.connection_limit > -1:
|
||||
ret_value['connection_limit'] = listener.connection_limit
|
||||
else:
|
||||
|
@ -136,7 +136,6 @@ bind {{ lb_vip_address }}:{{ listener.protocol_port }} {{
|
||||
|
||||
{% macro frontend_macro(constants, listener, lb_vip_address) %}
|
||||
frontend {{ listener.id }}
|
||||
log-format {{ listener.user_log_format }}
|
||||
{% if listener.connection_limit is defined %}
|
||||
maxconn {{ listener.connection_limit }}
|
||||
{% endif %}
|
||||
@ -154,6 +153,9 @@ frontend {{ listener.id }}
|
||||
default_backend {{ listener.default_pool.id }}:{{ listener.id }}
|
||||
{% endif %}
|
||||
timeout client {{ listener.timeout_client_data }}
|
||||
{% if listener.user_log_format is defined %}
|
||||
log-format {{ listener.user_log_format }}
|
||||
{% endif %}
|
||||
{% if listener.timeout_tcp_inspect %}
|
||||
tcp-request inspect-delay {{ listener.timeout_tcp_inspect }}
|
||||
{% endif %}
|
||||
|
@ -246,8 +246,6 @@ class JinjaTemplater(object):
|
||||
'topology': listener.load_balancer.topology,
|
||||
'amphorae': listener.load_balancer.amphorae,
|
||||
'enabled': listener.enabled,
|
||||
'user_log_format': self._format_log_string(loadbalancer,
|
||||
listener.protocol),
|
||||
'timeout_client_data': (
|
||||
listener.timeout_client_data or
|
||||
CONF.haproxy_amphora.timeout_client_data),
|
||||
@ -260,6 +258,9 @@ class JinjaTemplater(object):
|
||||
'timeout_tcp_inspect': (listener.timeout_tcp_inspect or
|
||||
CONF.haproxy_amphora.timeout_tcp_inspect),
|
||||
}
|
||||
if self.connection_logging:
|
||||
ret_value['user_log_format'] = (
|
||||
self._format_log_string(loadbalancer, listener.protocol))
|
||||
if listener.connection_limit and listener.connection_limit > -1:
|
||||
ret_value['connection_limit'] = listener.connection_limit
|
||||
else:
|
||||
|
@ -139,7 +139,6 @@ bind {{ lb_vip_address }}:{{ listener.protocol_port }} {{
|
||||
|
||||
{% macro frontend_macro(constants, listener, lb_vip_address) %}
|
||||
frontend {{ listener.id }}
|
||||
log-format {{ listener.user_log_format }}
|
||||
{% if listener.connection_limit is defined %}
|
||||
maxconn {{ listener.connection_limit }}
|
||||
{% endif %}
|
||||
@ -157,6 +156,9 @@ frontend {{ listener.id }}
|
||||
default_backend {{ listener.default_pool.id }}
|
||||
{% endif %}
|
||||
timeout client {{ listener.timeout_client_data }}
|
||||
{% if listener.user_log_format is defined %}
|
||||
log-format {{ listener.user_log_format }}
|
||||
{% endif %}
|
||||
{% if listener.timeout_tcp_inspect %}
|
||||
tcp-request inspect-delay {{ listener.timeout_tcp_inspect }}
|
||||
{% endif %}
|
||||
|
@ -41,14 +41,15 @@ class HAProxyCompatTestCase(base.TestCase):
|
||||
" option splice-response\n"
|
||||
" option http-keep-alive\n\n\n\n"
|
||||
"frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ %tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
self.backend_without_external = (
|
||||
"backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
|
@ -35,10 +35,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" redirect scheme https if !{{ ssl_fc }}\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -50,7 +46,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"certs/sample_loadbalancer_id_1/SHA_ID.pem\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -89,10 +85,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls_no_sni(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" redirect scheme https if !{{ ssl_fc }}\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -100,7 +92,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"sample_loadbalancer_id_1/tls_container_id.pem\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -192,15 +184,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_custom_timeouts(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 2\n\n").format(
|
||||
" timeout client 2\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -231,15 +219,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_null_timeouts(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -299,16 +283,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_https_real_monitor(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -331,20 +315,20 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_combined.sample_amphora_tuple(),
|
||||
[sample_configs_combined.sample_listener_tuple(proto='HTTPS')])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_https_hello_monitor(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -367,7 +351,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
[sample_configs_combined.sample_listener_tuple(
|
||||
proto='HTTPS', monitor_proto='TLS-HELLO')])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_no_monitor_http(self):
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
@ -441,16 +425,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_no_monitor_https(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -469,7 +453,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
[sample_configs_combined.sample_listener_tuple(proto='HTTPS',
|
||||
monitor=False)])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_health_monitor_http_check(self):
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
@ -500,16 +484,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_no_persistence_https(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -525,7 +509,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
[sample_configs_combined.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False, persistence=False)])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_no_persistence_http(self):
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
@ -604,18 +588,18 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_listener = sample_configs_combined.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False)
|
||||
fe = ("frontend {listener_id}\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend {pool_id}:{listener_id}\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN,
|
||||
pool_id=sample_listener.default_pool.id,
|
||||
listener_id=sample_listener.id)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend {pool_id}:{listener_id}\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -635,19 +619,19 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_amphora,
|
||||
[sample_listener])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_limited_connections(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn 2014\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n")
|
||||
" timeout client 50000\n")
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -666,14 +650,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
[sample_configs_combined.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False, connection_limit=2014)])
|
||||
self.assertEqual(sample_configs_combined.sample_base_expected_config(
|
||||
frontend=fe, backend=be, global_opts=g_opts), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be, global_opts=g_opts),
|
||||
rendered_obj)
|
||||
|
||||
def test_render_template_l7policies(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
@ -698,7 +679,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
" redirect code 302 prefix https://example.com if "
|
||||
"!sample_l7rule_id_2 sample_l7rule_id_3\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -1051,7 +1032,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
)
|
||||
self.assertEqual(
|
||||
sample_configs_combined.sample_base_expected_config(
|
||||
defaults=defaults),
|
||||
defaults=defaults, logging="\n"),
|
||||
rendered_obj)
|
||||
|
||||
def test_http_reuse(self):
|
||||
@ -1124,10 +1105,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
base_amp_path='/var/lib/octavia',
|
||||
base_crt_dir='/var/lib/octavia/certs')
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{+Q}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn 1000000\n"
|
||||
" redirect scheme https if !{ ssl_fc }\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
@ -1164,7 +1141,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"if sample_l7rule_id_7 !sample_l7rule_id_8 !sample_l7rule_id_9 "
|
||||
"!sample_l7rule_id_10 sample_l7rule_id_11\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" timeout client 50000\n\n")
|
||||
" timeout client 50000\n")
|
||||
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
" balance roundrobin\n"
|
||||
|
@ -35,10 +35,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" redirect scheme https if !{{ ssl_fc }}\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -50,7 +46,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"certs/sample_listener_id_1/SHA_ID.pem\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -88,10 +84,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls_no_sni(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" redirect scheme https if !{{ ssl_fc }}\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -99,7 +91,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"sample_listener_id_1/tls_container_id.pem\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -190,15 +182,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_custom_timeouts(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 2\n\n").format(
|
||||
" timeout client 2\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -229,15 +217,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_null_timeouts(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -296,16 +280,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_https_real_monitor(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -328,20 +312,20 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_amphora_tuple(),
|
||||
sample_configs_split.sample_listener_tuple(proto='HTTPS'))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_https_hello_monitor(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -364,7 +348,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_listener_tuple(
|
||||
proto='HTTPS', monitor_proto='TLS-HELLO'))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_no_monitor_http(self):
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
@ -438,16 +422,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_no_monitor_https(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -466,7 +450,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_health_monitor_http_check(self):
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
@ -497,16 +481,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_no_persistence_https(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -522,7 +506,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False, persistence=False))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_no_persistence_http(self):
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
@ -598,16 +582,16 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_unlimited_connections(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -626,19 +610,19 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be), rendered_obj)
|
||||
|
||||
def test_render_template_limited_connections(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn 2014\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
" mode tcp\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n")
|
||||
" timeout client 50000\n")
|
||||
lg = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ -\\ -\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode tcp\n"
|
||||
" balance roundrobin\n"
|
||||
@ -657,14 +641,11 @@ class TestHaproxyCfg(base.TestCase):
|
||||
sample_configs_split.sample_listener_tuple(
|
||||
proto='HTTPS', monitor=False, connection_limit=2014))
|
||||
self.assertEqual(sample_configs_split.sample_base_expected_config(
|
||||
frontend=fe, backend=be, global_opts=g_opts), rendered_obj)
|
||||
frontend=fe, logging=lg, backend=be, global_opts=g_opts),
|
||||
rendered_obj)
|
||||
|
||||
def test_render_template_l7policies(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
@ -688,7 +669,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
" redirect code 302 prefix https://example.com if "
|
||||
"!sample_l7rule_id_2 sample_l7rule_id_3\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -1042,7 +1023,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
)
|
||||
self.assertEqual(
|
||||
sample_configs_split.sample_base_expected_config(
|
||||
defaults=defaults),
|
||||
defaults=defaults, logging="\n"),
|
||||
rendered_obj)
|
||||
|
||||
def test_http_reuse(self):
|
||||
@ -1108,10 +1089,6 @@ class TestHaproxyCfg(base.TestCase):
|
||||
base_amp_path='/var/lib/octavia',
|
||||
base_crt_dir='/var/lib/octavia/certs')
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{+Q}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn 1000000\n"
|
||||
" redirect scheme https if !{ ssl_fc }\n"
|
||||
" bind 10.0.0.2:443\n"
|
||||
@ -1147,7 +1124,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
"if sample_l7rule_id_7 !sample_l7rule_id_8 !sample_l7rule_id_9 "
|
||||
"!sample_l7rule_id_10 sample_l7rule_id_11\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n")
|
||||
" timeout client 50000\n")
|
||||
be = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
" balance roundrobin\n"
|
||||
|
@ -1034,21 +1034,22 @@ def sample_l7rule_tuple(id,
|
||||
enabled=enabled)
|
||||
|
||||
|
||||
def sample_base_expected_config(frontend=None, backend=None,
|
||||
def sample_base_expected_config(frontend=None, logging=None, backend=None,
|
||||
peers=None, global_opts=None, defaults=None):
|
||||
if frontend is None:
|
||||
frontend = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1:sample_listener_id_1"
|
||||
"\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
if logging is None:
|
||||
logging = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{+Q}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
if backend is None:
|
||||
backend = ("backend sample_pool_id_1:sample_listener_id_1\n"
|
||||
" mode http\n"
|
||||
@ -1088,4 +1089,4 @@ def sample_base_expected_config(frontend=None, backend=None,
|
||||
" log /run/rsyslog/octavia/log local1 notice\n"
|
||||
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
|
||||
" mode 0666 level user\n" +
|
||||
global_opts + defaults + peers + frontend + backend)
|
||||
global_opts + defaults + peers + frontend + logging + backend)
|
||||
|
@ -1053,20 +1053,21 @@ def sample_l7rule_tuple(id,
|
||||
enabled=enabled)
|
||||
|
||||
|
||||
def sample_base_expected_config(frontend=None, backend=None,
|
||||
def sample_base_expected_config(frontend=None, logging=None, backend=None,
|
||||
peers=None, global_opts=None, defaults=None):
|
||||
if frontend is None:
|
||||
frontend = ("frontend sample_listener_id_1\n"
|
||||
" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{{+Q}}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{{+Q}}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n"
|
||||
" maxconn {maxconn}\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
" default_backend sample_pool_id_1\n"
|
||||
" timeout client 50000\n\n").format(
|
||||
" timeout client 50000\n").format(
|
||||
maxconn=constants.HAPROXY_MAX_MAXCONN)
|
||||
if logging is None:
|
||||
logging = (" log-format 12345\\ sample_loadbalancer_id_1\\ %f\\ "
|
||||
"%ci\\ %cp\\ %t\\ %{+Q}r\\ %ST\\ %B\\ %U\\ "
|
||||
"%[ssl_c_verify]\\ %{+Q}[ssl_c_s_dn]\\ %b\\ %s\\ %Tt\\ "
|
||||
"%tsc\n\n")
|
||||
if backend is None:
|
||||
backend = ("backend sample_pool_id_1\n"
|
||||
" mode http\n"
|
||||
@ -1106,4 +1107,4 @@ def sample_base_expected_config(frontend=None, backend=None,
|
||||
" log /run/rsyslog/octavia/log local1 notice\n"
|
||||
" stats socket /var/lib/octavia/sample_listener_id_1.sock"
|
||||
" mode 0666 level user\n" +
|
||||
global_opts + defaults + peers + frontend + backend)
|
||||
global_opts + defaults + peers + frontend + logging + backend)
|
||||
|
Loading…
x
Reference in New Issue
Block a user