blob: f10859548e0f0ec8538c718d7379c81c27670d38 [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'",
14 "network-id": "network'$1'"
15 }
16 ]
17 }' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology'
18 ./getTenants.sh
19 echo ""
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080020elif [ "$#" -eq 2 ]; then
21 echo ""
22 curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
23 "dpns": [
24 {
25 "dpn-id": '$1',
26 "dpn-name": "site1-anchor1",
27 "dpn-groups": [
28 "foo"
29 ],
30 "node-id": "node'$1'",
31 "network-id": "network'$1'"
32 }
33 ]
34 }' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant='$2'/fpc-topology'
35 ./getTenants.sh
36 echo ""
Dimitrios Mavrommatisa9df5962017-12-05 15:11:04 -080037else
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080038 echo "usage: "$0" dpnId (tenantId)"
39fi