aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-pmmapper
diff options
context:
space:
mode:
authorrajendrajaiswal <rajendra.jaiswal@ericsson.com>2019-03-21 16:31:19 +0000
committerRajendra Jaiswal <rajendra.jaiswal@ericsson.com>2019-03-27 15:22:40 +0000
commit59a78505388a584234c1916a0062b3230f0192aa (patch)
treecc080fedc053d003a73b8bf2ff801368cc314279 /plans/dcaegen2-pmmapper
parent83cb247902ae67bc2a8c1f10309a7a3b55acce79 (diff)
Setup files to support PM Mapper Publishing
Change-Id: Ic3b2e0817cf1542383e081415d011346c64bf646 Issue-ID: INT-863 Signed-off-by: rajendrajaiswal <rajendra.jaiswal@ericsson.com>
Diffstat (limited to 'plans/dcaegen2-pmmapper')
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/config.json4
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml1
-rwxr-xr-xplans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh44
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/setup.sh4
4 files changed, 40 insertions, 13 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
index 5eec4380..79b32012 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
+++ b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
@@ -19,8 +19,8 @@
"type": "message_router",
"aaf_password": null,
"dmaap_info": {
- "topic_url": "https://message-router:3904/events/org.onap.dmaap.onapCSIT.pm_mapper",
- "client_role": "org.onap.dmaap.client.pub",
+ "topic_url": "http://message-router:3904/events/topic.org.onap.dmaap.mr.test1",
+ "client_role": "org.onap.dmaap.mr.topic",
"location": "csit-pmmapper",
"client_id": null
},
diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml
index b14a73c6..a7f5b973 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml
+++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml
@@ -12,3 +12,4 @@ services:
extra_hosts:
- "dmaap-bc:BUSIP"
- "dmaap-dr-node:DRNODEIP"
+ - "message-router:DMAAPMRIP"
diff --git a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
index 14051121..14302589 100755
--- a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
@@ -1,22 +1,23 @@
#!/bin/bash
# $1 is the IP address of the buscontroller
+
# INITIALIZE: dmaap object
+echo $'\nInitializing /dmaap endpoint'
JSON=/tmp/dmaap.json
cat << EOF > $JSON
{
"version": "1",
-"topicNsRoot": "org.onap.dmaap",
+"topicNsRoot": "topic.org.onap.dmaap",
"drProvUrl": "https://dmaap-dr-prov:8443",
-"dmaapName": "DataRouter",
+"dmaapName": "mr",
"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
# INITIALIZE: dcaeLocation object
+echo $'\nInitializing /dcaeLocations endpoint'
JSON=/tmp/dcaeLocation.json
cat << EOF > $JSON
{
@@ -26,26 +27,25 @@ cat << EOF > $JSON
"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
+echo $'\nInitializing /mr_clusters endpoint'
+DMAAP=$(docker ps -a -q --filter="name=dmaap_1")
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",
+"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
+echo $'\nInitializing /feeds endpoint'
JSON=/tmp/feed.json
cat << EOF > $JSON
{
@@ -67,6 +67,30 @@ cat << EOF > $JSON
]
}
EOF
-echo "Initializing /feeds endpoint"
curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/feeds
+
+# CREATING: MR Topic
+echo $'\nInitializing /topic endpoint'
+JSON=/tmp/topic.json
+cat << EOF > $JSON
+{
+"topicName":"test1",
+"topicDescription":"PM Mapper - VES Event",
+"owner":"pmmapper"
+}
+EOF
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/topics
+
+# CREATING: MR Client
+echo $'\nInitializing /mr_clients endpoint'
+JSON=/tmp/mrclients.json
+cat << EOF > $JSON
+{
+"fqtn": "topic.org.onap.dmaap.mr.test1",
+"dcaeLocationName": "csit-pmmapper",
+"clientRole": "org.onap.dmaap.mr.topic",
+"action": [ "pub", "view" ]
+}
+EOF
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clients
sleep 5 \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
index 2924bd21..18d82373 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
@@ -122,6 +122,7 @@ CBS_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddres
sed -i 's/CBSIP/'$CBS_IP'/g' docker-compose.yml
sed -i 's/BUSIP/'$DMAAPBC_IP'/g' docker-compose.yml
sed -i 's/DRNODEIP/'$DR_NODE_IP'/g' docker-compose.yml
+sed -i 's/DMAAPMRIP/'$DMAAP_MR_IP'/g' docker-compose.yml
docker-compose up -d
# Wait for initialization of Docker container for 3GPP PM Mapper
@@ -143,6 +144,7 @@ docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/p
cat /tmp/pmmapper.log
docker exec buscontroller /bin/sh -c "cat /opt/app/dmaapbc/logs/ONAP/application.log"
curl -k https://$DR_PROV_IP:8443/internal/prov
+curl http://${DMAAP_MR_IP}:3904/events/topic.org.onap.dmaap.mr.test1/CG1/C1?timeout=1000
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAPBC_IP:${DMAAPBC_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}" \ No newline at end of file
+ROBOT_VARIABLES="-v DMAAP_MR_IP:${DMAAP_MR_IP} -v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAPBC_IP:${DMAAPBC_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}" \ No newline at end of file