Skip to content

Commit

Permalink
Merge "Handle server_id and serverId in volume list" into milestone-p…
Browse files Browse the repository at this point in the history
…roposed
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 28, 2012
2 parents 10d226f + dcd9065 commit 45fb6b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion novaclient/v1_1/shell.py
Expand Up @@ -860,7 +860,8 @@ def do_volume_list(cs, args):

# Create a list of servers to which the volume is attached
for vol in volumes:
servers = [server.get('serverId') for server in vol.attachments]
servers = [s.get('server_id') or s.get('serverId')
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'])
Expand Down

0 comments on commit 45fb6b6

Please sign in to comment.