+ export 'PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
+ RESP_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=dmaap-bc-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 ]
+ ls dmaap/onap.json
+ do_http_post dmaap/onap.json dmaap
+ RETRY_TIME=60
+ '[' -n  ]
+ true
+ '[' dmaap '!=' feeds -a dmaap '!=' topics ]
+ cat dmaap/onap.json
+ envsubst
+ req_body='{
  "dmaapName": "onap",
  "drProvUrl": "http://dmaap-dr-prov:8080",
  "version": "1",
  "topicNsRoot": "org.onap.dmaap",
  "bridgeAdminTopic": "DCAE_MM_AGENT"
}'
+ '[' -n  ]
+ xcurl -o /dev/null -d '{
  "dmaapName": "onap",
  "drProvUrl": "http://dmaap-dr-prov:8080",
  "version": "1",
  "topicNsRoot": "org.onap.dmaap",
  "bridgeAdminTopic": "DCAE_MM_AGENT"
}' http://dmaap-bc:8080/webapi/dmaap
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
  "dmaapName": "onap",
  "drProvUrl": "http://dmaap-dr-prov:8080",
  "version": "1",
  "topicNsRoot": "org.onap.dmaap",
  "bridgeAdminTopic": "DCAE_MM_AGENT"
}' http://dmaap-bc:8080/webapi/dmaap
+ rc=200
+ '[' 200 '=' 200 -o 200 '=' 201 -o 200 '=' 409 ]
+ echo 'Http Post request is successful with response code=200'
+ break
+ '[' -d dcaeLocations ]
Http Post request is successful with response code=200
+ ls dcaeLocations/san-francisco.json
+ do_http_post dcaeLocations/san-francisco.json dcaeLocations
+ RETRY_TIME=60
+ '[' -n  ]
+ true
+ '[' dcaeLocations '!=' feeds -a dcaeLocations '!=' topics ]
+ cat dcaeLocations/san-francisco.json
+ envsubst
+ req_body='{
  "dcaeLayer": "kubernetes-central",
  "dcaeLocationName": "san-francisco"
}'
+ '[' -n  ]
+ xcurl -o /dev/null -d '{
  "dcaeLayer": "kubernetes-central",
  "dcaeLocationName": "san-francisco"
}' http://dmaap-bc:8080/webapi/dcaeLocations
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
  "dcaeLayer": "kubernetes-central",
  "dcaeLocationName": "san-francisco"
}' http://dmaap-bc:8080/webapi/dcaeLocations
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request is successful with response code=201'
+ break
+ '[' -d mr_clusters ]
Http Post request is successful with response code=201
+ ls mr_clusters/san-francisco.json
+ do_http_post mr_clusters/san-francisco.json mr_clusters
+ RETRY_TIME=60
+ '[' -n  ]
+ true
+ '[' mr_clusters '!=' feeds -a mr_clusters '!=' topics ]
+ cat mr_clusters/san-francisco.json
+ envsubst
+ req_body='{
  "dcaeLocationName": "san-francisco",
  "fqdn": "message-router",
  "topicProtocol": "http",
  "topicPort": "3904"
}'
+ '[' -n  ]
+ xcurl -o /dev/null -d '{
  "dcaeLocationName": "san-francisco",
  "fqdn": "message-router",
  "topicProtocol": "http",
  "topicPort": "3904"
}' http://dmaap-bc:8080/webapi/mr_clusters
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
  "dcaeLocationName": "san-francisco",
  "fqdn": "message-router",
  "topicProtocol": "http",
  "topicPort": "3904"
}' http://dmaap-bc:8080/webapi/mr_clusters
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
Http Post request is successful with response code=201
+ echo 'Http Post request is successful with response code=201'
+ break
+ '[' -d topics ]
+ ls topics/test_topic.json
+ do_http_post topics/test_topic.json topics
+ RETRY_TIME=60
+ '[' -n  ]
+ true
+ '[' topics '!=' feeds -a topics '!=' topics ]
+ xcurl -o /dev/null -d @topics/test_topic.json 'http://dmaap-bc:8080/webapi/topics/?useExisting=true'
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d @topics/test_topic.json 'http://dmaap-bc:8080/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 ]
Http Post request for feed creation is successful with response code=201
+ '[' -d dr_nodes ]
+ ls 'dr_nodes/*.json'
ls: dr_nodes/*.json: No such file or directory
+ '[' -d feeds ]
+ ls feeds/test_feed.json
+ do_http_post feeds/test_feed.json feeds
+ RETRY_TIME=60
+ '[' -n  ]
+ true
+ '[' feeds '!=' feeds -a feeds '!=' topics ]
+ xcurl -o /dev/null -d @feeds/test_feed.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: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d @feeds/test_feed.json 'http://dmaap-bc:8080/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 ]
+ '[' -d dr_subs ]
Http Post request for feed creation is successful with response code=200
