X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kud%2Ftests%2Fplugin_edgex.sh;h=ae390add529ec198d22684666e0fafcac7a35169;hb=1916aca588115140289817e20dbe316196cc1287;hp=929961c066508b80af562339b57996c238e26384;hpb=c64b7f1c913310782f3b767fd116e506efe269d8;p=multicloud%2Fk8s.git diff --git a/kud/tests/plugin_edgex.sh b/kud/tests/plugin_edgex.sh index 929961c0..ae390add 100755 --- a/kud/tests/plugin_edgex.sh +++ b/kud/tests/plugin_edgex.sh @@ -17,7 +17,16 @@ source _common_test.sh source _functions.sh source _common.sh -base_url="http://localhost:9015/v1" +if [ ${1:+1} ]; then + if [ "$1" == "--external" ]; then + master_ip=$(kubectl cluster-info | grep "Kubernetes master" | \ + awk -F ":" '{print $2}' | awk -F "//" '{print $2}') + onap_svc_node_port=30498 + base_url="http://$master_ip:$onap_svc_node_port/v1" + fi +fi + +base_url=${base_url:-"http://localhost:9015/v1"} kubeconfig_path="$HOME/.kube/config" csar_id=cb009bfe-bbee-11e8-9766-525400435678 rb_name="edgex" @@ -91,6 +100,9 @@ response="$(call_api -d "${payload}" "${base_url}/instance")" echo "$response" vnf_id="$(jq -r '.id' <<< "${response}")" +print_msg "Waiting for EdgeX instances" +sleep 240 + print_msg "Validating Kubernetes" kubectl get --no-headers=true --namespace=${namespace} deployment edgex-core-command kubectl get --no-headers=true --namespace=${namespace} service edgex-core-command @@ -99,7 +111,6 @@ kubectl get --no-headers=true --namespace=${namespace} service edgex-core-comman print_msg "Retrieving VNF details" call_api "${base_url}/instance/${vnf_id}" - #Teardown print_msg "Deleting VNF Instance" delete_resource "${base_url}/instance/${vnf_id}"