3 # $1 is the IP address of the buscontroller
5 # INITIALIZE: dmaap object
10 "topicNsRoot": "org.onap.dmaap",
11 "drProvUrl": "https://dmaap-dr-prov:8443",
12 "dmaapName": "onapCSIT",
13 "bridgeAdminTopic": "MM_AGENT_PROV"
18 echo "Initializing /dmaap endpoint"
19 curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/dmaap
22 # INITIALIZE: dcaeLocation object
26 "dcaeLocationName": "csit-sanfrancisco",
27 "dcaeLayer": "central-cloud",
34 echo "Initializing /dcaeLocations endpoint"
35 curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/dcaeLocations
38 # INITIALIZE: MR object in 1 site
39 # since MR is currently deployed via docker-compose, its IP doesn't seem
40 # to be routable from DBCL. Fortunately, the MR port is mapped from the docker bridge IP address.
41 # Found this article for how to deterine the docker bridge IP so using it as a workaround.
42 # https://stackoverflow.com/questions/22944631/how-to-get-the-ip-address-of-the-docker-host-from-inside-a-docker-container
43 # Used the following snippet found buried in a comment to an answer and then modified for only 1 value.
44 DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 )
45 # Perhaps there is a better way...
49 "dcaeLocationName": "csit-sanfrancisco",
50 "fqdn": "message-router",
51 "topicProtocol" : "http",
57 echo "Initializing /mr_clusters endpoint"
58 curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/mr_clusters