@@ -65,11 +65,11 @@ def _find_volume_snapshot(cs, snapshot):
6565 return utils .find_resource (cs .volume_snapshots , snapshot )
6666
6767
68- def _print_volume (cs , volume ):
68+ def _print_volume (volume ):
6969 utils .print_dict (volume ._info )
7070
7171
72- def _print_volume_snapshot (cs , snapshot ):
72+ def _print_volume_snapshot (snapshot ):
7373 utils .print_dict (snapshot ._info )
7474
7575
@@ -152,7 +152,7 @@ def do_list(cs, args):
152152def do_show (cs , args ):
153153 """Show details about a volume."""
154154 volume = _find_volume (cs , args .volume )
155- _print_volume (cs , volume )
155+ _print_volume (volume )
156156
157157
158158@utils .arg ('size' ,
@@ -221,14 +221,15 @@ def do_create(cs, args):
221221 if args .metadata is not None :
222222 volume_metadata = _extract_metadata (args .metadata )
223223
224- cs .volumes .create (args .size ,
225- args .snapshot_id ,
226- args .display_name ,
227- args .display_description ,
228- args .volume_type ,
229- availability_zone = args .availability_zone ,
230- imageRef = args .image_id ,
231- metadata = volume_metadata )
224+ volume = cs .volumes .create (args .size ,
225+ args .snapshot_id ,
226+ args .display_name ,
227+ args .display_description ,
228+ args .volume_type ,
229+ availability_zone = args .availability_zone ,
230+ imageRef = args .image_id ,
231+ metadata = volume_metadata )
232+ _print_volume (volume )
232233
233234
234235@utils .arg ('volume' , metavar = '<volume>' , help = 'ID of the volume to delete.' )
@@ -291,7 +292,7 @@ def do_snapshot_list(cs, args):
291292def do_snapshot_show (cs , args ):
292293 """Show details about a snapshot."""
293294 snapshot = _find_volume_snapshot (cs , args .snapshot )
294- _print_volume_snapshot (cs , snapshot )
295+ _print_volume_snapshot (snapshot )
295296
296297
297298@utils .arg ('volume_id' ,
@@ -322,10 +323,11 @@ def do_snapshot_show(cs, args):
322323@utils .service_type ('volume' )
323324def do_snapshot_create (cs , args ):
324325 """Add a new snapshot."""
325- cs .volume_snapshots .create (args .volume_id ,
326- args .force ,
327- args .display_name ,
328- args .display_description )
326+ snapshot = cs .volume_snapshots .create (args .volume_id ,
327+ args .force ,
328+ args .display_name ,
329+ args .display_description )
330+ _print_volume_snapshot (snapshot )
329331
330332
331333@utils .arg ('snapshot_id' ,
0 commit comments