Browse Source

Merge "NSX|P: Fix Octavia pool create with no listener" into stable/train

changes/53/779453/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
2506e104eb
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