Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example text added in slcli block access-authorise, slcli block access-list, slcli block access-revoke, slcli block disaster-recovery-failover #2053

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SoftLayer/CLI/block/access/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
help='The ID of one virtual server to authorize. ' + MULTIPLE)
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id, ip_address):
"""Authorize hosts to access a given volume."""
"""Authorize hosts to access a given volume.

EXAMPLE::

slcli block access-authorize 12345678 --virtual-id 87654321
This command authorizes virtual server with ID 87654321 to access volume with ID 12345678.
"""
block_manager = SoftLayer.BlockStorageManager(env.client)
ip_address_id_list = list(ip_address_id)

Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/CLI/block/access/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
default='name')
@environment.pass_env
def cli(env, columns, sortby, volume_id):
"""List hosts that are authorized to access the volume."""
"""List hosts that are authorized to access the volume.

EXAMPLE::

slcli block access-list 12345678 --sortby id
This command lists all hosts that are authorized to access volume with ID 12345678 and sorts them by ID.
"""
block_manager = SoftLayer.BlockStorageManager(env.client)
resolved_id = helpers.resolve_id(block_manager.resolve_ids, volume_id, 'Volume Id')
access_list = block_manager.get_block_volume_access_list(
Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/CLI/block/access/revoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
help='The ID of one SoftLayer_Virtual_Guest to revoke authorization.')
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id, ip_address):
"""Revoke authorization for hosts that are accessing a specific volume."""
"""Revoke authorization for hosts that are accessing a specific volume.

EXAMPLE::

slcli block access-revoke 12345678 --virtual-id 87654321
This command revokes access of virtual server with ID 87654321 to volume with ID 12345678.
"""
block_manager = SoftLayer.BlockStorageManager(env.client)
ip_address_id_list = list(ip_address_id)

Expand Down
5 changes: 2 additions & 3 deletions SoftLayer/CLI/block/duplicate_convert_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
from SoftLayer.CLI import formatting


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

block_manager = SoftLayer.BlockStorageManager(env.client)
Expand Down
12 changes: 9 additions & 3 deletions SoftLayer/CLI/block/replication/disaster_recovery_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@


@click.command(cls=SoftLayer.CLI.command.SLCommand,
epilog="""Failover an inaccessible block volume to its available replicant volume.
If a volume (with replication) becomes inaccessible due to a disaster event, this method can be used to immediately
epilog="""If a volume (with replication) becomes inaccessible due to a disaster event,
this method can be used to immediately
failover to an available replica in another location. This method does not allow for failback via API.
After using this method, to failback to the original volume, please open a support ticket.
If you wish to test failover, please use replica-failover.""")
@click.argument('volume-id')
@click.option('--replicant-id', help="ID of the replicant volume.")
@environment.pass_env
def cli(env, volume_id, replicant_id):
"""Failover an inaccessible block volume to its available replicant volume."""
"""Failover an inaccessible block volume to its available replicant volume.

EXAMPLE::

slcli block disaster-recovery-failover 12345678 87654321
This command performs failover operation for volume with ID 12345678 to replica volume with ID 87654321.
"""
block_storage_manager = SoftLayer.BlockStorageManager(env.client)

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