aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh')
-rwxr-xr-xplans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh51
1 files changed, 47 insertions, 4 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
index ffb1686c..bb8c6f26 100755
--- a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
@@ -1,18 +1,61 @@
#!/bin/bash
-
# $1 is the IP address of the buscontroller
# INITIALIZE: dmaap object
-JSON=/tmp/prov.dmaap
+JSON=/tmp/dmaap.json
cat << EOF > $JSON
{
"version": "1",
"topicNsRoot": "org.onap.dmaap",
"drProvUrl": "https://dmaap-dr-prov:8443",
-"dmaapName": "onapCSIT",
+"dmaapName": "DataRouter",
"bridgeAdminTopic": "MM_AGENT_PROV"
}
EOF
echo "Initializing /dmaap endpoint"
-curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap \ No newline at end of file
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap
+
+# INITIALIZE: dcaeLocation object
+JSON=/tmp/dcaeLocation.json
+cat << EOF > $JSON
+{
+"dcaeLocationName": "csit-pmmapper",
+"dcaeLayer": "central-cloud",
+"clli": "CSIT",
+"zone": "zoneA"
+}
+EOF
+
+echo "Initializing /dcaeLocations endpoint"
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations
+
+# INITIALIZE: MR object in 1 site
+DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP)
+JSON=/tmp/mr.json
+cat << EOF > $JSON
+{
+"dcaeLocationName": "csit-pmmapper",
+"fqdn": "$DMAAP_MR_IP",
+"topicProtocol" : "http",
+"topicPort": "3904"
+}
+EOF
+
+echo "Initializing /mr_clusters endpoint"
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters
+
+# CREATING: DR feed
+JSON=/tmp/feed.json
+cat << EOF > $JSON
+{
+"feedName":"pmmapper",
+"feedVersion": "1",
+"feedDescription":"PM Mapper Feed",
+"owner":"bulkpm",
+"asprClassification": "unclassified"
+}
+EOF
+echo "Initializing /feeds endpoint"
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/feeds
+sleep 5 \ No newline at end of file