- config-delay: '60'
- config-priority: '1'
- config-template: "\n#!/bin/bash\n\n# Rest API configuration\npong_mgmt_ip='<rw_mgmt_ip>'\n\
- pong_mgmt_port=18889\n# username=<rw_username>\n# password=<rw_password>\n\
- \n# VNF specific configuration\npong_server_ip='<rw_connection_point_name\
- \ pong_vnfd/cp0>'\nserver_port=5555\n\n# Make Rest API calls to configure\
- \ VNF\ncurl -D /dev/stdout \\\n -H \"Accept: application/vnd.yang.data+xml\"\
- \ \\\n -H \"Content-Type: application/vnd.yang.data+json\" \\\n\
- \ -X POST \\\n -d \"{\\\"ip\\\":\\\"$pong_server_ip\\\", \\\"\
- port\\\":$server_port}\" \\\n http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/server\n\
- rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to set server(own)\
- \ info for pong!\"\n exit $rc\nfi\n\n\ncurl -D /dev/stdout \\\n\
- \ -H \"Accept: application/vnd.yang.data+xml\" \\\n -H \"Content-Type:\
- \ application/vnd.yang.data+json\" \\\n -X POST \\\n -d \"{\\\
- \"enable\\\":true}\" \\\n http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/adminstatus/state\n\
- rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to enable pong service!\"\
- \n exit $rc\nfi\n\nexit 0\n"
- script:
- script-type: bash