blob: a7cd5c41866fa44cdcf463c7f92319c24f5d6256 [file] [log] [blame]
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -08001#!/bin/bash
2
3if [ "$#" -eq 2 ]; then
4 echo ""
5 curl -i -s \
6 --header "Content-type: application/json" \
7 --request POST \
8 -u onos:rocks \
9 --data '{
10 "input": {
11 "client-id": "'$1'",
12 "tenant-id": "'$2'",
13 "supported-features": [
14 "urn:ietf:params:xml:ns:yang:fpcagent:fpc-bundles",
15 "urn:ietf:params:xml:ns:yang:fpcagent:operation-ref-scope",
16 "urn:ietf:params:xml:ns:yang:fpcagent:fpc-agent-assignments",
17 "urn:ietf:params:xml:ns:yang:fpcagent:instruction-bitset"
18 ],
19 "endpoint-uri": "http://127.0.0.1:9997/"
20 }
21 }' 'http://localhost:8181/onos/restconf/operations/fpc:register-client'
22 echo ""
Dimitrios Mavrommatis6d4d5ce2017-12-13 11:35:55 -080023elif [ "$#" -eq 1 ]; then
24 echo ""
25 curl -i -s \
26 --header "Content-type: application/json" \
27 --request POST \
28 -u onos:rocks \
29 --data '{
30 "input": {
31 "client-id": "'$1'",
32 "tenant-id": "default",
33 "supported-features": [
34 "urn:ietf:params:xml:ns:yang:fpcagent:fpc-bundles",
35 "urn:ietf:params:xml:ns:yang:fpcagent:operation-ref-scope",
36 "urn:ietf:params:xml:ns:yang:fpcagent:fpc-agent-assignments",
37 "urn:ietf:params:xml:ns:yang:fpcagent:instruction-bitset"
38 ],
39 "endpoint-uri": "http://127.0.0.1:9997/"
40 }
41 }' 'http://localhost:8181/onos/restconf/operations/fpc:register-client'
42 echo ""
Dimitrios Mavrommatis7c0ff012017-12-07 00:25:58 -080043else
44 echo "usage: "$0" clientId tenantId"
45fi