make aggregation-method argument as a mandatory field

When create the gnocchi alarm, the aggregation-method is required.

Closes-Bug: #1531602
Change-Id: I65b5038053d69dc727639fbfeaa5a23108845083
(cherry picked from commit 63d629f423)
This commit is contained in:
xialinjuan
2016-01-22 21:41:28 +08:00
committed by gordon chung
parent 48a2ba2b26
commit 8bbea95f32

View File

@@ -519,6 +519,7 @@ def common_alarm_gnocchi_arguments(rule_namespace, create=False):
help='Number of periods to evaluate over.')
@utils.arg('--aggregation-method', metavar='<AGGREATION>',
dest=rule_namespace + '/aggregation_method',
required=create,
help=('Aggregation method to use, one of: ' +
str(GNOCCHI_AGGREGATION) + '.'))
@utils.arg('--comparison-operator', metavar='<OPERATOR>',