Used sed instead of crudini for updating regex
authorViktor Tikkanen <viktor.tikkanen@nokia.com>
Mon, 8 Feb 2016 17:40:22 +0000 (19:40 +0200)
committerViktor Tikkanen <viktor.tikkanen@nokia.com>
Mon, 8 Feb 2016 17:44:01 +0000 (19:44 +0200)
It seems that crudini has limitations regarding quotation marks
so sed tool is used instead in order to replace ssh_user_regex
parameter into tempest.conf file.

Change-Id: I8587b3e6b0c15930407ab90bf05f00086348edf6
Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
testcases/VIM/OpenStack/CI/libraries/run_tempest.py
testcases/config_functest.yaml

index 5738fd4..b8ed271 100644 (file)
@@ -203,8 +203,7 @@ def configure_tempest():
     cmd = "crudini --set "+tempest_conf_file+" identity password " \
           +USER_PASSWORD
     functest_utils.execute_command(cmd,logger)
-    cmd = "crudini --set "+tempest_conf_file+" input-scenario ssh_user_regex " \
-          +SSH_USER_REGEX
+    cmd = "sed -i 's/.*ssh_user_regex.*/ssh_user_regex = "+SSH_USER_REGEX+"/' "+tempest_conf_file
     functest_utils.execute_command(cmd,logger)
 
 
index c9fb18b..f32314a 100644 (file)
@@ -83,7 +83,7 @@ tempest:
         user_name: tempest
         user_password: tempest
     input-scenario:
-        ssh_user_regex: [["^.*[Cc]irros.*$", "cirros"], ["^.*[Tt]est[VvMm].*$", "cirros"], ["^.*rally_verify.*$", "cirros"]]
+        ssh_user_regex: '[["^.*[Cc]irros.*$", "cirros"], ["^.*[Tt]est[VvMm].*$", "cirros"], ["^.*rally_verify.*$", "cirros"]]'
 
 rally:
     deployment_name: opnfv-rally