Add k8s yml file for oru application
kubernetes deployment file for oru application
Change-Id: I6608a544a75dca1f7bad0c827201d5ed95bedbfb
Issue-ID: NONRTRIC-496
Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
diff --git a/test/mrstub/app/main.py b/test/mrstub/app/main.py
index 40707d6..90924b1 100644
--- a/test/mrstub/app/main.py
+++ b/test/mrstub/app/main.py
@@ -54,6 +54,8 @@
cntr_msg_responses_fetched=0
# Request and response constants
+ORU_WRITE_URL="/events/unauthenticated.SEC_FAULT_OUTPUT"
+ORU_READ_URL="/events/unauthenticated.SEC_FAULT_OUTPUT/users/test/"
AGENT_WRITE_URL="/events/A1-POLICY-AGENT-WRITE"
AGENT_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent"
APP_WRITE_URL="/send-request"
@@ -344,6 +346,24 @@
return Response('{}', status=200, mimetype=MIME_JSON)
+@app.route(ORU_WRITE_URL,
+ methods=['PUT','POST'])
+def oru_write():
+ global msg_requests
+ msg=json.dumps(request.json)
+ msg_requests.append(msg)
+ return Response('{}', status=200, mimetype=MIME_JSON)
+
+@app.route(ORU_READ_URL,
+ methods=['GET'])
+def oru_read():
+ global msg_requests
+ if(len(msg_requests)>0):
+ rsp=msg_requests.pop(0)
+ res=[]
+ res.append(rsp)
+ return Response(json.dumps(res), status=200, mimetype=MIME_JSON)
+ return Response("[]", status=200, mimetype=MIME_JSON)
### Functions for metrics read out ###