Merge "Add flavor_alt_ref"
diff --git a/_modules/runtest/tempest_sections/compute.py b/_modules/runtest/tempest_sections/compute.py
index 7ae933e..494c9dc 100644
--- a/_modules/runtest/tempest_sections/compute.py
+++ b/_modules/runtest/tempest_sections/compute.py
@@ -65,7 +65,19 @@
 
     @property
     def flavor_ref_alt(self):
-        pass
+        c = conditions.BaseRule(field='keystone.client.enabled', op='eq',
+                                val=True)
+        nodes = self.get_nodes_where_condition_match(c)
+        flavor_name = self.runtest_opts.get('convert_to_uuid', {}).get('flavor_alt_name')
+        if not flavor_name:
+            return
+
+        keystone_profile_admin = self.runtest_opts.get('keystone_profile_admin', {})
+        res = self.authenticated_openstack_module_call(
+             nodes[0], 'novang.flavor_list', profile=keystone_profile_admin)[nodes[0]]
+
+        if flavor_name in res:
+            return res[flavor_name]['id']
 
     @property
     def hypervisor_type(self):
diff --git a/metadata/service/tempest/init.yml b/metadata/service/tempest/init.yml
index 780c61f..d59a7e0 100644
--- a/metadata/service/tempest/init.yml
+++ b/metadata/service/tempest/init.yml
@@ -23,6 +23,7 @@
       convert_to_uuid:
         image_name: ${glance:client:identity:admin_identity:image:cirros:name}
         flavor_name: 'm1.extra_tiny_test'
+        flavor_alt_name: 'm1.tiny_test'
       heat_plugin:
         skip_scenario_test_list: ${_param:runtest_heat_plugin_skip_scenario_test_list}
         skip_functional_test_list: ${_param:runtest_heat_plugin_skip_functional_test_list}