import subprocess
 import time
 
+from six.moves import configparser
 from xtesting.core import testcase
 import yaml
 
         subprocess.Popen(cmd, stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT)
 
+    def update_rally_regex(self, rally_conf='/etc/rally/rally.conf'):
+        """Set image name as tempest img_name_regex"""
+        rconfig = configparser.RawConfigParser()
+        rconfig.read(rally_conf)
+        rconfig.set('tempest', 'img_name_regex', '^{}$'.format(
+            self.image.name))
+        with open(rally_conf, 'wb') as config_file:
+            rconfig.write(config_file)
+
     def configure(self, **kwargs):  # pylint: disable=unused-argument
         """
         Create all openstack resources for tempest-based testcases and write
         self.start_time = time.time()
         try:
             super(TempestCommon, self).run(**kwargs)
+            self.update_rally_regex()
             self.configure(**kwargs)
             self.generate_test_list(**kwargs)
             self.apply_tempest_blacklist()
 
             self._test_run(testcase.TestCase.EX_RUN_ERROR)
 
     def test_run(self):
-        with mock.patch.object(self.tempestcommon, 'generate_test_list'), \
+        with mock.patch.object(self.tempestcommon, 'update_rally_regex'), \
+                mock.patch.object(self.tempestcommon, 'generate_test_list'), \
                 mock.patch.object(self.tempestcommon,
                                   'apply_tempest_blacklist'), \
                 mock.patch.object(self.tempestcommon, 'run_verifier_tests'), \