From fd7bbc9eba11a0954ed183ed09e15c4da87d220b Mon Sep 17 00:00:00 2001 From: nitzmahone Date: Fri, 24 Apr 2015 17:33:00 -0700 Subject: [PATCH] Added choice validation for state arg fixes traceback on invalid state arg --- cloud/amazon/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/amazon/ec2.py b/cloud/amazon/ec2.py index fc1e8125b65..2b38c16ccea 100644 --- a/cloud/amazon/ec2.py +++ b/cloud/amazon/ec2.py @@ -1199,7 +1199,7 @@ def main(): instance_profile_name = dict(), instance_ids = dict(type='list', aliases=['instance_id']), source_dest_check = dict(type='bool', default=True), - state = dict(default='present'), + state = dict(default='present', choices=['present', 'absent', 'running', 'stopped']), exact_count = dict(type='int', default=None), count_tag = dict(), volumes = dict(type='list'),