4 ping_mgmt_ip='<rw_mgmt_ip>'
7 # VNF specific configuration
8 pong_server_ip='<rw_connection_point_name pong_vnfd/cp0>'
12 # Make rest API calls to configure VNF
14 -H "Accept: application/vnd.yang.data+xml" \
15 -H "Content-Type: application/vnd.yang.data+json" \
17 -d "{\"ip\":\"$pong_server_ip\", \"port\":$server_port}" \
18 http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/server
22 echo "Failed to set server info for ping!"
27 -H "Accept: application/vnd.yang.data+xml" \
28 -H "Content-Type: application/vnd.yang.data+json" \
30 -d "{\"rate\":$ping_rate}" \
31 http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/rate
35 echo "Failed to set ping rate!"
39 output=$(curl -D /dev/stdout \
40 -H "Accept: application/vnd.yang.data+xml" \
41 -H "Content-Type: application/vnd.yang.data+json" \
43 -d "{\"enable\":true}" \
44 http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/adminstatus/state)
45 if [[ $output == *"Internal Server Error"* ]]