jf9860 | 75010a4 | 2017-02-22 16:52:54 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Set the defaults |
| 4 | if [ $# -eq 0 ];then |
| 5 | echo "Usage: demo.sh init" |
| 6 | echo " demo.sh preload <vnf_name> <module_name>" |
| 7 | echo " demo.sh appc <module_name>" |
| 8 | exit |
| 9 | fi |
| 10 | ## |
| 11 | ## if more than 1 tag is supplied, the must be provided with -i or -e |
| 12 | ## |
| 13 | while [ $# -gt 0 ] |
| 14 | do |
| 15 | key="$1" |
| 16 | |
| 17 | case $key in |
| 18 | init) |
| 19 | TAG="InitDemo" |
| 20 | shift |
| 21 | ;; |
| 22 | preload) |
| 23 | TAG="PreloadDemo" |
| 24 | shift |
| 25 | if [ $# -ne 2 ];then |
| 26 | echo "Usage: demo.sh preload <vnf_name> <module_name>" |
| 27 | exit |
| 28 | fi |
| 29 | VARIABLES="$VARIABLES -v VNF_NAME:$1" |
| 30 | shift |
| 31 | VARIABLES="$VARIABLES -v MODULE_NAME:$1" |
| 32 | shift |
| 33 | ;; |
| 34 | appc) |
| 35 | TAG="APPCMountPointDemo" |
| 36 | shift |
| 37 | if [ $# -ne 1 ];then |
| 38 | echo "Usage: demo.sh appc <module_name>" |
| 39 | exit |
| 40 | fi |
| 41 | VARIABLES="$VARIABLES -v MODULE_NAME:$1" |
| 42 | shift |
| 43 | ;; |
| 44 | *) |
| 45 | echo "Usage: demo.sh init" |
| 46 | echo " demo.sh preload <vnf_name> <module_name>" |
| 47 | echo " demo.sh appc <module_name>" |
| 48 | exit |
| 49 | esac |
| 50 | done |
| 51 | |
| 52 | ETEHOME=/var/opt/OpenECOMP_ETE |
| 53 | VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/robot_properties_ete.py -V /share/config/robot_preload_parameters.py" |
| 54 | docker exec openecompete_container ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/demo/${TAG} -i ${TAG} 2> ${TAG}.out |