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
This commit is contained in:
xialinjuan
2016-02-01 10:07:47 +08:00
parent 5822734227
commit 072801bca5

View File

@@ -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):