aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
diff options
context:
space:
mode:
authorDominic Lunanuova <dgl@research.att.com>2018-08-23 21:49:47 +0000
committerDominic Lunanuova <dgl@research.att.com>2018-08-24 23:10:30 +0000
commitbfb3ea4aed9d1727338f475fab5349f07723aca5 (patch)
treedb65074394cc63e6e944c92b6c533adc7f4f9421 /test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
parent2e310fe144e326f16c95e7ac5ebc9d41c78a7e48 (diff)
CSIT Buscontroller SSL endpoints
Change-Id: I3de5b48f1d471f6c5e067deba7a06c19c3585de5 Signed-off-by: Dominic Lunanuova <dgl@research.att.com> Issue-ID: DMAAP-319 Signed-off-by: Dominic Lunanuova <dgl@research.att.com>
Diffstat (limited to 'test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh')
-rwxr-xr-xtest/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
index 96ac40f18..c7cf03ef4 100755
--- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
+++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh
@@ -3,6 +3,21 @@
# $1 is the IP address of the buscontroller
# $2 is the IP address of the DRPS
# $3 is the IP address of the MRC
+# $4 is the protocol (defaults to http)
+
+PROTO=${4:-http}
+if [ "$PROTO" = "http" ]
+then
+ PORT=8080
+ CURLOPT="-v"
+ MRPORT=3904
+ DRPORT=8080
+else
+ PORT=8443
+ CURLOPT="-v -k"
+ MRPORT=3905
+ DRPORT=8443
+fi
# INITIALIZE: dmaap object
JSON=/tmp/$$.dmaap
@@ -10,7 +25,7 @@ cat << EOF > $JSON
{
"version": "1",
"topicNsRoot": "org.onap.dmaap",
- "drProvUrl": "http://${2}:8080",
+ "drProvUrl": "http://${2}:${DRPORT}",
"dmaapName": "onapCSIT",
"bridgeAdminTopic": "MM_AGENT_PROV"
@@ -18,7 +33,7 @@ cat << EOF > $JSON
EOF
echo "Initializing /dmaap endpoint"
-curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap
+curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dmaap
@@ -35,7 +50,7 @@ cat << EOF > $JSON
EOF
echo "Initializing /dcaeLocations endpoint"
-curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations
+curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dcaeLocations
# INITIALIZE: MR object in 1 site
@@ -52,10 +67,10 @@ cat << EOF > $JSON
"dcaeLocationName": "csit-sanfrancisco",
"fqdn": "$DOCKER_HOST",
"topicProtocol" : "http",
- "topicPort": "3904"
+ "topicPort": "${MRPORT}"
}
EOF
echo "Initializing /mr_clusters endpoint"
-curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters
+curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/mr_clusters