Merge "Protect cinder list against permission issues"

This commit is contained in:
Jenkins 2016-02-16 09:48:31 +00:00 committed by Gerrit Code Review
commit 21963a2ad2

View File

@ -687,8 +687,12 @@ def transfer_list(request, detailed=True, search_opts=None):
search option: {'all_tenants': 1}
"""
c_client = cinderclient(request)
return [VolumeTransfer(v) for v in c_client.transfers.list(
detailed=detailed, search_opts=search_opts)]
try:
return [VolumeTransfer(v) for v in c_client.transfers.list(
detailed=detailed, search_opts=search_opts)]
except cinder_exception.Forbidden as error:
LOG.error(error)
return []
def transfer_get(request, transfer_id):