ensure default security group exists when filter by project_id
now filter security groups by tenant_id, will auto ensure default security group, but project_id not. tenant_id is deprecated, we are used to filtering by project_id. Closes-bug: #1875849 Change-Id: I3f1a2698768e2d66811bb290a892a1b089dff4ed
This commit is contained in:
parent
4b02ed8225
commit
76fa308ca9
|
@ -165,7 +165,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase,
|
|||
# GETS. TODO(arosen) context handling can probably be improved here.
|
||||
filters = filters or {}
|
||||
if not default_sg and context.tenant_id:
|
||||
tenant_id = filters.get('tenant_id')
|
||||
tenant_id = filters.get('project_id') or filters.get('tenant_id')
|
||||
if tenant_id:
|
||||
tenant_id = tenant_id[0]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue