File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,14 @@ def cli(env, volume_id):
2323 table .align ['Name' ] = 'r'
2424 table .align ['Value' ] = 'l'
2525
26+ capacity = '0'
27+ if block_volume ['capacityGb' ] != '' :
28+ capacity = "%iGB" % block_volume ['capacityGb' ]
2629 storage_type = block_volume ['storageType' ]['keyName' ].split ('_' ).pop (0 )
2730 table .add_row (['ID' , block_volume ['id' ]])
2831 table .add_row (['Username' , block_volume ['username' ]])
2932 table .add_row (['Type' , storage_type ])
30- table .add_row (['Capacity (GB)' , "%iGB" % block_volume [ 'capacityGb' ] ])
33+ table .add_row (['Capacity (GB)' , capacity ])
3134 table .add_row (['LUN Id' , "%s" % block_volume ['lunId' ]])
3235
3336 if block_volume .get ('provisionedIops' ):
Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ def cli(env, volume_id):
2222 table = formatting .KeyValueTable (['Name' , 'Value' ])
2323 table .align ['Name' ] = 'r'
2424 table .align ['Value' ] = 'l'
25-
25+ capacity = '0'
26+ if file_volume ['capacityGb' ] != '' :
27+ capacity = "%iGB" % file_volume ['capacityGb' ]
2628 storage_type = file_volume ['storageType' ]['keyName' ].split ('_' ).pop (0 )
2729 table .add_row (['ID' , file_volume ['id' ]])
2830 table .add_row (['Username' , file_volume ['username' ]])
2931 table .add_row (['Type' , storage_type ])
30- table .add_row (['Capacity (GB)' , "%iGB" % file_volume [ 'capacityGb' ] ])
32+ table .add_row (['Capacity (GB)' , capacity ])
3133
3234 used_space = int (file_volume ['bytesUsed' ]) \
3335 if file_volume ['bytesUsed' ] else 0
You can’t perform that action at this time.
0 commit comments