From 70e7dde8b7dbbcdf3e283c98ffd1c13e5d5650c6 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 10 Oct 2023 15:48:14 -0500 Subject: [PATCH 1/2] #2107 updating block|file volume-modify help messages --- SoftLayer/CLI/block/limit.py | 2 +- SoftLayer/CLI/block/modify.py | 19 +++++++++---------- SoftLayer/CLI/command.py | 9 ++++++--- SoftLayer/CLI/file/modify.py | 15 +++++++-------- SoftLayer/managers/storage.py | 6 +----- SoftLayer/managers/storage_utils.py | 6 ++---- SoftLayer/utils.py | 4 ++++ 7 files changed, 30 insertions(+), 31 deletions(-) diff --git a/SoftLayer/CLI/block/limit.py b/SoftLayer/CLI/block/limit.py index 7b64b0b98..6af71c9e3 100644 --- a/SoftLayer/CLI/block/limit.py +++ b/SoftLayer/CLI/block/limit.py @@ -23,7 +23,7 @@ def cli(env, sortby, datacenter): Example:: slcli block volume-limits This command lists the storage limits per datacenter for this account. -""" + """ block_manager = SoftLayer.BlockStorageManager(env.client) block_volumes = block_manager.list_block_volume_limit() diff --git a/SoftLayer/CLI/block/modify.py b/SoftLayer/CLI/block/modify.py index fac2af594..187ff8d7e 100644 --- a/SoftLayer/CLI/block/modify.py +++ b/SoftLayer/CLI/block/modify.py @@ -20,22 +20,21 @@ @click.option('--new-iops', '-i', type=int, help='Performance Storage IOPS, between 100 and 6000 in multiples of 100 [only for performance volumes] ' - '***If no IOPS value is specified, the original IOPS value of the volume will be used.***\n' - 'Requirements: [If original IOPS/GB for the volume is less than 0.3, new IOPS/GB must also be ' - 'less than 0.3. If original IOPS/GB for the volume is greater than or equal to 0.3, new IOPS/GB ' - 'for the volume must also be greater than or equal to 0.3.]') + '***If no IOPS value is specified, the original IOPS value of the volume will be used.***') @click.option('--new-tier', '-t', - help='Endurance Storage Tier (IOPS per GB) [only for endurance volumes] ' - '***If no tier is specified, the original tier of the volume will be used.***\n' - 'Requirements: [If original IOPS/GB for the volume is 0.25, new IOPS/GB for the volume must also ' - 'be 0.25. If original IOPS/GB for the volume is greater than 0.25, new IOPS/GB for the volume ' - 'must also be greater than 0.25.]', + help='Endurance Storage Tier (IOPS per GB) [only for endurance volumes] Classic Choices: ' + '***If no tier is specified, the original tier of the volume will be used.***', type=click.Choice(['0.25', '2', '4', '10'])) @environment.pass_env def cli(env, volume_id, new_size, new_iops, new_tier): - """Modify an existing block storage volume. + """Modify an existing block storage volume. Choices. + + Valid size and iops options can be found here: + https://cloud.ibm.com/docs/BlockStorage/index.html#provisioning-considerations + https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-orderingBlockStorage&interface=cli Example:: + slcli block volume-modify 12345678 --new-size 1000 --new-iops 4000 This command modify a volume 12345678 with size is 1000GB, IOPS is 4000. diff --git a/SoftLayer/CLI/command.py b/SoftLayer/CLI/command.py index b38f89d7c..b64232014 100644 --- a/SoftLayer/CLI/command.py +++ b/SoftLayer/CLI/command.py @@ -28,6 +28,8 @@ class OptionHighlighter(RegexHighlighter): r"(?P