@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
    @validation.validate_heat_template("template_path")
    @validation.required_services(consts.Service.HEAT)
    @validation.required_openstack(users=True)
    @scenario.configure(context={"cleanup": ["heat"]})
    def create_stack_and_scale(self, template_path, output_key, delta,
                               parameters=None, files=None,
                               environment=None):
        # TODO(stpierre): Kilo Heat is *much* better than Juno for the
        # requirements of this scenario, so once Juno goes out of
        # support we should update this scenario to suck less. Namely:
        #
        # * Kilo Heat can supply alarm_url attributes without needing
        #   an output key, so instead of getting the output key from
        #   the user, just get the name of the ScalingPolicy to apply.
        # * Kilo Heat changes the status of a stack while scaling it,
        #   so _scale_stack() can check for the stack to have changed
        #   size and for it to be in UPDATE_COMPLETE state, so the
        #   user no longer needs to specify the expected delta.
        stack = self._create_stack(template_path, parameters, files,
                                   environment)
        self._scale_stack(stack, output_key, delta)
The autocommit decorator also works with a using argument.
dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/heat/stacks.py/HeatStacks.create_stack_and_scale--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/modeltests/transactions/tests.py/TransactionTests.test_autocommit_decorator_with_using