Browse Source

NSX|P: Fix Octavia pool create with no listener

Change-Id: I1235272bae70f027ef1782786964bb35a4a67930
changes/52/779152/1
asarfaty 1 month ago
committed by Adit Sarfaty
parent
commit
e2df1de2b8
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      vmware_nsx/services/lbaas/nsx_p/implementation/pool_mgr.py

+ 3
- 2
vmware_nsx/services/lbaas/nsx_p/implementation/pool_mgr.py View File

@ -114,7 +114,7 @@ class EdgePoolManagerFromDict(base_mgr.NsxpLoadbalancerBaseManager):
# NOTE(salv-orlando): Guard against accidental compat breakages
try:
listener = pool['listener'] or pool['listeners'][0]
listener = pool.get('listener') or pool.get('listeners', [])[0]
except IndexError:
# If listeners is an empty list we hit this exception
listener = None
@ -166,7 +166,8 @@ class EdgePoolManagerFromDict(base_mgr.NsxpLoadbalancerBaseManager):
description = new_pool['description']
# NOTE(salv-orlando): Guard against accidental compat breakages
try:
listener = new_pool['listener'] or new_pool['listeners'][0]
listener = (new_pool.get('listener') or
new_pool.get('listeners', [])[0])
except IndexError:
# If listeners is an empty list we hit this exception
listener = None


Loading…
Cancel
Save