X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Fric-plt%2Fa1%2Fa1.py;h=76f51b8370d83081bbeae508f06adece9c1e2594;hb=e10990b36dfdd48419cb0fb06a983f76e276b5d8;hp=bc78b97e3c83d337e10d2783dc19193abae96b6e;hpb=92b82c1d3f03738395f1489789b0c7908d2076d2;p=nonrtric.git diff --git a/near-rt-ric-simulator/ric-plt/a1/a1.py b/near-rt-ric-simulator/ric-plt/a1/a1.py index bc78b97e..76f51b83 100644 --- a/near-rt-ric-simulator/ric-plt/a1/a1.py +++ b/near-rt-ric-simulator/ric-plt/a1/a1.py @@ -44,11 +44,11 @@ def put_policy(policyId): if policyId != i and \ data == policy_instances[i] and \ policyTypeId == policy_type_per_instance[i]: - return(set_error(None, "The policy already exists with a different id.", 404, "No action has been taken. The id of the existing policy instance is: " + i + ".", None, None, None, None)) + return(set_error(None, "The policy already exists with a different id.", 400, "No action has been taken. The id of the existing policy instance is: " + i + ".", None, None, None, None)) if policyId in list(policy_instances.keys()): if data["scope"] != policy_instances[policyId]["scope"]: - return(set_error(None, "The policy already exists with a different scope.", 404, "The policy put involves a modification of the existing scope, which is not allowed.", None, None, "scope", None)) + return(set_error(None, "The policy already exists with a different scope.", 400, "The policy put involves a modification of the existing scope, which is not allowed.", None, None, "scope", None)) if 'code' in request.args: return(send_error_code(request.args))