Skip to content

Commit

Permalink
Merge "Adds support for autogenerated device on attach"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 15, 2012
2 parents b97262d + 3a521ee commit 2819b2a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions novaclient/v1_1/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,17 @@ def do_volume_delete(cs, args):
metavar='<volume>',
help='ID of the volume to attach.')
@utils.arg('device', metavar='<device>',
help='Name of the device e.g. /dev/vdb.')
help='Name of the device e.g. /dev/vdb. '
'Use "auto" for autoassign (if supported)')
def do_volume_attach(cs, args):
"""Attach a volume to a server."""
cs.volumes.create_server_volume(_find_server(cs, args.server).id,
args.volume,
args.device)
if args.device == 'auto':
args.device = None

volume = cs.volumes.create_server_volume(_find_server(cs, args.server).id,
args.volume,
args.device)
_print_volume(volume)


@utils.arg('server',
Expand Down

0 comments on commit 2819b2a

Please sign in to comment.