summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py
diff options
context:
space:
mode:
authorCNlucius <lukai1@huawei.com>2016-09-13 11:40:12 +0800
committerCNlucius <lukai1@huawei.com>2016-09-13 11:41:53 +0800
commitb731e2f1dd0972409b136aebc7b463dd72c9cfad (patch)
tree5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py
parentee93993458266114c29271a481ef9ce7ce621b2a (diff)
ONOSFW-171
O/S-SFC-ONOS scenario documentation Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365 Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py')
-rwxr-xr-xframework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py b/framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py
deleted file mode 100755
index be834b9b..00000000
--- a/framework/src/onos/tools/test/scenarios/bin/verify-topo-devices.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /usr/bin/env python
-
-import requests
-import sys
-import urllib
-
-from requests.auth import HTTPBasicAuth
-
-if len(sys.argv) != 5:
- print "usage: verify-topo-links onos-node cluster-id first-index last-index"
- sys.exit(1)
-
-node = sys.argv[1]
-cluster = sys.argv[2]
-first = int(sys.argv[3])
-last = int(sys.argv[4])
-
-found = 0
-
-topoRequest = requests.get('http://' + node + ':8181/onos/v1/topology/clusters/'
- + cluster
- + "/devices",
- auth=HTTPBasicAuth('onos', 'rocks'))
-
-if topoRequest.status_code != 200:
- print topoRequest.text
- sys.exit(1)
-
-topoJson = topoRequest.json()
-
-for deviceIndex in range(first, last+1):
- lookingFor = "of:" + format(deviceIndex, '016x')
- print lookingFor
- for arrayIndex in range(0, len(topoJson["devices"])):
- device = topoJson["devices"][arrayIndex]
- if device == lookingFor:
- found = found + 1
- print "Match found for " + device
- break
-
-
-if found == last - first:
- sys.exit(0)
-
-print "Found " + str(found) + " matches, need " + str(last - first)
-sys.exit(2)
-
-
-
-
-