Browse Source

Octavia driver: rule list can be None in L7 policy

While converting an Octavia L7 rule object to a dict, the code should
handle the case when a L7 policy that is nested beneath the rule has a
None rule list.

Change-Id: Icae93a9e1cb1d5f09f4952fdfc1c2a1e3ad29123
changes/44/788444/1
Kobi Samoray 2 months ago
parent
commit
a8846ad60a
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      vmware_nsx/services/lbaas/octavia/octavia_driver.py

+ 2
- 0
vmware_nsx/services/lbaas/octavia/octavia_driver.py View File

@ -378,6 +378,8 @@ class NSXOctaviaDriver(driver_base.ProviderDriver):
# During create operations, the created rule will not be
# retrieved from Octavia DB, as it is updated later on
if policy_dict.get('rules') is None:
policy_dict['rules'] = []
if (obj_dict['l7rule_id'] not in
[r['l7rule_id'] for r in
policy_dict.get('rules', [])]):


Loading…
Cancel
Save