2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 master_ip=$(kubectl cluster-info | grep "Kubernetes master" | \
17 awk -F ":" '{print $2}' | awk -F "//" '{print $2}')
18 onap_svc_node_port=30498
20 declare -i interval=10
22 base_url="http://$master_ip:$onap_svc_node_port/v1"
24 function check_onap_svc {
25 while ((timeout > 0)); do
26 echo "try $timeout: Wait for $interval seconds to check for onap svc"
28 call_api "$base_url/healthcheck"
30 if [[ $call_api_ret -eq 0 ]]; then
31 echo "onap svc health check is success"
39 echo "Failed to check for onap svc"