Browse Source

Merge "Ensure that default SG exists during list of SG rules API call" into stable/queens

changes/88/715188/1
Zuul 4 months ago
committed by Gerrit Code Review
parent
commit
f465fed028
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      neutron/db/securitygroups_db.py

+ 8
- 0
neutron/db/securitygroups_db.py View File

@@ -679,6 +679,14 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
pager = base_obj.Pager(
sorts=sorts, marker=marker, limit=limit, page_reverse=page_reverse)

project_id = filters.get('project_id') or filters.get('tenant_id')
if project_id:
project_id = project_id[0]
else:
project_id = context.project_id
if project_id:
self._ensure_default_security_group(context, project_id)

# NOTE(slaweq): use admin context here to be able to get all rules
# which fits filters' criteria. Later in policy engine rules will be
# filtered and only those which are allowed according to policy will


Loading…
Cancel
Save