'Converts the scenario template into hot template.'

def scenario_template_to_hot(self, scenario_tmpl):

    hot_tmpl = {'heat_template_version': '2013-05-23'}
    resources = {}
    for (res_name, res_def) in six.iteritems(scenario_tmpl.resources):
        props = getattr(res_def, 'properties')
        depends = getattr(res_def, 'depends_on')
        res_defn = {'type': 'OS::Heat::TestResource'}
        if props:
            props_def = {}
            for (prop_name, prop_value) in props.items():
                if (type(prop_value) == scenario_template.GetRes):
                    prop_res = getattr(prop_value, 'target_name')
                    prop_value = {'get_resource': prop_res}
                elif (type(prop_value) == scenario_template.GetAtt):
                    prop_res = getattr(prop_value, 'target_name')
                    prop_attr = getattr(prop_value, 'attr')
                    prop_value = {'get_attr': [prop_res, prop_attr]}
                props_def[prop_name] = prop_value
            res_defn['properties'] = props_def
        if depends:
            res_defn['depends_on'] = depends
        resources[res_name] = res_defn
    hot_tmpl['resources'] = resources
    return hot_tmpl
