#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2020 Intel Corporation set -o errexit set -o nounset set -o pipefail source _common_test.sh source _functions.sh #source _common.sh # TODO Workaround for MULTICLOUD-1202 function delete_resource_nox { call_api_nox -X DELETE "$1" ! call_api -X GET "$1" >/dev/null } master_ip=$(control_plane_ip) rsync_service_port=30441 rsync_service_host="$master_ip" base_url_orchestrator=${base_url_orchestrator:-"http://$master_ip:30415/v2"} base_url_clm=${base_url_clm:-"http://$master_ip:30461/v2"} base_url_dcm=${base_url_dcm:-"http://$master_ip:30477/v2"} CSAR_DIR="/opt/csar" csar_id="cb009bfe-bbee-11e8-9766-525400435678" app1_helm_path="$CSAR_DIR/$csar_id/prometheus-operator.tar.gz" app1_profile_path="$CSAR_DIR/$csar_id/prometheus-operator_profile.tar.gz" app2_helm_path="$CSAR_DIR/$csar_id/collectd.tar.gz" app2_profile_path="$CSAR_DIR/$csar_id/collectd_profile.tar.gz" kubeconfig_path="$HOME/.kube/config" function populate_CSAR_composite_app_helm { _checks_args "$1" pushd "${CSAR_DIR}/$1" print_msg "Create Helm Chart Archives for compositeApp" rm -f *.tar.gz tar -czf collectd.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/helm . tar -czf prometheus-operator.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/helm . tar -czf collectd_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app1/profile . tar -czf prometheus-operator_profile.tar.gz -C $test_folder/vnfs/comp-app/collection/app2/profile . popd } # ---------BEGIN: SET CLM DATA--------------- clusterprovidername="sanity-test-cluster-provider" clusterproviderdata="$(cat<", "userData2":"" }, "spec" : { "level": "0" } } } EOF )" lc_cluster_1_name="lc1-c1" cluster_1_data="$(cat << EOF { "metadata" : { "name": "${lc_cluster_1_name}", "description": "logical cloud cluster 1 description", "userData1":"", "userData2":"" }, "spec" : { "cluster-provider": "${clusterprovidername}", "cluster-name": "${clustername}", "loadbalancer-ip" : "0.0.0.0" } } EOF )" # add the rsync controller entry rsynccontrollername="rsync" rsynccontrollerdata="$(cat<