In Phosphorus/Sulfur URL without the module name for
the augmented data node, i.e. the table list augmented to
opendaylight-inventory, returns 409 error. Add the module
name 'flow-node-inventory' to the path segment to address
the issue.
And add a step to break out of request loop in ScaleClient.py
if there are many request errors (more than 10) to prevent
the overall test from failing to complete (or taking too long).
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Change-Id: I9b7225c90160836fa1f2ad0ab2e492593cebc4b5
sw, tab, fl, ip = fl1
url = "http://" + cntl + ":" + "8181"
url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw)
sw, tab, fl, ip = fl1
url = "http://" + cntl + ":" + "8181"
url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw)
- url += "/table=" + str(tab) + "/flow=" + str(fl)
+ url += "/flow-node-inventory:table=" + str(tab) + "/flow=" + str(fl)
flow = copy.deepcopy(template["flow"][0])
flow["cookie"] = fl
flow["flow-name"] = "TestFlow-%d" % fl
flow = copy.deepcopy(template["flow"][0])
flow["cookie"] = fl
flow["flow-name"] = "TestFlow-%d" % fl
url += (
"/rests/data/opendaylight-inventory:nodes/node=openflow%3A"
+ str(sw)
url += (
"/rests/data/opendaylight-inventory:nodes/node=openflow%3A"
+ str(sw)
+ + "/flow-node-inventory:table="
sw, tab, fl, ip = fl1
url = "http://" + cntl + ":" + "8181"
url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw)
sw, tab, fl, ip = fl1
url = "http://" + cntl + ":" + "8181"
url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw)
- url += "/table=" + str(tab) + "/flow=" + str(fl)
+ url += "/flow-node-inventory:table=" + str(tab) + "/flow=" + str(fl)
req = requests.Request(
"DELETE",
url,
req = requests.Request(
"DELETE",
url,
cntl = controllers[0]
counter = [0 for i in range(600)]
loop = True
cntl = controllers[0]
counter = [0 for i in range(600)]
loop = True
+ req_no = 0
+ num_errors = 0
try:
flowlist = inqueue.get(timeout=1)
except queue.Empty:
try:
flowlist = inqueue.get(timeout=1)
except queue.Empty:
try:
rsp = ses.send(prep, timeout=5)
except requests.exceptions.Timeout:
try:
rsp = ses.send(prep, timeout=5)
except requests.exceptions.Timeout:
- print(f"*WARN* Timeout: {req.method} {req.url}")
+ print(f"*WARN* [{req_no}] Timeout: {req.method} {req.url}")
counter[99] += 1
if counter[99] > 10:
print("*ERROR* Too many timeouts.")
counter[99] += 1
if counter[99] > 10:
print("*ERROR* Too many timeouts.")
else:
if rsp.status_code not in [200, 201, 204]:
print(
else:
if rsp.status_code not in [200, 201, 204]:
print(
- f"*WARN* Status code {rsp.status_code}: {req.method} {req.url}\n{rsp.text}"
+ f"*WARN* [{req_no}] Status code {rsp.status_code}:"
+ f" {req.method} {req.url}\n{rsp.text}"
+ num_errors += 1
+ if num_errors > 10:
+ print("*ERROR* Too many errors.")
+ break
counter[rsp.status_code] += 1
res = {}
for i, v in enumerate(counter):
counter[rsp.status_code] += 1
res = {}
for i, v in enumerate(counter):