update option validation

parent 74040f47
......@@ -20,8 +20,8 @@ class ASG():
def work_out_new_asg(self):
target_groups = None
# If we already have the ASG to do, move on, otherwise work out and set
# target_groups for use below
# If we already have the ASG to do then move on, otherwise set target_groups
# for use in working it out below
if self.asg is not None:
new_asg = self.asg
elif self.loadbalancer is not None and self.target_group is None:
......@@ -54,6 +54,9 @@ def reset(ctx):
@click.option("--asg", "asg_name", help="ASG we're updating -- mutually exclusive with --lb and --target-group")
@click.option("--scale-to", "scale_to", help="Optionally set the number for the ASG to scale back up to. Defaults to 1")
def asg(ctx, ami, lb, asg_name, target_group, scale_to):
if [lb, asg_name, target_group].count(None) < 2:
print("--lb, --asg, and --target-group are mutually exclusive. Please use only one")
region = ctx.obj.get('region')
role_arn = ctx.obj.get('role_arn')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment