3 # ============LICENSE_START===============================================
4 # Copyright (C) 2021 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
20 # The scripts in data/ will generate some dummy data in the running system.
21 # It will send a dmaap msg of job to mediator:
24 # ./sendMsgToMediator.sh [dmaap-mr port] [http/https]
26 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
27 bash ${SHELL_FOLDER}/prepareIcsData.sh
29 dmaa_mr_port=${1:-3904}
32 echo "using dmaap-mr port: "$dmaa_mr_port
33 echo "using protocol: "$httpx
36 echo "dmaap-mr topics:"
37 curl -skw %{http_code} $httpx://localhost:$dmaa_mr_port/topics/listAll
40 echo "dmaap-mr create topic unauthenticated.VES_NOTIFICATION_OUTPUT:"
41 curl -skw %{http_code} -X POST "$httpx://localhost:$dmaa_mr_port/topics/create" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"topicName\": \"unauthenticated.VES_NOTIFICATION_OUTPUT\", \"topicDescription\": \"test topic\", \"partitionCount\": 1, \"replicationCount\": 1, \"transactionEnabled\": \"false\"}"
44 echo "dmaap-mr topics:"
45 curl -skw %{http_code} $httpx://localhost:$dmaa_mr_port/topics/listAll
48 echo "send job msg to dmaap-mr:"
49 curl -k -X POST -sw %{http_code} -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$dmaa_mr_port/events/unauthenticated.VES_NOTIFICATION_OUTPUT/" --data-binary @${SHELL_FOLDER}/testdata/dmaap-mediator-java/job.json