slowr | a65d87f | 2018-01-21 20:40:55 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ "$#" -eq 1 ]; then |
| 4 | echo "" |
| 5 | curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{ |
| 6 | "dpns": [ |
| 7 | { |
Carmelo Cascone | 773fcc0 | 2018-01-23 20:10:43 -0500 | [diff] [blame] | 8 | "dpn-id": "'$1'", |
slowr | a65d87f | 2018-01-21 20:40:55 +0200 | [diff] [blame] | 9 | "dpn-name": "site1-anchor1", |
| 10 | "dpn-groups": [ |
| 11 | "foo" |
| 12 | ], |
| 13 | "node-id": "node'$1'", |
| 14 | "network-id": "network'$1'", |
| 15 | "control-protocol": "p4-dpn-control-protocol", |
| 16 | "abstract": false |
| 17 | } |
| 18 | ] |
| 19 | }' 'http://192.168.105.14:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology' |
| 20 | echo "" |
| 21 | else |
| 22 | echo "usage: "$0" dpnId (tenantId)" |
| 23 | fi |