By type
+ 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=8443 + DBC=dmaap-bc + PROTO=https + PARAM='useExisting=true' + REQUESTID=dcae-pm-mapper-dmaap-provisioning + URL=https://dmaap-bc:8443/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 ] + ls topics/topicsConfig-0.json + do_http_post topics/topicsConfig-0.json topics + RETRY_TIME=60 + '[' -n /opt/app/config/cache ] + echo topicsConfig-0.json + cut -d . -f1 + RESP=/opt/app/config/cache/topicsConfig-0-resp.json + true + '[' topics '!=' feeds -a topics '!=' topics ] + xcurl -o /opt/app/config/cache/topicsConfig-0-resp.json -d @topics/topicsConfig-0.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true' + curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-pm-mapper-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/topicsConfig-0-resp.json -d @topics/topicsConfig-0.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true' + rc=201 + '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ] + echo 'Http Post request for feed creation is successful with response code=201' + break + '[' -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 Http Post request for feed creation is successful with response code=201 + 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 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true' + curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-pm-mapper-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true' + 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 ] Http Post request for feed creation is successful with response code=200 + '[' -d dr_subs ] + ls dr_subs/drsubConfig-0.json + do_http_post dr_subs/drsubConfig-0.json dr_subs + RETRY_TIME=60 + '[' -n /opt/app/config/cache ] + echo drsubConfig-0.json + cut -d . -f1 + RESP=/opt/app/config/cache/drsubConfig-0-resp.json + true + '[' dr_subs '!=' feeds -a dr_subs '!=' topics ] + cat dr_subs/drsubConfig-0.json + envsubst + req_body='{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' + '[' -n /opt/app/config/cache ] + '[' dr_subs '=' dr_pubs -o dr_subs '=' dr_subs ] + IF_PUB_SUB_EXIST=false + check_pub_sub dr_subs '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' /opt/app/config/cache/drsubConfig-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 ] Checking if pub or sub exist.. + echo 'Checking if pub or sub exist..' + val=subs + echo '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' + jq -r .username + dr_usr=username + echo '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' + jq -r .userpwd + dr_pwd=password + jq '.subs | length' /opt/app/config/cache/feedConfig-0-resp.json + pub_sub_cnt=1 + local 'i=0' + '[' 0 -lt 1 ] + jq -r '.subs[0].username' /opt/app/config/cache/feedConfig-0-resp.json + _dr_usr=username + jq -r '.subs[0].userpwd' /opt/app/config/cache/feedConfig-0-resp.json + _dr_pwd=password + '[' username '=' username -a password '=' password ] + '[' dr_subs '=' dr_pubs ] + '[' dr_subs '=' dr_subs ] + echo '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' + jq -r .dcaeLocationName + dr_loc=loc00 + jq -r '.subs[0].dcaeLocationName' /opt/app/config/cache/feedConfig-0-resp.json + _dr_loc=loc00 + echo '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' + jq -r .deliveryURL + dr_deliveryURL=https://dcae-pm-mapper:8443/delivery + jq -r '.subs[0].deliveryURL' /opt/app/config/cache/feedConfig-0-resp.json + _dr_deliveryURL=https://dcae-pm-mapper:8443/delivery + '[' loc00 '=' loc00 -a https://dcae-pm-mapper:8443/delivery '=' https://dcae-pm-mapper:8443/delivery ] + echo 'Subscriber exist with username: username, password: password, dcaeLocationName: loc00, deliveryURL: https://dcae-pm-mapper:8443/delivery' Subscriber exist with username: username, password: password, dcaeLocationName: loc00, deliveryURL: https://dcae-pm-mapper:8443/delivery + jq -c '.subs[0]' /opt/app/config/cache/feedConfig-0-resp.json DR Publisher or Subscriber already exist.. + echo '{"lastMod":1649242083437,"status":"VALID","dcaeLocationName":"loc00","username":"username","userpwd":"password","feedId":"1","deliveryURL":"https://dcae-pm-mapper:8443/delivery","logURL":"https://dmaap-dr-prov/sublog/1","subId":"1","use100":false,"suspended":false,"owner":"DGL","guaranteedDelivery":false,"guaranteedSequence":false,"privilegedSubscriber":true,"decompress":true,"feedName":null,"feedVersion":null,"statusValid":true}' + IF_PUB_SUB_EXIST=true + break + '[' true '=' true ] + echo 'DR Publisher or Subscriber already exist..' + break