#NEWLINE# @ types . convert ( template_path = { #NEWLINE# #INDENT# 'type' : 'file' , #NEWLINE# #UNINDENT# } , files = { #NEWLINE# #INDENT# 'type' : 'file_dict' , #NEWLINE# #UNINDENT# } ) #NEWLINE# @ validation . validate_heat_template ( 'template_path' ) #NEWLINE# @ validation . required_services ( consts . Service . HEAT ) #NEWLINE# @ validation . required_openstack ( users = True ) #NEWLINE# @ scenario . configure ( context = { #NEWLINE# #INDENT# 'cleanup' : [ 'heat' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# def create_stack_and_scale( self , template_path , output_key , delta , parameters = None , files = None , environment = None ) : #NEWLINE# #INDENT# 'Create an autoscaling stack and invoke a scaling policy.\n\n        Measure the performance of autoscaling webhooks.\n\n        :param template_path: path to template file that includes an\n                              OS::Heat::AutoScalingGroup resource\n        :param output_key: the stack output key that corresponds to\n                           the scaling webhook\n        :param delta: the number of instances the stack is expected to\n                      change by.\n        :param parameters: parameters to use in heat template\n        :param files: files used in template (dict of file name to\n                      file path)\n        :param environment: stack environment definition (dict)\n        ' #NEWLINE# stack = self . _create_stack ( template_path , parameters , delta , environment ) #NEWLINE# self . _scale_stack ( stack , output_key , delta )