From da9fdc60d7ff0895c7ab3a2a10ddd19ced5f6e4a Mon Sep 17 00:00:00 2001 From: caberos Date: Tue, 19 Jul 2022 11:11:19 -0400 Subject: [PATCH] block|file volume-options improvements --- SoftLayer/CLI/block/options.py | 7 +++++-- SoftLayer/CLI/file/options.py | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/SoftLayer/CLI/block/options.py b/SoftLayer/CLI/block/options.py index 7a020d68f..e42e5fbc3 100644 --- a/SoftLayer/CLI/block/options.py +++ b/SoftLayer/CLI/block/options.py @@ -22,9 +22,12 @@ def cli(env): iops_table = formatting.Table(['Id', 'Description', 'KeyName'], title='IOPS') snapshot_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Snapshot') - storage_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Storage') + storage_table = formatting.Table(['Id', 'Description', 'KeyName', 'Capacity Minimum'], title='Storage') datacenter_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Datacenter') + storage_table.align['Description'] = 'l' + storage_table.align['KeyName'] = 'l' + storage_table.sortby = 'Id' for datacenter in datacenters: datacenter_table.add_row([datacenter['location']['locationId'], datacenter.get('description'), @@ -33,7 +36,7 @@ def cli(env): for item in items: if item['itemCategory']['categoryCode'] == 'performance_storage_space': storage_table.add_row([item.get('id'), item.get('description'), - item.get('keyName')]) + item.get('keyName'), item.get('capacityMinimum') or '-']) if item['itemCategory']['categoryCode'] == 'storage_tier_level': iops_table.add_row([item.get('id'), item.get('description'), diff --git a/SoftLayer/CLI/file/options.py b/SoftLayer/CLI/file/options.py index f2ca734b9..dfaa3f1ed 100644 --- a/SoftLayer/CLI/file/options.py +++ b/SoftLayer/CLI/file/options.py @@ -8,7 +8,6 @@ from SoftLayer.CLI import environment from SoftLayer.CLI import formatting - PACKAGE_STORAGE = 759 @@ -23,9 +22,12 @@ def cli(env): iops_table = formatting.Table(['Id', 'Description', 'KeyName'], title='IOPS') snapshot_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Snapshot') - storage_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Storage') + file_storage_table = formatting.Table(['Id', 'Description', 'KeyName', 'Capacity Minimum'], title='Storage') datacenter_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Datacenter') + file_storage_table.align['Description'] = 'l' + file_storage_table.align['KeyName'] = 'l' + file_storage_table.sortby = 'Id' for datacenter in datacenters: datacenter_table.add_row([datacenter['location']['locationId'], datacenter.get('description'), @@ -33,8 +35,8 @@ def cli(env): for item in items: if item['itemCategory']['categoryCode'] == 'performance_storage_space': - storage_table.add_row([item.get('id'), item.get('description'), - item.get('keyName')]) + file_storage_table.add_row([item.get('id'), item.get('description'), + item.get('keyName'), item.get('capacityMinimum') or '-']) if item['itemCategory']['categoryCode'] == 'storage_tier_level': iops_table.add_row([item.get('id'), item.get('description'), @@ -46,5 +48,5 @@ def cli(env): env.fout(datacenter_table) env.fout(iops_table) - env.fout(storage_table) + env.fout(file_storage_table) env.fout(snapshot_table)