Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Example for slcli file access-authorize, slcli file access-list, slcli file access-revoke command
  • Loading branch information
JayasilanJibm committed Aug 6, 2023
1 parent e5b143f commit 5dfbf2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion SoftLayer/CLI/file/access/authorize.py
Expand Up @@ -25,7 +25,13 @@
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id,
ip_address, subnet_id):
"""Authorizes hosts to access a given volume"""
"""Authorizes hosts to access a given volume
Example::
slcli file access-authorize 12345678 --virtual-id 87654321
This command authorizes virtual server with ID 87654321 to access volume with ID 12345678.
"""

file_manager = SoftLayer.FileStorageManager(env.client)
ip_address_id_list = list(ip_address_id)

Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/CLI/file/access/list.py
Expand Up @@ -19,7 +19,13 @@
default=','.join(storage_utils.DEFAULT_COLUMNS))
@environment.pass_env
def cli(env, columns, sortby, volume_id):
"""List ACLs."""
"""List ACLs.
Example::
slcli file access-list 12345678 --sortby id
This command lists all hosts that are authorized to access volume with ID 12345678 and sorts them by ID.
"""

file_manager = SoftLayer.FileStorageManager(env.client)
resolved_id = helpers.resolve_id(file_manager.resolve_ids, volume_id, 'Volume Id')
access_list = file_manager.get_file_volume_access_list(
Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/CLI/file/access/revoke.py
Expand Up @@ -25,7 +25,13 @@
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id,
ip_address, subnet_id):
"""Revokes authorization for hosts accessing a given volume"""
"""Revokes authorization for hosts accessing a given volume
Exmaple::
slcli file access-revoke 12345678 --virtual-id 87654321
This command revokes access of virtual server with ID 87654321 to volume with ID 12345678.
"""

file_manager = SoftLayer.FileStorageManager(env.client)
ip_address_id_list = list(ip_address_id)

Expand Down

0 comments on commit 5dfbf2b

Please sign in to comment.