fix issue with xalan install
[osm/SO.git] / rwcm / test / ping_pong_nsd / pong_vnfd_11_scriptconf_template.cfg
1 #!/bin/bash
2
3 # Rest API configuration
4 pong_mgmt_ip='<rw_mgmt_ip>'
5 pong_mgmt_port=18889
6
7 # Test
8 # username=<rw_username>
9 # password=<rw_password>
10
11 # VNF specific configuration
12 pong_server_ip='<rw_connection_point_name pong_vnfd/cp0>'
13 server_port=5555
14
15 # Make Rest API calls to configure VNF
16 curl -D /dev/stdout \
17     -H "Accept: application/vnd.yang.data+xml" \
18     -H "Content-Type: application/vnd.yang.data+json" \
19     -X POST \
20     -d "{\"ip\":\"$pong_server_ip\", \"port\":$server_port}" \
21     http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/server
22 rc=$?
23 if [ $rc -ne 0 ]
24 then
25     echo "Failed to set server(own) info for pong!"
26     exit $rc
27 fi
28
29 curl -D /dev/stdout \
30     -H "Accept: application/vnd.yang.data+xml" \
31     -H "Content-Type: application/vnd.yang.data+json" \
32     -X POST \
33     -d "{\"enable\":true}" \
34     http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/adminstatus/state
35 rc=$?
36 if [ $rc -ne 0 ]
37 then
38     echo "Failed to enable pong service!"
39     exit $rc
40 fi
41
42 exit 0