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

Add invalid option warning for max and min set to zero #492

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 3 additions & 0 deletions ebcli/controllers/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def do_command(self):

if single and scale:
raise InvalidOptionsError(strings['create.singleandsize'])

if min_instances == 0 and max_instances == 0:
raise InvalidOptionsError(strings['create.minmaxzero'])

if (max_instances or min_instances) and scale:
raise InvalidOptionsError(strings['create.scaleandminmax'])
Expand Down
1 change: 1 addition & 0 deletions ebcli/resources/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
'list of key=value pairs.',
'create.sampleandlabel': 'You cannot use the "--sample" and "--version" options together.',
'create.singleandsize': 'You cannot use the "--single" and "--scale" options together.',
'create.minmaxzero':'You cannot set "--min-instances" and "--max-instances" to zero.',
'create.scaleandminmax': 'You cannot use the "--min-instances" or "--max-instances" and "--scale" options together.',
'create.singleandminmax': 'You cannot use the "--min-instances" or "--max-instances" and "--single" options together.',
'create.itype_and_instances' : 'You cannot use the "--instance-type" and "--instance-types" together.',
Expand Down
Loading