Comment 6 for bug 1327406

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote : Re: OS::Heat::AutoScalingGroup scale up fails to find networks

Assuming that when a nova network's project_id field in the database is null this means the network is public, I would think the bug is in Nova's nova/network/api.py, where class API has the following method:

wrap_check_policy
    def get_all(self, context):
        """Get all the networks.

        If it is an admin user, api will return all the networks,
        if it is a normal user, api will only return the networks which
        belong to the user's project.
        """
        try:
            return self.db.network_get_all(context, project_only=True)
        except exception.NoNetworksFound:
            return

The call on network_get_all should pass project_only="allow_none" instead of True.