Added UUID to policy ids and new policy types
Change-Id: I0b0f600b4c5f4f10e36a84c76d1b104fcf3d712d
Issue-ID: NONRTRIC-154
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
diff --git a/test/common/delete_policies_process.py b/test/common/delete_policies_process.py
index fe87919..e647118 100644
--- a/test/common/delete_policies_process.py
+++ b/test/common/delete_policies_process.py
@@ -30,35 +30,39 @@
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
-#arg responsecode baseurl num_rics startid count pids pid_id
+#arg responsecode baseurl num_rics uuid startid count pids pid_id
try:
- if len(sys.argv) != 8:
- print("1Expected 7 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl num_rics startid count pids pid_id")
+ if len(sys.argv) != 9:
+ print("1Expected 8 args, got "+str(len(sys.argv)-1)+ ". Args: responsecode baseurl num_rics uuid startid count pids pid_id")
sys.exit()
responsecode=int(sys.argv[1])
baseurl=sys.argv[2]
num_rics=int(sys.argv[3])
- start=int(sys.argv[4])
- count=int(sys.argv[5])
- pids=int(sys.argv[6])
- pid_id=int(sys.argv[7])
+ uuid=sys.argv[4]
+ start=int(sys.argv[5])
+ count=int(sys.argv[6])
+ pids=int(sys.argv[7])
+ pid_id=int(sys.argv[8])
+
+ if uuid == "NOUUID":
+ uuid=""
stop=count*num_rics+start
for i in range(start,stop):
if (i%pids == (pid_id-1)):
- url=str(baseurl+"?id="+str(i))
+ url=str(baseurl+"?id="+uuid+str(i))
try:
resp=requests.delete(url, verify=False, timeout=90)
except Exception as e1:
- print("1Delete failed for id:"+str(i)+ ", "+str(e1) + " "+traceback.format_exc())
+ print("1Delete failed for id:"+uuid+str(i)+ ", "+str(e1) + " "+traceback.format_exc())
sys.exit()
if (resp.status_code == None):
- print("1Delete failed for id:"+str(i)+ ", expected response code: "+responsecode+", got: None")
+ print("1Delete failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: None")
sys.exit()
if (resp.status_code != responsecode):
- print("1Delete failed for id:"+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
+ print("1Delete failed for id:"+uuid+str(i)+ ", expected response code: "+responsecode+", got: "+str(resp.status_code))
sys.exit()
print("0")