blob: 7ec7345d5a0a1d0d6a21cd657f3d65c122e550d9 [file] [log] [blame]
dglFromAtt62b8b122018-03-03 11:57:29 -05001#!/bin/bash
2
3# $1 is the IP address of the buscontroller
4# $2 is the IP address of the DRPS
5# $3 is the IP address of the MRC
6
7# INITIALIZE: dmaap object
8JSON=/tmp/$$.dmaap
9cat << EOF > $JSON
10{
11 "version": "1",
12 "topicNsRoot": "org.onap.dmaap",
13 "drProvUrl": "http://${2}:8080",
14 "dmaapName": "onapCSIT",
15 "bridgeAdminTopic": "MM_AGENT_PROV"
16
17}
18EOF
19
20curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap
21
22
23
24# INITIALIZE: dcaeLocation object
25JSON=/tmp/$$.loc
26cat << EOF > $JSON
27{
28 "dcaeLocationName": "csit-sanfrancisco",
29 "dcaeLayer": "central-cloud",
30 "clli": "CSIT12345",
31 "zone": "zoneA"
32
33}
34EOF
35
36curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations
37
38
39# INITIALIZE: MR object in 1 site
40JSON=/tmp/$$.mrc
41cat << EOF > $JSON
42{
43 "dcaeLocationName": "csit-sanfrancisco",
44 "fqdn": "$3",
45 "hosts" : [ "$3", "$3", "$3" ],
46 "protocol" : "https",
47 "port": "3094"
48
49}
50EOF
51
52curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters