Merge "Add lb_id comment to amp haproxy listener config"

This commit is contained in:
Zuul 2018-07-18 23:35:52 +00:00 committed by Gerrit Code Review
commit 18da15188d
5 changed files with 7 additions and 21 deletions

View File

@ -145,7 +145,7 @@ class JinjaTemplater(object):
"""
t_listener = self._transform_listener(listener, tls_cert)
ret_value = {
'name': loadbalancer.name,
'id': loadbalancer.id,
'vip_address': loadbalancer.vip.ip_address,
'listener': t_listener,
'topology': loadbalancer.topology,

View File

@ -13,7 +13,7 @@
# under the License.
#
#}
# Configuration for {{ loadbalancer_name }}
# Configuration for loadbalancer {{ loadbalancer_id }}
global
daemon
user nobody

View File

@ -20,7 +20,7 @@
{% from 'macros.j2' import peers_macro %}
{% set loadbalancer_name = loadbalancer.name %}
{% set loadbalancer_id = loadbalancer.id %}
{% set usergroup = user_group %}
{% set sock_path = stats_sock %}

View File

@ -23,7 +23,7 @@ class HAProxyCompatTestCase(base.TestCase):
def setUp(self):
super(HAProxyCompatTestCase, self).setUp()
self.old_haproxy_global = (
"# Configuration for test-lb\n"
"# Configuration for loadbalancer sample_loadbalancer_id_1\n"
"global\n"
" daemon\n"
" user nobody\n"

View File

@ -320,30 +320,16 @@ RET_AMPHORA = {
RET_LB = {
'host_amphora': RET_AMPHORA,
'name': 'test-lb',
'id': 'sample_loadbalancer_id_1',
'vip_address': '10.0.0.2',
'listener': RET_LISTENER,
'topology': 'SINGLE',
'enabled': True,
'global_connection_limit': 98}
RET_LB_TLS = {
'name': 'test-lb',
'vip_address': '10.0.0.2',
'listener': RET_LISTENER_TLS,
'enabled': True,
'global_connection_limit': 98}
RET_LB_TLS_SNI = {
'name': 'test-lb',
'vip_address': '10.0.0.2',
'listener': RET_LISTENER_TLS_SNI,
'enabled': True,
'global_connection_limit': 98}
RET_LB_L7 = {
'host_amphora': RET_AMPHORA,
'name': 'test-lb',
'id': 'sample_loadbalancer_id_1',
'vip_address': '10.0.0.2',
'listener': RET_LISTENER_L7,
'topology': 'SINGLE',
@ -761,7 +747,7 @@ def sample_base_expected_config(frontend=None, backend=None,
" log global\n"
" retries 3\n"
" option redispatch\n\n")
return ("# Configuration for test-lb\n"
return ("# Configuration for loadbalancer sample_loadbalancer_id_1\n"
"global\n"
" daemon\n"
" user nobody\n"