Skip to content

Commit ed61330

Browse files
Merge pull request #2053 from ramkishor-ch/issue_2012
Example text added in slcli block access-authorise, slcli block access-list, slcli block access-revoke, slcli block disaster-recovery-failover
2 parents bd95421 + 2147bc2 commit ed61330

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

SoftLayer/CLI/block/access/authorize.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
help='The ID of one virtual server to authorize. ' + MULTIPLE)
2222
@environment.pass_env
2323
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id, ip_address):
24-
"""Authorize hosts to access a given volume."""
24+
"""Authorize hosts to access a given volume.
25+
26+
EXAMPLE::
27+
28+
slcli block access-authorize 12345678 --virtual-id 87654321
29+
This command authorizes virtual server with ID 87654321 to access volume with ID 12345678.
30+
"""
2531
block_manager = SoftLayer.BlockStorageManager(env.client)
2632
ip_address_id_list = list(ip_address_id)
2733

SoftLayer/CLI/block/access/list.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
default='name')
2222
@environment.pass_env
2323
def cli(env, columns, sortby, volume_id):
24-
"""List hosts that are authorized to access the volume."""
24+
"""List hosts that are authorized to access the volume.
25+
26+
EXAMPLE::
27+
28+
slcli block access-list 12345678 --sortby id
29+
This command lists all hosts that are authorized to access volume with ID 12345678 and sorts them by ID.
30+
"""
2531
block_manager = SoftLayer.BlockStorageManager(env.client)
2632
resolved_id = helpers.resolve_id(block_manager.resolve_ids, volume_id, 'Volume Id')
2733
access_list = block_manager.get_block_volume_access_list(

SoftLayer/CLI/block/access/revoke.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
help='The ID of one SoftLayer_Virtual_Guest to revoke authorization.')
1919
@environment.pass_env
2020
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id, ip_address):
21-
"""Revoke authorization for hosts that are accessing a specific volume."""
21+
"""Revoke authorization for hosts that are accessing a specific volume.
22+
23+
EXAMPLE::
24+
25+
slcli block access-revoke 12345678 --virtual-id 87654321
26+
This command revokes access of virtual server with ID 87654321 to volume with ID 12345678.
27+
"""
2228
block_manager = SoftLayer.BlockStorageManager(env.client)
2329
ip_address_id_list = list(ip_address_id)
2430

SoftLayer/CLI/block/duplicate_convert_status.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
from SoftLayer.CLI import formatting
88

99

10-
@click.command(cls=SoftLayer.CLI.command.SLCommand,
11-
epilog="""Get status for split or move completed percentage of a given block duplicate volume.""")
10+
@click.command(cls=SoftLayer.CLI.command.SLCommand)
1211
@click.argument('volume-id')
1312
@environment.pass_env
1413
def cli(env, volume_id):
15-
"""Get status for split or move completed percentage of a given block duplicate volume."""
14+
"""Get status for split or move completed percentage of a given block storage duplicate volume."""
1615
table = formatting.Table(['Username', 'Active Conversion Start Timestamp', 'Completed Percentage'])
1716

1817
block_manager = SoftLayer.BlockStorageManager(env.client)

SoftLayer/CLI/block/replication/disaster_recovery_failover.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@
99

1010

1111
@click.command(cls=SoftLayer.CLI.command.SLCommand,
12-
epilog="""Failover an inaccessible block volume to its available replicant volume.
13-
If a volume (with replication) becomes inaccessible due to a disaster event, this method can be used to immediately
12+
epilog="""If a volume (with replication) becomes inaccessible due to a disaster event,
13+
this method can be used to immediately
1414
failover to an available replica in another location. This method does not allow for failback via API.
1515
After using this method, to failback to the original volume, please open a support ticket.
1616
If you wish to test failover, please use replica-failover.""")
1717
@click.argument('volume-id')
1818
@click.option('--replicant-id', help="ID of the replicant volume.")
1919
@environment.pass_env
2020
def cli(env, volume_id, replicant_id):
21-
"""Failover an inaccessible block volume to its available replicant volume."""
21+
"""Failover an inaccessible block volume to its available replicant volume.
22+
23+
EXAMPLE::
24+
25+
slcli block disaster-recovery-failover 12345678 87654321
26+
This command performs failover operation for volume with ID 12345678 to replica volume with ID 87654321.
27+
"""
2228
block_storage_manager = SoftLayer.BlockStorageManager(env.client)
2329

2430
click.secho("""WARNING : Failover an inaccessible block volume to its available replicant volume."""

0 commit comments

Comments
 (0)