'Preview the outcome of a template and its params.'

@util.policy_enforce
def preview(self, req, body):

    data = InstantiationData(body)
    args = self.prepare_args(data)
    result = self.rpc_client.preview_stack(req.context, data.stack_name(), data.template(), data.environment(), data.files(), args, environment_files=data.environment_files())
    formatted_stack = stacks_view.format_stack(req, result)
    return {'stack': formatted_stack}
