Skip to content

Commit

Permalink
Merge pull request #1748 from caberos/issue1747
Browse files Browse the repository at this point in the history
Update Help message for commands that take in multiple arguments
  • Loading branch information
allmightyspiff authored Sep 8, 2022
2 parents 735112e + b356690 commit 2c86f68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions SoftLayer/CLI/block/access/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions

MULTIPLE = '(Multiple allowed)'


@click.command(cls=SoftLayer.CLI.command.SLCommand, )
@click.argument('volume_id')
@click.option('--hardware-id', '-h', multiple=True,
help='The id of one SoftLayer_Hardware to authorize')
help='The id of one SoftLayer_Hardware to authorize ' + MULTIPLE)
@click.option('--virtual-id', '-v', multiple=True,
help='The id of one SoftLayer_Virtual_Guest to authorize')
help='The id of one SoftLayer_Virtual_Guest to authorize ' + MULTIPLE)
@click.option('--ip-address-id', '-i', multiple=True,
help='The id of one SoftLayer_Network_Subnet_IpAddress to authorize')
help='The id of one SoftLayer_Network_Subnet_IpAddress to authorize ' + MULTIPLE)
@click.option('--ip-address', multiple=True,
help='An IP address to authorize')
help='An IP address to authorize ' + MULTIPLE)
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id, ip_address):
"""Authorizes hosts to access a given volume"""
Expand Down
12 changes: 7 additions & 5 deletions SoftLayer/CLI/file/access/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions

MULTIPLE = '(Multiple allowed)'


@click.command(cls=SoftLayer.CLI.command.SLCommand, )
@click.argument('volume_id')
@click.option('--hardware-id', '-h', multiple=True,
help='The id of one SoftLayer_Hardware to authorize')
help='The id of one SoftLayer_Hardware to authorize ' + MULTIPLE)
@click.option('--virtual-id', '-v', multiple=True,
help='The id of one SoftLayer_Virtual_Guest to authorize')
help='The id of one SoftLayer_Virtual_Guest to authorize ' + MULTIPLE)
@click.option('--ip-address-id', '-i', multiple=True,
help='The id of one SoftLayer_Network_Subnet_IpAddress'
' to authorize')
' to authorize ' + MULTIPLE)
@click.option('--ip-address', multiple=True,
help='An IP address to authorize')
help='An IP address to authorize ' + MULTIPLE)
@click.option('--subnet-id', '-s', multiple=True,
help='The id of one SoftLayer_Network_Subnet to authorize')
help='The id of one SoftLayer_Network_Subnet to authorize ' + MULTIPLE)
@environment.pass_env
def cli(env, volume_id, hardware_id, virtual_id, ip_address_id,
ip_address, subnet_id):
Expand Down

0 comments on commit 2c86f68

Please sign in to comment.