Loading ci_cd_test/Dockerfile2deleted 100644 → 0 +0 −8 Original line number Diff line number Diff line FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN apt update RUN apt install -y git COPY setup.sh . ENTRYPOINT ["bash", "setup.sh"] ci_cd_test/setup.shdeleted 100644 → 0 +0 −29 Original line number Diff line number Diff line #!/bin/bash set -euo pipefail SDK_DIR="/sdk" SDK_REPO="https://labs.etsi.org/rep/ocf/sdk.git" SDK_JUST_INSTALLED="true" if [[ -d "$SDK_DIR/.git" ]]; then echo "OpenCAPIF SDK repository exists. Updating..." git -C "$SDK_DIR" pull SDK_JUST_INSTALLED="false" else echo "OpenCAPIF SDK repository not found. Cloning..." git clone "$SDK_REPO" "$SDK_DIR" fi ### !!! # python -m build echo "Installing OpenCAPIF SDK dependencies..." python -m pip install -r "$SDK_DIR/installation/requirements.txt" python -m pip install "$SDK_DIR" [[ "$SDK_JUST_INSTALLED" == "true" ]] && action_text="installation completed" || action_text="updated" echo "OpenCAPIF SDK $action_text successfully." tail -f /dev/null # TODO: Replace with actual entrypoint command (tests) ci_cd_test/testing_samples/testing_invoker_sample/capif_sdk_config_sample.json 0 → 100644 +42 −0 Original line number Diff line number Diff line { "capif_host": "capifcore", "register_host": "services-register-1", "capif_https_port": "443", "capif_register_port": "8080", "capif_username": "custom_user", "capif_password": "user_pass", "debug_mode": "True", "invoker": { "invoker_folder": "/sdk/testing_samples/testing_invoker_sample/test_invoker_certificate_folder", "capif_callback_url": "http://localhost:5000", "supported_features": "0", "check_authentication_data": { "ip": "", "port": "" }, "cert_generation": { "csr_common_name": "sdk-capif-demo", "csr_organizational_unit": "discovery", "csr_organization": "telefonica", "csr_locality": "madrid", "csr_state_or_province_name": "madrid", "csr_country_name": "ES", "csr_email_address": "adios@gmail.com" }, "discover_filter": { "api-name": "", "api-version": "", "comm-type": "", "protocol": "", "aef-id": "", "data-format": "", "api-cat": "", "preferred-aef-loc": "", "req-api-prov-name": "", "supported-features": "", "api-supported-features": "", "ue-ip-addr": "", "service-kpis": "" } } } ci_cd_test/testing_samples/testing_invoker_sample/network_app_invoker.py 0 → 100644 +32 −0 Original line number Diff line number Diff line import json import time import requests from opencapif_sdk import capif_invoker_connector, service_discoverer import logging # Path to the OpenCAPIF SDK configuration file capif_sdk_config_path = "./capif_sdk_config_sample.json" import requests import json if __name__ == "__main__": logging.basicConfig(level=logging.INFO) # Onboard the Invoker (creates keys, registers, obtains certs) capif_connector = capif_invoker_connector(config_file=capif_sdk_config_path) capif_connector.onboard_invoker() print("✅ INVOKER ONBOARDING COMPLETED") # Discover APIs and obtain JWT token discoverer = service_discoverer(config_file=capif_sdk_config_path) discoverer.discover() discoverer.get_tokens() # Show the token print("✅ ACCESS TOKEN:") print(discoverer.token) # End print("🎉 Script finished successfully.") ci_cd_test/testing_samples/testing_provider_sample/capif_sdk_config_sample.json 0 → 100644 +75 −0 Original line number Diff line number Diff line { "capif_host": "", "register_host": "", "capif_https_port": "", "capif_register_port": "", "capif_username": "", "capif_password": "", "debug_mode": "", "invoker": { "invoker_folder": "", "capif_callback_url": "", "supported_features":"", "check_authentication_data":{ "ip":"", "port":"" }, "cert_generation": { "csr_common_name": "", "csr_organizational_unit": "", "csr_organization": "", "csr_locality": "", "csr_state_or_province_name": "", "csr_country_name": "", "csr_email_address": "" }, "discover_filter": { "api-name": "", "api-version": "", "comm-type": "", "protocol": "", "aef-id": "", "data-format": "", "api-cat": "", "preferred-aef-loc": "", "req-api-prov-name": "", "supported-features": "", "api-supported-features": "", "ue-ip-addr": "", "service-kpis": "" } }, "provider": { "provider_folder": "", "supported_features": "", "apfs": "2", "aefs": "3", "publish_req": { "service_api_id": "", "publisher_apf_id": "", "publisher_aefs_ids": [ "", "" ] }, "cert_generation": { "csr_common_name": "", "csr_organizational_unit": "", "csr_organization": "", "csr_locality": "", "csr_state_or_province_name": "", "csr_country_name": "", "csr_email_address": "" }, "api_description_path": "", "log":{ "apiName": "", "apiVersion": "", "resourceName": "", "uri": "", "protocol": "", "operation": "", "result": "" } } } Loading
ci_cd_test/Dockerfile2deleted 100644 → 0 +0 −8 Original line number Diff line number Diff line FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN apt update RUN apt install -y git COPY setup.sh . ENTRYPOINT ["bash", "setup.sh"]
ci_cd_test/setup.shdeleted 100644 → 0 +0 −29 Original line number Diff line number Diff line #!/bin/bash set -euo pipefail SDK_DIR="/sdk" SDK_REPO="https://labs.etsi.org/rep/ocf/sdk.git" SDK_JUST_INSTALLED="true" if [[ -d "$SDK_DIR/.git" ]]; then echo "OpenCAPIF SDK repository exists. Updating..." git -C "$SDK_DIR" pull SDK_JUST_INSTALLED="false" else echo "OpenCAPIF SDK repository not found. Cloning..." git clone "$SDK_REPO" "$SDK_DIR" fi ### !!! # python -m build echo "Installing OpenCAPIF SDK dependencies..." python -m pip install -r "$SDK_DIR/installation/requirements.txt" python -m pip install "$SDK_DIR" [[ "$SDK_JUST_INSTALLED" == "true" ]] && action_text="installation completed" || action_text="updated" echo "OpenCAPIF SDK $action_text successfully." tail -f /dev/null # TODO: Replace with actual entrypoint command (tests)
ci_cd_test/testing_samples/testing_invoker_sample/capif_sdk_config_sample.json 0 → 100644 +42 −0 Original line number Diff line number Diff line { "capif_host": "capifcore", "register_host": "services-register-1", "capif_https_port": "443", "capif_register_port": "8080", "capif_username": "custom_user", "capif_password": "user_pass", "debug_mode": "True", "invoker": { "invoker_folder": "/sdk/testing_samples/testing_invoker_sample/test_invoker_certificate_folder", "capif_callback_url": "http://localhost:5000", "supported_features": "0", "check_authentication_data": { "ip": "", "port": "" }, "cert_generation": { "csr_common_name": "sdk-capif-demo", "csr_organizational_unit": "discovery", "csr_organization": "telefonica", "csr_locality": "madrid", "csr_state_or_province_name": "madrid", "csr_country_name": "ES", "csr_email_address": "adios@gmail.com" }, "discover_filter": { "api-name": "", "api-version": "", "comm-type": "", "protocol": "", "aef-id": "", "data-format": "", "api-cat": "", "preferred-aef-loc": "", "req-api-prov-name": "", "supported-features": "", "api-supported-features": "", "ue-ip-addr": "", "service-kpis": "" } } }
ci_cd_test/testing_samples/testing_invoker_sample/network_app_invoker.py 0 → 100644 +32 −0 Original line number Diff line number Diff line import json import time import requests from opencapif_sdk import capif_invoker_connector, service_discoverer import logging # Path to the OpenCAPIF SDK configuration file capif_sdk_config_path = "./capif_sdk_config_sample.json" import requests import json if __name__ == "__main__": logging.basicConfig(level=logging.INFO) # Onboard the Invoker (creates keys, registers, obtains certs) capif_connector = capif_invoker_connector(config_file=capif_sdk_config_path) capif_connector.onboard_invoker() print("✅ INVOKER ONBOARDING COMPLETED") # Discover APIs and obtain JWT token discoverer = service_discoverer(config_file=capif_sdk_config_path) discoverer.discover() discoverer.get_tokens() # Show the token print("✅ ACCESS TOKEN:") print(discoverer.token) # End print("🎉 Script finished successfully.")
ci_cd_test/testing_samples/testing_provider_sample/capif_sdk_config_sample.json 0 → 100644 +75 −0 Original line number Diff line number Diff line { "capif_host": "", "register_host": "", "capif_https_port": "", "capif_register_port": "", "capif_username": "", "capif_password": "", "debug_mode": "", "invoker": { "invoker_folder": "", "capif_callback_url": "", "supported_features":"", "check_authentication_data":{ "ip":"", "port":"" }, "cert_generation": { "csr_common_name": "", "csr_organizational_unit": "", "csr_organization": "", "csr_locality": "", "csr_state_or_province_name": "", "csr_country_name": "", "csr_email_address": "" }, "discover_filter": { "api-name": "", "api-version": "", "comm-type": "", "protocol": "", "aef-id": "", "data-format": "", "api-cat": "", "preferred-aef-loc": "", "req-api-prov-name": "", "supported-features": "", "api-supported-features": "", "ue-ip-addr": "", "service-kpis": "" } }, "provider": { "provider_folder": "", "supported_features": "", "apfs": "2", "aefs": "3", "publish_req": { "service_api_id": "", "publisher_apf_id": "", "publisher_aefs_ids": [ "", "" ] }, "cert_generation": { "csr_common_name": "", "csr_organizational_unit": "", "csr_organization": "", "csr_locality": "", "csr_state_or_province_name": "", "csr_country_name": "", "csr_email_address": "" }, "api_description_path": "", "log":{ "apiName": "", "apiVersion": "", "resourceName": "", "uri": "", "protocol": "", "operation": "", "result": "" } } }