~rconradharris/nova/flavor_min_filter

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/api.py

  • Committer: Tarmac
  • Author(s): Soren Hansen
  • Date: 2011-09-17 18:00:25 UTC
  • mfrom: (1523.3.9 secgroup-fixes)
  • Revision ID: tarmac-20110917180025-2418qcph0lzptvnw
Fix a bug that would make spawning new instances fail if no port/protocol is given (for rules granting access for other security groups).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2827
2827
        result = session.query(models.SecurityGroupIngressRule).\
2828
2828
                         filter_by(deleted=can_read_deleted(context)).\
2829
2829
                         filter_by(parent_group_id=security_group_id).\
 
2830
                         options(joinedload_all('grantee_group')).\
2830
2831
                         all()
2831
2832
    else:
2832
2833
        # TODO(vish): Join to group and check for project_id
2833
2834
        result = session.query(models.SecurityGroupIngressRule).\
2834
2835
                         filter_by(deleted=False).\
2835
2836
                         filter_by(parent_group_id=security_group_id).\
 
2837
                         options(joinedload_all('grantee_group')).\
2836
2838
                         all()
2837
2839
    return result
2838
2840