Browse Source

NSXv: Handle pool listeners list

Listeners can exist in either .listener property or .listeners

Change-Id: Ic9e8f9f02764bf97593e7683a01fc8ad367add8c
changes/96/661596/2
Kobi Samoray 2 years ago
committed by Adit Sarfaty
parent
commit
ef2e1aaa60
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      vmware_nsx/services/lbaas/nsx_v/v2/pool_mgr.py

+ 8
- 3
vmware_nsx/services/lbaas/nsx_v/v2/pool_mgr.py View File

@ -64,13 +64,18 @@ class EdgePoolManager(base_mgr.EdgeLoadbalancerBaseManager):
pool.id,
edge_pool_id)
if pool.listener:
try:
listener = pool.listener or pool.listeners[0]
except IndexError:
listener = None
if listener:
listener_binding = nsxv_db.get_nsxv_lbaas_listener_binding(
context.session, lb_id, pool.listener.id)
context.session, lb_id, listener.id)
# Associate listener with pool
vse = listener_mgr.listener_to_edge_vse(
context,
pool.listener,
listener,
lb_binding['vip_address'],
edge_pool_id,
listener_binding['app_profile_id'])


Loading…
Cancel
Save