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