blob: d2b820bbf5ff3fccb7d5ee71462ef121df7a27d3 [file] [log] [blame]
slowra65d87f2018-01-21 20:40:55 +02001#!/bin/bash
2
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 "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 ""
21else
22 echo "usage: "$0" dpnId (tenantId)"
23fi