[CVP] Patch tempest and rally password generation code

Change-Id: I67ba20cf99e226a0fb447d4de9c4a195cae08a61
Related-PROD: PROD-30762
diff --git a/Dockerfile b/Dockerfile
index e8a327a..835c3a9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,6 +20,10 @@
 
 RUN pip install --force-reinstall python-cinderclient==3.2.0 python-glanceclient==2.11
 
+RUN sed -i 's/length=15/length=32/g' /var/lib/tempest/tempest/lib/common/utils/data_utils.py
+RUN sed -i 's/uuid4()/uuid4().replace("-","")/g' /usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/keystone/utils.py
+RUN sed -i 's/uuid4()/uuid4().replace("-","")/g' /usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/context/keystone/users.py
+
 COPY rally/ /var/lib/cvp-configuration/rally
 COPY tempest/ /var/lib/cvp-configuration/tempest
 COPY cleanup.sh  /var/lib/cvp-configuration/cleanup.sh
diff --git a/configure.sh b/configure.sh
index 9374989..f53012e 100755
--- a/configure.sh
+++ b/configure.sh
@@ -30,6 +30,9 @@
     unset https_proxy
   fi
   sub_name=`date "+%H_%M_%S"`
+  # remove dashes from rally user passwords to fit into 32 char limit
+  sed -i 's/uuid4()/uuid4().replace("-","")/g' /usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/keystone/utils.py
+  sed -i 's/uuid4()/uuid4().replace("-","")/g' /usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/context/keystone/users.py
   rally deployment create --fromenv --name=tempest_$sub_name
   rally deployment config
   echo "[openstack]" >> /etc/rally/rally.conf
@@ -56,6 +59,9 @@
     rally verify add-verifier-ext --version 0.2.0 --source https://github.com/openstack/heat-tempest-plugin
     pip install --force-reinstall python-cinderclient==3.2.0
     unset https_proxy
+    # set password length to 32
+    data_utils_path=`find /home/rally/.rally/verification/ -name data_utils.py`
+    sed -i 's/length=15/length=32/g' $data_utils_path
   fi
   # supress tempest.conf display in console
   #rally verify configure-verifier --show