Merge "Remove serverId lookup in volume attachments"

This commit is contained in:
Jenkins 2012-03-29 23:49:27 +00:00 committed by Gerrit Code Review
commit 262886b297

View File

@ -860,8 +860,7 @@ def do_volume_list(cs, args):
# Create a list of servers to which the volume is attached
for vol in volumes:
servers = [s.get('server_id') or s.get('serverId')
for s in vol.attachments]
servers = [s.get('server_id') for s in vol.attachments]
setattr(vol, 'attached_to', ','.join(map(str, servers)))
utils.print_list(volumes, ['ID', 'Status', 'Display Name',
'Size', 'Volume Type', 'Attached to'])