Permalink
Browse files

Merge "Handle server_id and serverId in volume list" into milestone-p…

…roposed
  • Loading branch information...
2 parents 10d226f + dcd9065 commit 45fb6b6de89eaec642ecbf755af45fd55f8224d4 Jenkins committed with openstack-gerrit Mar 28, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 novaclient/v1_1/shell.py
View
3 novaclient/v1_1/shell.py
@@ -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'])

0 comments on commit 45fb6b6

Please sign in to comment.