Add ability to regenerate tempest configuration

Currently if tempest conf is present, it won't be generated again
if runtest state is triggered, this patch adds ability to change
this from reclass.

Change-Id: Ic7cf1ba69168f75196c1b33fec210c2386083124
diff --git a/metadata/service/tempest/init.yml b/metadata/service/tempest/init.yml
index 23441dc..33fca88 100644
--- a/metadata/service/tempest/init.yml
+++ b/metadata/service/tempest/init.yml
@@ -24,6 +24,7 @@
     runtest_tempest_cfg_dir: /root/test/
     runtest_tempest_cfg_name: tempest_generated.conf
     runtest_tempest_log_file: /home/rally/test/tempest.log
+    runtest_tempest_regenerate_conf: false
     runtest_tempest_public_net: public
   runtest:
     enabled: true
@@ -33,6 +34,7 @@
       test_target: ${_param:tempest_test_target}
       keystone_profile_admin: admin_identity
       local_image_url: ${_param:runtest_local_image_url}
+      regenerate_conf: ${_param:runtest_tempest_regenerate_conf}
       convert_to_uuid:
         compute:
           image_ref: ${_param:glance_image_cirros_name}
diff --git a/runtest/map.jinja b/runtest/map.jinja
index 6e892f8..ab01c64 100644
--- a/runtest/map.jinja
+++ b/runtest/map.jinja
@@ -8,7 +8,8 @@
     'default': {
         'cfg_dir': '/root/',
         'cfg_name': 'tempest.conf',
-        'keystonerc': '/root/keystonercv3'
+        'keystonerc': '/root/keystonercv3',
+        'regenerate_conf': false
     }
 }, grain='os', merge=salt['pillar.get']('runtest', {}).get('tempest', {}), base='default') %}
 
diff --git a/runtest/tempest.sls b/runtest/tempest.sls
index 63ef9ad..ac5fb87 100644
--- a/runtest/tempest.sls
+++ b/runtest/tempest.sls
@@ -10,6 +10,7 @@
 tempest_config_file:
   runtest.tempestconf_present:
     - name: {{ tempest.cfg_dir }}/{{ tempest.cfg_name }}
+    - regenerate: {{ tempest.regenerate_conf }}
     - require:
       - file: tempest_config_dir