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.
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, network_ get_all( context, project_only=True) NoNetworksFound :
if it is a normal user, api will only return the networks which
belong to the user's project.
"""
try:
return self.db.
except exception.
return
The call on network_get_all should pass project_ only="allow_ none" instead of True.