Skip to content

Commit 02d6452

Browse files
Merge pull request #2063 from softlayer/jayasilan-issue2017
Example for slcli block volume-modify, slcli block volume-options #2017
2 parents d10ca03 + fbd9051 commit 02d6452

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

SoftLayer/CLI/block/modify.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@
3333
type=click.Choice(['0.25', '2', '4', '10']))
3434
@environment.pass_env
3535
def cli(env, volume_id, new_size, new_iops, new_tier):
36-
"""Modify an existing block storage volume."""
36+
"""Modify an existing block storage volume.
37+
38+
Example::
39+
slcli block volume-modify 12345678 --new-size 1000 --new-iops 4000
40+
This command modify a volume 12345678 with size is 1000GB, IOPS is 4000.
41+
42+
slcli block volume-modify 12345678 --new-size 500 --new-tier 4
43+
This command modify a volume 12345678 with size is 500GB, tier level is 4 IOPS per GB.
44+
"""
45+
3746
block_manager = SoftLayer.BlockStorageManager(env.client)
3847

3948
if new_tier is not None:

SoftLayer/CLI/block/options.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,23 @@
1919
'add it to the --prices option using location short name, e.g. --prices dal13')
2020
@environment.pass_env
2121
def cli(env, prices, location=None):
22-
"""List all options for ordering a block storage"""
22+
"""List all options for ordering a block storage
23+
24+
Example::
25+
slcli block volume-options
26+
This command lists all options for creating a \
27+
block storage volume, including storage type, volume size, OS type, IOPS, tier level, datacenter, and snapshot size.
28+
29+
slcli block volume-options --prices
30+
This command lists all options for creating a \
31+
block storage volume, including storage type, volume size, OS type, IOPS, tier level, \
32+
datacenter, and snapshot size along with prices.
33+
34+
slcli block volume-options --prices dal03
35+
This command lists all options for creating a \
36+
block storage volume, including storage type, volume size, \
37+
OS type, IOPS, tier level, datacenter, and snapshot size along with prices for a given location.
38+
"""
2339

2440
order_manager = SoftLayer.OrderingManager(env.client)
2541
items = order_manager.get_items(PACKAGE_STORAGE, mask="mask[categories]")

0 commit comments

Comments
 (0)