Skip to content

Commit cd8fc60

Browse files
committed
fixed code review comments. Added more code to check for null values in volume detail page.
1 parent fc01207 commit cd8fc60

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

SoftLayer/CLI/file/detail.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ def cli(env, volume_id):
7878

7979
if file_volume['activeTransactions']:
8080
for trans in file_volume['activeTransactions']:
81-
table.add_row([
82-
'Ongoing Transactions',
83-
trans['transactionStatus']['friendlyName']])
81+
if trans['transactionStatus'] and trans['transactionStatus']['friendlyName']:
82+
table.add_row([
83+
'Ongoing Transactions',
84+
trans['transactionStatus']['friendlyName']])
8485

85-
table.add_row(['Replicant Count', "%u"
86+
if file_volume['replicationPartnerCount']:
87+
table.add_row(['Replicant Count', "%u"
8688
% file_volume['replicationPartnerCount']])
8789

8890
if file_volume['replicationPartnerCount'] > 0:

SoftLayer/CLI/file/modify.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
'Potential Sizes: [20, 40, 80, 100, 250, '
2121
'500, 1000, 2000, 4000, 8000, 12000] '
2222
'Minimum: [the size of the origin volume] '
23-
'Maximum: [the minimum of 12000 GB or '
24-
'10*(origin volume size)]')
23+
'Maximum: [the minimum of 12000 GB.')
2524
@click.option('--new-iops', '-i',
2625
type=int,
2726
help='Performance Storage IOPS, between 100 and 6000 in '

0 commit comments

Comments
 (0)