Skip to content

Commit cd0195c

Browse files
caberoscaberos
authored andcommitted
fix the team code review comments
1 parent d885ce5 commit cd0195c

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

SoftLayer/CLI/autoscale/create.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,31 @@
1313

1414

1515
@click.command()
16-
@click.option('--name', help="Scale group's name.")
17-
@click.option('--cooldown', type=click.INT,
16+
@click.option('--name', required=True, prompt=True, help="Scale group's name.")
17+
@click.option('--cooldown', required=True, prompt=True, type=click.INT,
1818
help="The number of seconds this group will wait after lastActionDate before performing another action.")
19-
@click.option('--min', 'minimum', type=click.INT, help="Set the minimum number of guests")
20-
@click.option('--max', 'maximum', type=click.INT, help="Set the maximum number of guests")
21-
@click.option('--regional', type=click.INT,
19+
@click.option('--min', 'minimum', required=True, prompt=True, type=click.INT, help="Set the minimum number of guests")
20+
@click.option('--max', 'maximum', required=True, prompt=True, type=click.INT, help="Set the maximum number of guests")
21+
@click.option('--regional', required=True, prompt=True, type=click.INT,
2222
help="The identifier of the regional group this scaling group is assigned to.")
2323
@click.option('--postinstall', '-i', help="Post-install script to download")
24-
@click.option('--os', '-o', help="OS install code. Tip: you can specify <OS>_LATEST")
24+
@click.option('--os', '-o', required=True, prompt=True, help="OS install code. Tip: you can specify <OS>_LATEST")
2525
@click.option('--datacenter', '-d', required=True, prompt=True, help="Datacenter shortname")
2626
@click.option('--hostname', '-H', required=True, prompt=True, help="Host portion of the FQDN")
2727
@click.option('--domain', '-D', required=True, prompt=True, help="Domain portion of the FQDN")
28-
@click.option('--cpu', type=click.INT, help="Number of CPUs for new guests (existing not effected")
29-
@click.option('--memory', type=click.INT, help="RAM in MB or GB for new guests (existing not effected")
30-
@click.option('--policy-relative', help="The type of scale to perform(ABSOLUTE, PERCENT, RELATIVE).")
28+
@click.option('--cpu', required=True, prompt=True, type=click.INT,
29+
help="Number of CPUs for new guests (existing not effected")
30+
@click.option('--memory', required=True, prompt=True, type=click.INT,
31+
help="RAM in MB or GB for new guests (existing not effected")
32+
@click.option('--policy-relative', required=True, prompt=True,
33+
help="The type of scale to perform(ABSOLUTE, PERCENT, RELATIVE).")
3134
@click.option('--termination-policy',
3235
help="The termination policy for the group(CLOSEST_TO_NEXT_CHARGE=1, NEWEST=2, OLDEST=3).")
3336
@click.option('--policy-name', help="Collection of policies for this group. This can be empty.")
3437
@click.option('--policy-amount', help="The number to scale by. This number has different meanings based on type.")
3538
@click.option('--userdata', help="User defined metadata string")
3639
@helpers.multi_option('--key', '-k', help="SSH keys to add to the root user")
37-
@helpers.multi_option('--disk', help="Disk sizes")
40+
@helpers.multi_option('--disk', required=True, prompt=True, help="Disk sizes")
3841
@environment.pass_env
3942
def cli(env, **args):
4043
"""Order/Create a scale group."""

0 commit comments

Comments
 (0)