blob: 18e5e421c16328fd3c2e7269372c3a1a11518611 [file] [log] [blame]
Dimitrios Mavrommatis45eb6d62017-12-03 22:07:36 -08001#!/bin/bash
Dimitrios Mavrommatisa9df5962017-12-05 15:11:04 -08002
3if [ "$#" -eq 1 ]; then
4 echo ""
5 curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
6 "dpns": [
7 {
8 "dpn-id": '$1',
9 "dpn-name": "site1-anchor1",
10 "dpn-groups": [
11 "foo"
12 ],
13 "node-id": "node'$1'",
Dimitrios Mavrommatis2b9f5f82017-12-07 16:23:13 -080014 "network-id": "network'$1'",
15 "control-protocol": "zmq-dpn-control-protocol"
Dimitrios Mavrommatisa9df5962017-12-05 15:11:04 -080016 }
17 ]
18 }' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology'
19 ./getTenants.sh
20 echo ""
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080021elif [ "$#" -eq 2 ]; then
22 echo ""
23 curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
24 "dpns": [
25 {
26 "dpn-id": '$1',
27 "dpn-name": "site1-anchor1",
28 "dpn-groups": [
29 "foo"
30 ],
31 "node-id": "node'$1'",
Dimitrios Mavrommatis2b9f5f82017-12-07 16:23:13 -080032 "network-id": "network'$1'",
33 "control-protocol": "zmq-dpn-control-protocol"
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080034 }
35 ]
36 }' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant='$2'/fpc-topology'
37 ./getTenants.sh
38 echo ""
Dimitrios Mavrommatisa9df5962017-12-05 15:11:04 -080039else
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080040 echo "usage: "$0" dpnId (tenantId)"
41fi