onap on kubernetes source files
[oom.git] / kubernetes / config / docker / init / src / config / robot / eteshare / config / vm_config2robot.sh
1 #!/bin/bash
2
3 #
4 # Make vm1_robot config available to robot
5 #
6 CONFIG=/opt/config
7 PROPERTIES=/opt/eteshare/config/vm_properties.py
8 GLOBAL_VM_PROPERTIES="# File generated from /opt/config\n#\n"
9 for f in `ls $CONFIG/*.txt`;
10 do
11     VALUE=`cat $f`
12     NAME=${f%.*}
13     NAME=${NAME##*/}
14     GLOBAL_VM_PROPERTIES=$"$GLOBAL_VM_PROPERTIES \"$NAME\" : \"$VALUE\",\n"
15 done
16 GLOBAL_VM_PROPERTIES=${GLOBAL_VM_PROPERTIES/%,\\n/\}}
17 echo -e $GLOBAL_VM_PROPERTIES > $PROPERTIES
18 REGION=`cat $CONFIG/region.txt`
19 echo -e "\nGLOBAL_OPENSTACK_SERVICE_REGION = \"$REGION\"" >> /opt/eteshare/config/integration_robot_properties.py