Fix a bug that would make spawning new instances fail if no port/protocol is given (for rules granting access for other security groups).
This commit is contained in:
commit
8f64eda6d2
@ -2827,12 +2827,14 @@ def security_group_rule_get_by_security_group(context, security_group_id,
|
||||
result = session.query(models.SecurityGroupIngressRule).\
|
||||
filter_by(deleted=can_read_deleted(context)).\
|
||||
filter_by(parent_group_id=security_group_id).\
|
||||
options(joinedload_all('grantee_group')).\
|
||||
all()
|
||||
else:
|
||||
# TODO(vish): Join to group and check for project_id
|
||||
result = session.query(models.SecurityGroupIngressRule).\
|
||||
filter_by(deleted=False).\
|
||||
filter_by(parent_group_id=security_group_id).\
|
||||
options(joinedload_all('grantee_group')).\
|
||||
all()
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user