diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-09-21 21:56:06 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-09-21 21:56:06 +0000 |
commit | cdebf729b06d9465ab080fd5b15e433f70f8fe45 (patch) | |
tree | 212d6f2f397386aaf9bbe4cf14b0775152443b7e | |
parent | e01c25bdb18fdc6f5f16db6b3df8865bf569af51 (diff) | |
parent | 02d3aaddf2e3dac92418455a5f4639d6f6e0764c (diff) | |
download | python-novaclient-2.9.0.tar.gz |
Merge "Show volume and snapshot data on create"2.9.0
-rw-r--r-- | novaclient/v1_1/shell.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index d4774d23..1bced411 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -1140,13 +1140,14 @@ def do_volume_show(cs, args): @utils.service_type('volume') def do_volume_create(cs, args): """Add a new volume.""" - cs.volumes.create(args.size, - args.snapshot_id, - args.display_name, - args.display_description, - args.volume_type, - args.availability_zone, - imageRef=args.image_id) + volume = cs.volumes.create(args.size, + args.snapshot_id, + args.display_name, + args.display_description, + args.volume_type, + args.availability_zone, + imageRef=args.image_id) + _print_volume(volume) @utils.arg('volume', metavar='<volume>', help='ID of the volume to delete.') @@ -1229,10 +1230,11 @@ def do_volume_snapshot_show(cs, args): @utils.service_type('volume') def do_volume_snapshot_create(cs, args): """Add a new snapshot.""" - cs.volume_snapshots.create(args.volume_id, - args.force, - args.display_name, - args.display_description) + snapshot = cs.volume_snapshots.create(args.volume_id, + args.force, + args.display_name, + args.display_description) + _print_volume_snapshot(snapshot) @utils.arg('snapshot_id', |