Dimitrios Mavrommatis | a9df596 | 2017-12-05 15:11:04 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ "$#" -eq 3 ]; then |
| 4 | echo "" |
| 5 | curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{ |
| 6 | "input": { |
| 7 | "client-id": "1", |
| 8 | "highest-op-ref-scope": "bundle", |
| 9 | "bundles": [ |
| 10 | { |
| 11 | "admin-state": "enabled", |
| 12 | "client-id": "1", |
| 13 | "contexts": [ |
| 14 | { |
| 15 | "context-id": '$2', |
| 16 | "delegating-ip-prefixes": [ |
| 17 | "192.168.1.5/32" |
| 18 | ], |
| 19 | "dl": { |
| 20 | "dpn-parameters": {}, |
| 21 | "mobility-tunnel-parameters": { |
| 22 | "tunnel-identifier": "2222", |
| 23 | "tunnel-type": "gtpv1" |
| 24 | }, |
| 25 | "tunnel-local-address": "192.168.1.1", |
| 26 | "tunnel-remote-address": "10.1.1.1" |
| 27 | }, |
| 28 | "dpn-group": "foo", |
| 29 | "dpns": [ |
| 30 | { |
| 31 | "direction": "uplink", |
| 32 | "dpn-id": '$3', |
| 33 | "dpn-parameters": {} |
| 34 | } |
| 35 | ], |
| 36 | "ebi": "5", |
| 37 | "imsi": "9135551234", |
| 38 | "instructions": { |
| 39 | "instr-3gpp-mob": "session uplink" |
| 40 | }, |
| 41 | "lbi": "5", |
| 42 | "ul": { |
| 43 | "dpn-parameters": {}, |
| 44 | "mobility-tunnel-parameters": { |
| 45 | "tunnel-identifier": "1111", |
| 46 | "tunnel-type": "gtpv1" |
| 47 | }, |
| 48 | "tunnel-local-address": "192.168.1.1", |
| 49 | "tunnel-remote-address": "10.1.1.1" |
| 50 | } |
| 51 | } |
| 52 | ], |
| 53 | "op-id": "1", |
| 54 | "op-ref-scope": "op", |
| 55 | "op-type": '$1', |
| 56 | "session-state": "complete" |
| 57 | } |
| 58 | ] |
| 59 | } |
| 60 | }' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure-bundles' | python -m json.tool |
| 61 | echo "" |
| 62 | else |
| 63 | echo "usage: "$0" type contextId dpnId" |
| 64 | fi |