Loading services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py +9 −2 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from cryptography.hazmat.backends import default_backend from flask_jwt_extended import jwt_required, get_jwt_identity from cryptography import x509 from functools import wraps import asyncio import sys Loading Loading @@ -62,10 +63,16 @@ def registrations_post(body): # noqa: E501 current_app.logger.info("Registering Provider Domain") if connexion.request.is_json: body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 # if connexion.request.is_json: # body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 # if connexion.request.content_type == 'application/json': # value = connexion.request.json() # val = asyncio.run(value) # current_app.logger.info(val) # body = APIProviderEnrolmentDetails.from_dict(val) # noqa: E501 body = APIProviderEnrolmentDetails.from_dict(body) res = provider_management_ops.register_api_provider_enrolment_details(body, username, uuid) return res Loading services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py +8 −0 Original line number Diff line number Diff line # from connexion.apps.flask_app import FlaskJSONEncoder from connexion.frameworks.flask import FlaskJSONProvider <<<<<<< Updated upstream ======= # from connexion import jsonifier >>>>>>> Stashed changes import six from .models.base_model_ import Model <<<<<<< Updated upstream ======= >>>>>>> Stashed changes class JSONEncoder(FlaskJSONProvider): include_nulls = False Loading services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +6 −0 Original line number Diff line number Diff line Loading @@ -13,7 +13,13 @@ curl -vv -k -retry 30 \ --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_provider_management/pubkey.pem <<<<<<< Updated upstream #uvicorn --host 0.0.0.0:8080 \ # --root-path /usr/src/app/api_provider_management asgi:app uvicorn api_provider_management.asgi:app --host 0.0.0.0 --port 8080 --reload ======= gunicorn -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/api_provider_management wsgi:app >>>>>>> Stashed changes services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +4 −0 Original line number Diff line number Diff line Loading @@ -19,5 +19,9 @@ opentelemetry-api == 1.17.0 opentelemetry-sdk == 1.17.0 flask_executor == 1.0.0 Werkzeug == 3.0.0 <<<<<<< Updated upstream ======= gunicorn == 22.0.0 >>>>>>> Stashed changes uvicorn == 0.30.3 packaging == 24.0 Loading
services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py +9 −2 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from cryptography.hazmat.backends import default_backend from flask_jwt_extended import jwt_required, get_jwt_identity from cryptography import x509 from functools import wraps import asyncio import sys Loading Loading @@ -62,10 +63,16 @@ def registrations_post(body): # noqa: E501 current_app.logger.info("Registering Provider Domain") if connexion.request.is_json: body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 # if connexion.request.is_json: # body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 # if connexion.request.content_type == 'application/json': # value = connexion.request.json() # val = asyncio.run(value) # current_app.logger.info(val) # body = APIProviderEnrolmentDetails.from_dict(val) # noqa: E501 body = APIProviderEnrolmentDetails.from_dict(body) res = provider_management_ops.register_api_provider_enrolment_details(body, username, uuid) return res Loading
services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py +8 −0 Original line number Diff line number Diff line # from connexion.apps.flask_app import FlaskJSONEncoder from connexion.frameworks.flask import FlaskJSONProvider <<<<<<< Updated upstream ======= # from connexion import jsonifier >>>>>>> Stashed changes import six from .models.base_model_ import Model <<<<<<< Updated upstream ======= >>>>>>> Stashed changes class JSONEncoder(FlaskJSONProvider): include_nulls = False Loading
services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +6 −0 Original line number Diff line number Diff line Loading @@ -13,7 +13,13 @@ curl -vv -k -retry 30 \ --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_provider_management/pubkey.pem <<<<<<< Updated upstream #uvicorn --host 0.0.0.0:8080 \ # --root-path /usr/src/app/api_provider_management asgi:app uvicorn api_provider_management.asgi:app --host 0.0.0.0 --port 8080 --reload ======= gunicorn -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/api_provider_management wsgi:app >>>>>>> Stashed changes
services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +4 −0 Original line number Diff line number Diff line Loading @@ -19,5 +19,9 @@ opentelemetry-api == 1.17.0 opentelemetry-sdk == 1.17.0 flask_executor == 1.0.0 Werkzeug == 3.0.0 <<<<<<< Updated upstream ======= gunicorn == 22.0.0 >>>>>>> Stashed changes uvicorn == 0.30.3 packaging == 24.0