Skip to content

Commit fa6d3d1

Browse files
committed
slcli file snapshot-list, snapshot-order, snapshot-restore command example addition
1 parent bb5a260 commit fa6d3d1

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

SoftLayer/CLI/file/snapshot/list.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
default=','.join(DEFAULT_COLUMNS))
3636
@environment.pass_env
3737
def cli(env, volume_id, sortby, columns):
38-
"""List file storage snapshots."""
38+
"""List file storage snapshots.
39+
40+
Example::
41+
slcli file snapshot-list 12345678 --sortby id
42+
This command lists all snapshots of volume with ID 12345678 and sorts them by ID.
43+
"""
3944
file_manager = SoftLayer.FileStorageManager(env.client)
4045
resolved_id = helpers.resolve_id(file_manager.resolve_ids, volume_id, 'Volume Id')
4146
snapshots = file_manager.get_file_volume_snapshot_list(

SoftLayer/CLI/file/snapshot/order.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
is_flag=True)
2626
@environment.pass_env
2727
def cli(env, volume_id, capacity, tier, upgrade):
28-
"""Order snapshot space for a file storage volume."""
28+
"""Order snapshot space for a file storage volume.
29+
30+
Example::
31+
slcli file snapshot-order 12345678 -s 1000 -t 4
32+
This command orders snapshot space for volume with ID 12345678, the size is 1000GB, the tier level is 4 IOPS per GB.
33+
"""
2934
file_manager = SoftLayer.FileStorageManager(env.client)
3035

3136
if tier is not None:

SoftLayer/CLI/file/snapshot/restore.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
' to restore the block volume')
1414
@environment.pass_env
1515
def cli(env, volume_id, snapshot_id):
16-
"""Restore file volume using a given snapshot"""
16+
"""Restore file volume using a given snapshot
17+
18+
Example::
19+
slcli file snapshot-restore 12345678 -s 87654321
20+
This command restores volume with ID 12345678 from snapshot with ID 87654321.
21+
"""
1722
file_manager = SoftLayer.FileStorageManager(env.client)
1823
success = file_manager.restore_from_snapshot(volume_id, snapshot_id)
1924

0 commit comments

Comments
 (0)