Skip to content

Commit 6dd6159

Browse files
skraghusudorandom
authored andcommitted
Enable slcli file and block storage commands to order tier 10 endurance storage and replica (#782)
* Changes to File volume list and detail commands to display NFS MountPoint for Volumes * Enable slcli file and block storage commands to order tier 10 endurance storage and replica
1 parent 4511ad4 commit 6dd6159

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

SoftLayer/CLI/block/order.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@click.option('--tier',
2828
help='Endurance Storage Tier (IOP per GB)'
2929
' [required for storage-type endurance]',
30-
type=click.Choice(['0.25', '2', '4']))
30+
type=click.Choice(['0.25', '2', '4', '10']))
3131
@click.option('--os-type',
3232
help='Operating System',
3333
type=click.Choice([
@@ -88,7 +88,9 @@ def cli(env, storage_type, size, iops, tier, os_type,
8888
if storage_type == 'endurance':
8989
if tier is None:
9090
raise exceptions.CLIAbort(
91-
'Option --tier required with Endurance in IOPS/GB [0.25,2,4]')
91+
'Option --tier required with Endurance in IOPS/GB '
92+
'[0.25,2,4,10]'
93+
)
9294

9395
try:
9496
order = block_manager.order_block_volume(

SoftLayer/CLI/block/replication/order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@click.option('--tier',
2525
help='Endurance Storage Tier (IOPS per GB) of the primary'
2626
' volume for which a replicant is ordered [optional]',
27-
type=click.Choice(['0.25', '2', '4']))
27+
type=click.Choice(['0.25', '2', '4', '10']))
2828
@click.option('--os-type',
2929
help='Operating System Type (e.g.: LINUX) of the primary'
3030
' volume for which a replica is ordered [optional]',

SoftLayer/CLI/file/order.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@click.option('--tier',
2828
help='Endurance Storage Tier (IOP per GB)'
2929
' [required for storage-type endurance]',
30-
type=click.Choice(['0.25', '2', '4']))
30+
type=click.Choice(['0.25', '2', '4', '10']))
3131
@click.option('--os-type',
3232
help='Operating System',
3333
type=click.Choice([
@@ -88,7 +88,9 @@ def cli(env, storage_type, size, iops, tier, os_type,
8888
if storage_type == 'endurance':
8989
if tier is None:
9090
raise exceptions.CLIAbort(
91-
'Option --tier required with Endurance in IOPS/GB [0.25,2,4]')
91+
'Option --tier required with Endurance in IOPS/GB '
92+
'[0.25,2,4,10]'
93+
)
9294

9395
try:
9496
order = file_manager.order_file_volume(

SoftLayer/CLI/file/replication/order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@click.option('--tier',
2525
help='Endurance Storage Tier (IOPS per GB) of the primary'
2626
' volume for which a replicant is ordered [optional]',
27-
type=click.Choice(['0.25', '2', '4']))
27+
type=click.Choice(['0.25', '2', '4', '10']))
2828
@environment.pass_env
2929
def cli(env, volume_id, snapshot_schedule, location, tier):
3030
"""Order a file storage replica volume."""

SoftLayer/managers/storage_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
0.25: 100,
1414
2: 200,
1515
4: 300,
16+
10: 1000,
1617
}
1718

1819

@@ -202,6 +203,9 @@ def find_endurance_tier_iops_per_gb(volume):
202203
if iops_per_gb == '4':
203204
return 4.0
204205

206+
if iops_per_gb == '10':
207+
return 10.0
208+
205209
raise ValueError("Could not find tier IOPS per GB for this volume")
206210

207211

0 commit comments

Comments
 (0)