added benchmark and configure bundle
diff --git a/scripts/addDPN.sh b/scripts/addDPN.sh
index 9c77d37..b1d04d2 100755
--- a/scripts/addDPN.sh
+++ b/scripts/addDPN.sh
@@ -1,15 +1,22 @@
#!/bin/bash
-curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
- "dpns": [
- {
- "dpn-id": "1",
- "dpn-name": "site1-anchor1",
- "dpn-groups": [
- "foo"
- ],
- "node-id": "node1",
- "network-id": "network1"
- }
- ]
-}' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology'
-./getTenants.sh
\ No newline at end of file
+
+if [ "$#" -eq 1 ]; then
+ echo ""
+ curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
+ "dpns": [
+ {
+ "dpn-id": '$1',
+ "dpn-name": "site1-anchor1",
+ "dpn-groups": [
+ "foo"
+ ],
+ "node-id": "node'$1'",
+ "network-id": "network'$1'"
+ }
+ ]
+ }' 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology'
+ ./getTenants.sh
+ echo ""
+else
+ echo "usage: "$0" dpnId"
+fi
\ No newline at end of file
diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh
new file mode 100755
index 0000000..779875a
--- /dev/null
+++ b/scripts/benchmark.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+./addDPN.sh 1 &> /dev/null
+
+for (( i=1; i<=1000; i++)); do
+ ./configureCreateOrUpdate.sh create $i 1 &> /dev/null &
+ if ! (($i % 100)); then
+ wait
+ fi
+done
+
+for (( i=1; i<=1000; i++)); do
+ ./configureDeleteOrQuery.sh delete $i &> /dev/null &
+ if ! (($i % 100)); then
+ wait
+ fi
+done
+
+./deleteDPN.sh 1 &> /dev/null
\ No newline at end of file
diff --git a/scripts/configureBundles.sh b/scripts/configureBundles.sh
new file mode 100755
index 0000000..2108386
--- /dev/null
+++ b/scripts/configureBundles.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+if [ "$#" -eq 3 ]; then
+ echo ""
+ curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
+ "input": {
+ "client-id": "1",
+ "highest-op-ref-scope": "bundle",
+ "bundles": [
+ {
+ "admin-state": "enabled",
+ "client-id": "1",
+ "contexts": [
+ {
+ "context-id": '$2',
+ "delegating-ip-prefixes": [
+ "192.168.1.5/32"
+ ],
+ "dl": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "2222",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ },
+ "dpn-group": "foo",
+ "dpns": [
+ {
+ "direction": "uplink",
+ "dpn-id": '$3',
+ "dpn-parameters": {}
+ }
+ ],
+ "ebi": "5",
+ "imsi": "9135551234",
+ "instructions": {
+ "instr-3gpp-mob": "session uplink"
+ },
+ "lbi": "5",
+ "ul": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "1111",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ }
+ }
+ ],
+ "op-id": "1",
+ "op-ref-scope": "op",
+ "op-type": '$1',
+ "session-state": "complete"
+ }
+ ]
+ }
+ }' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure-bundles' | python -m json.tool
+ echo ""
+else
+ echo "usage: "$0" type contextId dpnId"
+fi
\ No newline at end of file
diff --git a/scripts/configureCreateOrUpdate.sh b/scripts/configureCreateOrUpdate.sh
new file mode 100755
index 0000000..5ce3bbe
--- /dev/null
+++ b/scripts/configureCreateOrUpdate.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+if [ "$#" -eq 3 ]; then
+ echo ""
+ json='{
+ "input": {
+ "admin-state": "enabled",
+ "client-id": "1",
+ "contexts": [
+ {
+ "context-id": '$2',
+ "delegating-ip-prefixes": [
+ "192.168.1.5/32"
+ ],
+ "dl": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "2222",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ },
+ "dpn-group": "foo",
+ "dpns": [
+ {
+ "direction": "uplink",
+ "dpn-id": '$3',
+ "dpn-parameters": {}
+ }
+ ],
+ "ebi": "5",
+ "imsi": "9135551234",
+ "instructions": {
+ "instr-3gpp-mob": "session uplink"
+ },
+ "lbi": "5",
+ "ul": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "1111",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ }
+ }
+ ],
+ "op-id": "1",
+ "op-ref-scope": "op",
+ "op-type": "'$1'",
+ "session-state": "complete"
+ }
+ }'
+
+ curl -X POST \
+ --header 'Content-Type: application/json' \
+ -u onos:rocks \
+ --header 'Accept: application/json' \
+ -d "$json" \
+ 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool
+ echo ""
+else
+ echo "usage: "$0" type contextId dpnId"
+fi
\ No newline at end of file
diff --git a/scripts/configureDeleteOrQuery.sh b/scripts/configureDeleteOrQuery.sh
new file mode 100755
index 0000000..5735d72
--- /dev/null
+++ b/scripts/configureDeleteOrQuery.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+if [ "$#" -eq 2 ]; then
+ echo ""
+ json='{
+ "input": {
+ "op-id": "3",
+ "targets": [
+ {
+ "target": "/ietf-dmm-fpcagent:tenants/tenant=default/fpc-mobility/contexts='$2'"
+ }
+ ],
+ "client-id": "1",
+ "session-state": "complete",
+ "admin-state": "enabled",
+ "op-type": "'$1'",
+ "op-ref-scope": "none"
+ }
+ }'
+
+ curl -X POST \
+ --header 'Content-Type: application/json' \
+ -u onos:rocks \
+ --header 'Accept: application/json' \
+ -d "$json" \
+ 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool
+else
+ echo "usage: "$0" type contextId"
+fi
\ No newline at end of file
diff --git a/scripts/createRPC.sh b/scripts/createRPC.sh
deleted file mode 100755
index 621f6df..0000000
--- a/scripts/createRPC.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
- "input": {
- "admin-state": "enabled",
- "client-id": "1",
- "contexts": [
- {
- "context-id": 202374887,
- "delegating-ip-prefixes": [
- "192.168.1.5/32"
- ],
- "dl": {
- "dpn-parameters": {},
- "mobility-tunnel-parameters": {
- "tunnel-identifier": "2222",
- "tunnel-type": "gtpv1"
- },
- "tunnel-local-address": "192.168.1.1",
- "tunnel-remote-address": "10.1.1.1"
- },
- "dpn-group": "foo",
- "dpns": [
- {
- "direction": "uplink",
- "dpn-id": "1",
- "dpn-parameters": {}
- }
- ],
- "ebi": "5",
- "imsi": "9135551234",
- "instructions": {
- "instr-3gpp-mob": "session uplink"
- },
- "lbi": "5",
- "ul": {
- "dpn-parameters": {},
- "mobility-tunnel-parameters": {
- "tunnel-identifier": "1111",
- "tunnel-type": "gtpv1"
- },
- "tunnel-local-address": "192.168.1.1",
- "tunnel-remote-address": "10.1.1.1"
- }
- }
- ],
- "op-id": "1",
- "op-ref-scope": "op",
- "op-type": "create",
- "session-state": "complete"
- }
-}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool
diff --git a/scripts/deleteContext.sh b/scripts/deleteContext.sh
deleted file mode 100755
index 0e9eda8..0000000
--- a/scripts/deleteContext.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-mobility/contexts=202374887'
-./getTenants.sh
\ No newline at end of file
diff --git a/scripts/deleteContextDl.sh b/scripts/deleteContextDl.sh
deleted file mode 100755
index 64f6c2b..0000000
--- a/scripts/deleteContextDl.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-mobility/contexts=202374887/dl'
-./getTenants.sh
\ No newline at end of file
diff --git a/scripts/deleteDPN.sh b/scripts/deleteDPN.sh
index f210b60..6633e47 100755
--- a/scripts/deleteDPN.sh
+++ b/scripts/deleteDPN.sh
@@ -1,3 +1,8 @@
#!/bin/bash
-curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology/dpns=1'
-./getTenants.sh
+if [ "$#" -eq 1 ]; then
+ echo ""
+ curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology/dpns='$1
+ ./getTenants.sh
+else
+ echo "usage: "$0" dpnId"
+fi
\ No newline at end of file
diff --git a/scripts/deleteRPC.sh b/scripts/deleteRPC.sh
deleted file mode 100755
index 772b61b..0000000
--- a/scripts/deleteRPC.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
- "input": {
- "op-id": "3",
- "targets": [
- {
- "target": "/ietf-dmm-fpcagent:tenants/tenant=default/fpc-mobility/contexts=202374887"
- }
- ],
- "client-id": "1",
- "session-state": "complete",
- "admin-state": "enabled",
- "op-type": "delete",
- "op-ref-scope": "none"
- }
-}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool
diff --git a/scripts/getFpcAgentInfo.sh b/scripts/getFpcAgentInfo.sh
index 4a45b20..75696a5 100755
--- a/scripts/getFpcAgentInfo.sh
+++ b/scripts/getFpcAgentInfo.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-curl -u onos:rocks http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:fpc-agent-info
+curl -u onos:rocks http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:fpc-agent-info | python -m json.tool
diff --git a/scripts/updateRPC.sh b/scripts/updateRPC.sh
deleted file mode 100755
index de934bf..0000000
--- a/scripts/updateRPC.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
- "input": {
- "admin-state": "enabled",
- "client-id": "1",
- "contexts": [
- {
- "context-id": 202374887,
- "delegating-ip-prefixes": [
- "192.168.1.5/32"
- ],
- "dl": {
- "dpn-parameters": {},
- "mobility-tunnel-parameters": {
- "tunnel-identifier": "2222",
- "tunnel-type": "gtpv1"
- },
- "tunnel-local-address": "192.168.1.1",
- "tunnel-remote-address": "10.1.1.1"
- },
- "dpn-group": "foo",
- "dpns": [
- {
- "direction": "uplink",
- "dpn-id": "1",
- "dpn-parameters": {}
- }
- ],
- "ebi": "5",
- "imsi": "9135551234",
- "instructions": {
- "instr-3gpp-mob": "session uplink"
- },
- "lbi": "5",
- "ul": {
- "dpn-parameters": {},
- "mobility-tunnel-parameters": {
- "tunnel-identifier": "1111",
- "tunnel-type": "gtpv1"
- },
- "tunnel-local-address": "192.168.1.1",
- "tunnel-remote-address": "10.1.1.1"
- }
- }
- ],
- "op-id": "1",
- "op-ref-scope": "op",
- "op-type": "update",
- "session-state": "complete"
- }
-}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure' | python -m json.tool