+ export 'PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' + RESP_CACHE=/opt/app/config/cache + RESP=/dev/null + APP_ROOT=/opt/app/dbc-client + IF_PUB_SUB_EXIST=false + CONFIGMAP_ROOT=/opt/app/config + PORT=8080 + DBC=dmaap-bc + PROTO=http + PARAM='useExisting=true' + REQUESTID=dcae-datafile-collector-dmaap-provisioning + URL=http://dmaap-bc:8080/webapi/ + CA_PEM=ca.pem + KEY_PEM=key.pem + CLIENT_PEM=client.pem + PEM_DIR=/opt/app/osaaf/local + CERT_PWD='2U[iOZzMHI:.#tdCwlBqc;}S' + BA_PWD='demo123456!' + AUTH_METHOD=basicAuth + BA_IDENTITY=dmaap-bc@dmaap-bc.onap.org + init_config + '[' '!' -d /opt/app/dbc-client -a '!' -d /opt/app/config ] + cd /opt/app/osaaf/local + '[' basicAuth '=' basicAuth ] + echo '-u dmaap-bc@dmaap-bc.onap.org:demo123456!' + CURL_CRED='-K /opt/app/osaaf/local/curl.cred' + init_dbc_provisioning + cd /opt/app/config + '[' -d dmaap ] + '[' -d dcaeLocations ] + '[' -d mr_clusters ] + '[' -d topics ] + '[' -d mr_clients ] + '[' -d dr_nodes ] + '[' -d feeds ] + ls feeds/feedConfig-0.json + do_http_post feeds/feedConfig-0.json feeds + RETRY_TIME=60 + '[' -n /opt/app/config/cache ] + echo feedConfig-0.json + cut -d . -f1 + RESP=/opt/app/config/cache/feedConfig-0-resp.json + true + '[' feeds '!=' feeds -a feeds '!=' topics ] + xcurl -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'http://dmaap-bc:8080/webapi/feeds/?useExisting=true' + curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-datafile-collector-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'http://dmaap-bc:8080/webapi/feeds/?useExisting=true' Http Post request for feed creation is successful with response code=200 + rc=200 + '[' 200 '=' 200 -o 200 '=' 201 -o 200 '=' 409 ] + echo 'Http Post request for feed creation is successful with response code=200' + break + '[' -d dr_pubs ] + ls dr_pubs/drpubConfig-0.json + do_http_post dr_pubs/drpubConfig-0.json dr_pubs + RETRY_TIME=60 + '[' -n /opt/app/config/cache ] + echo drpubConfig-0.json + cut -d . -f1 + RESP=/opt/app/config/cache/drpubConfig-0-resp.json + true + '[' dr_pubs '!=' feeds -a dr_pubs '!=' topics ] + cat dr_pubs/drpubConfig-0.json + envsubst + req_body='{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' + '[' -n /opt/app/config/cache ] + '[' dr_pubs '=' dr_pubs -o dr_pubs '=' dr_subs ] + IF_PUB_SUB_EXIST=false + check_pub_sub dr_pubs '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' /opt/app/config/cache/drpubConfig-0-resp.json + echo 0 + feed_config_resp=/opt/app/config/cache/feedConfig-0-resp.json + '[' -f /opt/app/config/cache/feedConfig-0-resp.json ] + echo 'Checking if pub or sub exist..' + val=pubs Checking if pub or sub exist.. + echo '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' + jq -r .username + dr_usr=username + echo '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' + jq -r .userpwd + dr_pwd=password + jq '.pubs | length' /opt/app/config/cache/feedConfig-0-resp.json + pub_sub_cnt=1 + local 'i=0' + '[' 0 -lt 1 ] + jq -r '.pubs[0].username' /opt/app/config/cache/feedConfig-0-resp.json + _dr_usr=tmp_luun2xolvsyet28 + jq -r '.pubs[0].userpwd' /opt/app/config/cache/feedConfig-0-resp.json + _dr_pwd=fhw13ikzki64227 + '[' username '=' tmp_luun2xolvsyet28 -a password '=' fhw13ikzki64227 ] + i=1 + '[' 1 -lt 1 ] + '[' false '=' true ] + xcurl -o /opt/app/config/cache/drpubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' http://dmaap-bc:8080/webapi/dr_pubs + curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-datafile-collector-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/drpubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed","username":"username","userpwd":"password"}' http://dmaap-bc:8080/webapi/dr_pubs Http Post request is successful with response code=201 + rc=201 + '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ] + echo 'Http Post request is successful with response code=201' + break + '[' -d dr_subs ]