blob: 5735d72dbb45a19bae957fd3ce11a51c88662b50 [file] [log] [blame]
Dimitrios Mavrommatisa9df5962017-12-05 15:11:04 -08001#!/bin/bash
2
3if [ "$#" -eq 2 ]; then
4 echo ""
5 json='{
6 "input": {
7 "op-id": "3",
8 "targets": [
9 {
10 "target": "/ietf-dmm-fpcagent:tenants/tenant=default/fpc-mobility/contexts='$2'"
11 }
12 ],
13 "client-id": "1",
14 "session-state": "complete",
15 "admin-state": "enabled",
16 "op-type": "'$1'",
17 "op-ref-scope": "none"
18 }
19 }'
20
21 curl -X POST \
22 --header 'Content-Type: application/json' \
23 -u onos:rocks \
24 --header 'Accept: application/json' \
25 -d "$json" \
26 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool
27else
28 echo "usage: "$0" type contextId"
29fi