diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-08-09 08:10:24 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-08-09 10:27:10 -0700 |
commit | 87aa8b53fda1825e1d24b7701dead5859cbdd878 (patch) | |
tree | 6135bb304f1b91726f58e6b882ab3ed188dd77e0 /deployment/heat/onap-oom/scripts | |
parent | 5d08958636a11ec9d570a995f09fa09f6e14de49 (diff) |
Refactor to support OOM verify jobs
Change-Id: Ia898dbfced5ba1b00667593aa7e41c5c21ce4d5e
Issue-ID: INT-532
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'deployment/heat/onap-oom/scripts')
-rwxr-xr-x | deployment/heat/onap-oom/scripts/deploy.sh | 34 | ||||
-rwxr-xr-x | deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh | 6 |
2 files changed, 17 insertions, 23 deletions
diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh index 11b2938ee..c9cd005c7 100755 --- a/deployment/heat/onap-oom/scripts/deploy.sh +++ b/deployment/heat/onap-oom/scripts/deploy.sh @@ -16,25 +16,11 @@ if [ -z "$WORKSPACE" ]; then export WORKSPACE=`git rev-parse --show-toplevel` fi -usage() { echo "Usage: $0 [-n <number of VMs {2-15}>] [ -r ] <env-name>" 1>&2; exit 1; } +usage() { echo "Usage: $0 [ -r ] <env-name>" 1>&2; exit 1; } -if [ "$#" -ne 1 ]; then - usage -fi -ENV_FILE=$1 -while getopts ":n:s:" o; do +while getopts ":rq" o; do case "${o}" in - n) - if [[ ${OPTARG} =~ ^[0-9]+$ ]];then - vm_num=${OPTARG} - if [ ${OPTARG} > 15 ] || [ ${OPTARG} < 2 ]; then - usage - fi - else - usage - fi - ;; r) echo "The following command will delete all information relating to onap within your enviroment" read -p "Are you certain this is what you want? (type y to confirm):" answer @@ -42,14 +28,14 @@ while getopts ":n:s:" o; do if [ $answer = "y" ] || [ $answer = "Y" ] || [ $answer = "yes" ] || [ $answer = "Yes"]; then echo "This may delete the work of other colleages within the same enviroment" read -p "Are you certain this is what you want? (type y to confirm):" answer2 - + if [ $answer2 = "y" ] || [ $answer2 = "Y" ] || [ $answer2 = "yes" ] || [ $answer2 = "Yes"]; then full_deletion=true - else + else echo "Ending program" exit 1 fi - else + else echo "Ending program" exit 1 fi @@ -64,6 +50,12 @@ while getopts ":n:s:" o; do done shift $((OPTIND-1)) +if [ "$#" -ne 1 ]; then + usage +fi + +ENV_FILE=$1 + SSH_KEY=~/.ssh/onap_key source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh @@ -72,9 +64,9 @@ SO_ENCRYPTION_KEY=aa3871669d893c7fb8abbcda31b88b4f export OS_PASSWORD_ENCRYPTED=$(echo -n "$OS_PASSWORD" | openssl aes-128-ecb -e -K "$SO_ENCRYPTION_KEY" -nosalt | xxd -c 256 -p) for n in $(seq 1 5); do - if [ $full_deletion = true ] ; then + if [ $full_deletion = true ] ; then $WORKSPACE/test/ete/scripts/teardown-onap.sh -n $install_name -q - else + else $WORKSPACE/test/ete/scripts/teardown-onap.sh -n $install_name fi diff --git a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh index 33d2c3db8..408f778e9 100755 --- a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh +++ b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh @@ -51,8 +51,10 @@ cat <<EOF __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } __integration_override_yaml__: { get_param: integration_override_yaml } - __gerrit_branch__: { get_param: gerrit_branch } - __gerrit_refspec__: { get_param: gerrit_refspec } + __integration_gerrit_branch__: { get_param: integration_gerrit_branch } + __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec } + __oom_gerrit_branch__: { get_param: oom_gerrit_branch } + __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec } __docker_manifest__: { get_param: docker_manifest } __public_net_id__: { get_param: public_net_id } __oam_network_cidr__: { get_param: oam_network_cidr } |