Fix A1 simulator extensions 15/13215/1 master
authoraravind.est <aravindhan.a@est.tech>
Fri, 26 Jul 2024 17:20:20 +0000 (18:20 +0100)
committeraravind.est <aravindhan.a@est.tech>
Fri, 26 Jul 2024 17:22:19 +0000 (18:22 +0100)
EXT_SRV and KAFKA_DISPATCHER extensions fixed

Issue-ID: NONRTRIC-1024
Change-Id: I4baf298dfeea95ba7da216e7510e790899c01a99
Signed-off-by: aravind.est <aravindhan.a@est.tech>
near-rt-ric-simulator/test/EXT_SRV/Dockerfile
near-rt-ric-simulator/test/EXT_SRV/src/main.py
near-rt-ric-simulator/test/EXT_SRV/src/server.py
near-rt-ric-simulator/test/KAFKA_DISPATCHER/Dockerfile
near-rt-ric-simulator/test/KAFKA_DISPATCHER/src/main.py

index 84144d7..53f92fa 100644 (file)
@@ -1,5 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -17,7 +18,7 @@
 
 FROM python:3.8-slim-buster
 
-RUN pip install connexion[swagger-ui]
+RUN pip3 install "connexion[swagger-ui,flask,uvicorn]"
 
 #install nginx and curl
 RUN apt-get update && apt-get install -y nginx=1.14.* nginx-extras curl
index 9587308..834aa62 100755 (executable)
@@ -1,5 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -79,4 +80,4 @@ if len(sys.argv) >= 2:
 app.add_api('EXT_SRV_api.yaml')
 
 if __name__ == '__main__':
-  app.run(port=port_number, host="127.0.0.1", threaded=False)
+  app.run(port=port_number, host="127.0.0.1")
index cbf2a47..a15826d 100644 (file)
@@ -1,5 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -40,7 +41,7 @@ def get_all_a1_policies():
     return r
 
   res = list(a1_policy_instances)
-  return (res, 200)
+  return Response(json.dumps(res), 200, mimetype=APPL_JSON)
 
 # API Function: Get A1 policy
 def get_a1_policy(a1policyId):
index bc5d815..d7bb104 100644 (file)
@@ -1,5 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -17,8 +18,8 @@
 
 FROM python:3.8-slim-buster
 
-RUN pip install connexion[swagger-ui]
-RUN pip install kafka-python
+RUN pip3 install "connexion[swagger-ui,flask,uvicorn]"
+RUN pip3 install kafka-python
 
 #install nginx and curl
 RUN apt-get update && apt-get install -y nginx=1.14.* nginx-extras curl
index 7816e7f..e429d4e 100644 (file)
@@ -1,5 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -74,4 +75,4 @@ if len(sys.argv) >= 2:
 app.add_api('KAFKA_DISPATCHER_api.yaml')
 
 if __name__ == '__main__':
-  app.run(port=port_number, host="127.0.0.1", threaded=False)
+  app.run(port=port_number, host="127.0.0.1")