[CVP] Patch tempest and rally password generation code

Change-Id: I67ba20cf99e226a0fb447d4de9c4a195cae08a61
Related-PROD: PROD-30762
(cherry picked from commit 93b3551ae5dce7df4b0ba99bcd88759c1a61e1cd)
diff --git a/Dockerfile b/Dockerfile
index e8a327a..6ea3b46 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,7 +11,9 @@
 RUN mkdir -p cvp-configuration
 
 RUN git clone https://github.com/openstack/tempest && \
-    pushd tempest; git checkout 18.0.0; pip install -r requirements.txt; \
+    pushd tempest; git checkout 18.0.0; \
+    sed -i 's/length=15/length=32/g' /var/lib/tempest/tempest/lib/common/utils/data_utils.py; \
+    pip install -r requirements.txt; \
     popd;
 
 RUN git clone https://github.com/openstack/heat-tempest-plugin && \
@@ -20,6 +22,9 @@
 
 RUN pip install --force-reinstall python-cinderclient==3.2.0 python-glanceclient==2.11
 
+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..5c2a0fa 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
@@ -57,6 +60,9 @@
     pip install --force-reinstall python-cinderclient==3.2.0
     unset https_proxy
   fi
+  # 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
   # supress tempest.conf display in console
   #rally verify configure-verifier --show
 }