From 512ed7e72a9ea01ed2b90aac31e97939d5e804d4 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Sun, 6 Mar 2016 15:53:37 +0200 Subject: [PATCH] Add missing translation to LBaaSv2 listener Protocol translation was missing for application profile template field. Change-Id: If42773b79814e16b3e7820c580cfce5192c5025c --- vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py | 2 +- vmware_nsx/tests/unit/nsx_v/test_edge_loadbalancer_driver_v2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py b/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py index 7920fae28f..50879c32b1 100644 --- a/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py +++ b/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py @@ -35,7 +35,7 @@ def listener_to_edge_app_profile(listener, edge_cert_id): 'name': listener.id, 'serverSslEnabled': False, 'sslPassthrough': False, - 'template': listener.protocol, + 'template': lb_const.PROTOCOL_MAP[listener.protocol], } if (listener.protocol == lb_const.LB_PROTOCOL_HTTPS diff --git a/vmware_nsx/tests/unit/nsx_v/test_edge_loadbalancer_driver_v2.py b/vmware_nsx/tests/unit/nsx_v/test_edge_loadbalancer_driver_v2.py index 2920092ce2..4dca29cc48 100644 --- a/vmware_nsx/tests/unit/nsx_v/test_edge_loadbalancer_driver_v2.py +++ b/vmware_nsx/tests/unit/nsx_v/test_edge_loadbalancer_driver_v2.py @@ -38,7 +38,7 @@ LISTENER_ID = 'xxx-111' EDGE_APP_PROFILE_ID = 'appp-x' EDGE_APP_PROF_DEF = {'sslPassthrough': False, 'insertXForwardedFor': False, 'serverSslEnabled': False, 'name': LISTENER_ID, - 'template': 'HTTP'} + 'template': 'http'} EDGE_VIP_ID = 'vip-aaa' EDGE_VIP_DEF = {'protocol': 'http', 'name': 'vip_' + LISTENER_ID, 'connectionLimit': 0, 'defaultPoolId': None,