dglFromAtt | 62b8b12 | 2018-03-03 11:57:29 -0500 | [diff] [blame] | 1 | #!/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 |
| 8 | JSON=/tmp/$$.dmaap |
| 9 | cat << 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 | } |
| 18 | EOF |
| 19 | |
| 20 | curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap |
| 21 | |
| 22 | |
| 23 | |
| 24 | # INITIALIZE: dcaeLocation object |
| 25 | JSON=/tmp/$$.loc |
| 26 | cat << EOF > $JSON |
| 27 | { |
| 28 | "dcaeLocationName": "csit-sanfrancisco", |
| 29 | "dcaeLayer": "central-cloud", |
| 30 | "clli": "CSIT12345", |
| 31 | "zone": "zoneA" |
| 32 | |
| 33 | } |
| 34 | EOF |
| 35 | |
| 36 | curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations |
| 37 | |
| 38 | |
| 39 | # INITIALIZE: MR object in 1 site |
| 40 | JSON=/tmp/$$.mrc |
| 41 | cat << EOF > $JSON |
| 42 | { |
| 43 | "dcaeLocationName": "csit-sanfrancisco", |
| 44 | "fqdn": "$3", |
| 45 | "hosts" : [ "$3", "$3", "$3" ], |
| 46 | "protocol" : "https", |
| 47 | "port": "3094" |
| 48 | |
| 49 | } |
| 50 | EOF |
| 51 | |
| 52 | curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters |