From 072801bca5780e7d563b55a2bd7b9424d7190742 Mon Sep 17 00:00:00 2001 From: xialinjuan Date: Mon, 1 Feb 2016 10:07:47 +0800 Subject: [PATCH] check the alarm type when list alarm when list alarm with type, the type can be anything, this patch add choice parameter in the parser. Change-Id: I2da7689b552dfbae51e7a5d8d091afef9f44f5d2 --- aodhclient/v2/alarm_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aodhclient/v2/alarm_cli.py b/aodhclient/v2/alarm_cli.py index 5831dee..669a95b 100644 --- a/aodhclient/v2/alarm_cli.py +++ b/aodhclient/v2/alarm_cli.py @@ -40,7 +40,7 @@ class CliAlarmList(lister.Lister): def get_parser(self, prog_name): parser = super(CliAlarmList, self).get_parser(prog_name) parser.add_argument('-t', '--type', required=True, - help='Type of alarm') + choices=ALARM_TYPES, help='Type of alarm') return parser def take_action(self, parsed_args):