"security_group_rules" is not a SG selectable field
When building the security group dictionary, it is not needed to build the security group rules objects individually. These objects (OVO) are built along with the security group OVO and added in the result dictionary in ``_make_security_group_dict``. Related-Bug: #2083682 Change-Id: I66fbf8487b390f7685ef0a4e44c3f58b79cab05f
This commit is contained in:
parent
adbc3e23b7
commit
232d1d26ea
@ -199,12 +199,6 @@ class SecurityGroupDbMixin(
|
||||
with db_api.CONTEXT_READER.using(context):
|
||||
sg = self._get_security_group(context, id, fields=fields)
|
||||
ret = self._make_security_group_dict(context, sg, fields)
|
||||
if (fields is None or len(fields) == 0 or
|
||||
'security_group_rules' in fields):
|
||||
rules = self.get_security_group_rules(
|
||||
context_lib.get_admin_context(),
|
||||
{'security_group_id': [id]})
|
||||
ret['security_group_rules'] = rules
|
||||
|
||||
finally:
|
||||
if tenant_id:
|
||||
|
Loading…
x
Reference in New Issue
Block a user