From 80237668597de035fd9788ea95786bb0bda68a02 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Mon, 30 Jul 2018 14:12:49 -0700 Subject: Remove demo, testuite/properties repos in robot VM No longer clone demo and testsuite/properties repos in robot VM. Instead, use demo repo content within testsuite container, and pass properties directly from heat template boot/ directory. Change-Id: I9e472f9b6cea47dc2faebd091d95be9e89aff667 Issue-ID: INT-605 Signed-off-by: Gary Wu --- boot/robot/vm_config2robot.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 boot/robot/vm_config2robot.sh (limited to 'boot/robot/vm_config2robot.sh') diff --git a/boot/robot/vm_config2robot.sh b/boot/robot/vm_config2robot.sh new file mode 100755 index 00000000..c50fa5f4 --- /dev/null +++ b/boot/robot/vm_config2robot.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# +# Make vm1_robot config available to robot +# +CONFIG=/opt/config +PROPERTIES=/opt/eteshare/config/vm_properties.py +GLOBAL_VM_PROPERTIES="# File generated from /opt/config\n#\n" +HASH="GLOBAL_INJECTED_PROPERTIES={" +COMMA="" +for f in `ls $CONFIG/*.txt`; +do + VALUE=`cat $f` + NAME=${f%.*} + NAME=${NAME##*/} + NAME=${NAME^^} + GLOBAL_VM_PROPERTIES=$"${GLOBAL_VM_PROPERTIES}GLOBAL_INJECTED_$NAME = \"$VALUE\"\n" + HASH=$"${HASH}${COMMA}\n\"GLOBAL_INJECTED_$NAME\" : \"$VALUE\"" + COMMA="," +done +HASH="${HASH}}\n" +GLOBAL_VM_PROPERTIES="${GLOBAL_VM_PROPERTIES}\n${HASH}" +GLOBAL_VM_PROPERTIES=${GLOBAL_VM_PROPERTIES} +echo -e $GLOBAL_VM_PROPERTIES > $PROPERTIES -- cgit 1.2.3-korg