Before starting the configuration process, it is required that both the [requirements](./sdk_requirements.md) and the [installation](./sdk_developers.md) sections are completed.
## Table of Contents
-[Configuration via capif_sdk_config.json](#configuration-via-capif_sdk_configjson)
-[As a Network App Invoker](#network-app-invoker)
-[As a Network App Provider](#network-app-provider)
-[Descriptions of capif_sdk_config Fields](#descriptions-of-capif_sdk_config-fields)
-[Configuration via capif_sdk_register.json](#configuration-via-capif_sdk_registerjson)
## Configuration via `capif_sdk_config.json`
A sample configuration file can be found [here](https://labs.etsi.org/rep/ocf/sdk/-/blob/main/samples/config_sample.json).
### Common Fields for Invoker and Provider
## Common Fields for Invoker and Provider
Regardless of the role (Invoker or Provider), the following fields are mandatory:
@@ -76,7 +69,7 @@ More information: [Translator functionality](./sdk_full_documentation.md#openapi
If the `publisher_aefs_ids` do not match the `aefProfiles` in the API description, an error will be raised by the SDK.
## Descriptions of `capif_sdk_config` Fields
## Descriptions of `capif_sdk_config` fields
This file can also be populated using [environment variables](https://labs.etsi.org/rep/ocf/sdk/-/blob/main/samples/enviroment_variables_sample.txt).
@@ -27,31 +27,6 @@ The repository provides two modes for utilizing the OpenCAPIF SDK:
**NOTE**: The register file is not required for SDK usage, only for SDK consumers that wish to create their `capif_username`.
## Table of Contents
As outlined in the [Network App developers section](./sdk_requirements.md#network-app-developer-path), the OpenCAPIF SDK supports two primary roles:
-[Provider Network App](#provider-network-app)
-[Important Information for Providers](#important-information-for-providers)
-[Provider Onboarding](#provider-onboarding)
-[Service Publishing](#service-publishing)
-[Service Deletion](#service-deletion)
-[Service Updates](#service-update)
-[Get Published Services](#get-services)
-[Get All Published Services](#get-all-services)
-[Update and Offboard Provider](#update-and-offboard-provider)
-[Invoker Network App](#invoker-network-app)
-[Important Information for Invokers](#important-information-for-invokers)
-[Invoker Onboarding](#invoker-onboarding)
-[Service Discovery](#service-discovery)
-[Obtain JWT Tokens](#obtain-jwt-tokens)
-[Check authentication](#check-authentication)
-[Update and Offboard Invoker](#update-and-offboard-invoker)
-[Other Features](#other-features)
-[Openapi translation](#openapi-translation)
-[CAPIF Registration and Login](#capif-registration-and-login)
-[CAPIF Deregistration and Logout](#capif-registration-and-login)
## Provider Network App
The OpenCAPIF SDK enables efficient implementation of invoker functionality for Network App. This section details the SDK features related to CAPIF providers.
This documentation is related to the OpenCAPIF SDK, which is a Software Development Kit that is intended to help on developing Network Applications (NA) or services based on OpenCAPIF.
OpenCAPIF SDK provides a set of libraries that enable either CAPIF provider or invoker roles, as other functionality that simplify reaching OpenCAPIF API.
Current version of OpenCAPIF SDK is compatible with following publicly available releases:
This document serves as the [main reference](./sdk_requirements.md#network-app-developer-path) to start working with OpenCAPIF SDK. For advanced users, refer to [OpenCAPIF full documentation](./sdk_full_documentation.md) section to dig into all available features.
This repository develops a Python Software Development Kit (SDK) which focuses on connecting to OpenCAPIF (Common API Framework for 3GPP Northbound APIs) in a simple way, lowering integration complexity and allowing developers to focus on Network Applications (Network Apps) or services development.
OpenCAPIF SDK provides a set of libraries to enable either CAPIF provider and invoker roles, and other functions to simplify procedures calls towards OpenCAPIF entity.
Current version of OpenCAPIF SDK is compatible with following publicly available releases:
This document serves as the [main bootstrap reference](#network-app-developer-path) to start working with OpenCAPIF SDK. For advanced users, refer to [OpenCAPIF full documentation](./sdk_full_documentation.md) section to dig into all available features.
8.[**OpenCAPIF SDK full documentation**](./doc/sdk_full_documentation.md)
9.[CI/CD Testing](#cicd-testing)
10.[OpenCAPIF SDK known issues](#opencapif-sdk-known-issues)
# Repository structure
pesp_capif_sdk
├── ci_cd_test
├── config
├── doc
│ └── images
├── installation
├── network_app_samples
│ ├── network_app_invoker_sample
│ │ └── postman
│ └── network_app_provider_sample
├── samples
├── scripts
├── opencapif_sdk
└── test
-[ci_cd_test](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/ci_cd_test): contains example code to be run on the pull request pipeline that executes every time new code is intended to be merged in another branch in order to check if the project works as expected with the new changes.
-[config](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/config): contains OpenCAPIF SDK configuration files samples. These samples illustrate the structure of the configuration files in order to use SDK properly. Go to the [configuration section](./sdk_configuration.md) for more details.
-[doc](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/doc): contains documentation related files to this README,
-[installation](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/installation): this folder stores the Python [requeriments.txt](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/installation/requirements.txt) file that is required to complete the [SDK developers section](./sdk_developers.md),
-[network_app_samples](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/network_app_samples): this folder contains both provider and invoker Network App samples explained further in this document at [network app developer path](#network-app-developer-path),
-[samples](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/samples): contains sample files related to SDK configuration, API definitions and SDK configuration via environment variables,
-[scripts](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/scripts): single scripts to individually test functionality though command line. For more information on how to use these go to the [full documentation section](./sdk_full_documentation.md),
-[opencapif_sdk](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/opencapif_sdk): where SDK code is stored,
-[test](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/test): contains a file named test.py containing tests to ensure all SDK flows work properly.
# Network App developers
## Network App developers
In the scope of CAPIF, a Network App (Network Application) refers to an external application or service that interacts with the 3GPP network via standardized APIs. These Network Apps typically leverage the capabilities and services provided by the underlying mobile network infrastructure, such as network slicing, quality of service (QoS), or location services.
@@ -144,7 +86,7 @@ Here is a visual look on the variables of the CAPIF sdk referenced in:
The Network App Developer Path guides the programmer through building and integrating Network Apps using CAPIF. This path is divided into two key sections: [Invoker Network App](#invoker-network-app) and [Provider Network App](#provider-network-app). Each section covers the essential flow and functions for developing Network Apps interaction with CAPIF, whether the user is acting as an invoker consuming services or a provider offering them. By following this path, developers will gain a comprehensive understanding of how to effectively use the SDK within the CAPIF ecosystem.
@@ -321,13 +263,13 @@ The `token` variable is also available for retrieving the JWT token after the `g
The `invoker_capif_details` variable stores the `capif_api_security_context_details.json` content in a dictionary form.
# CI/CD Testing
## CI/CD Testing
This repository implements tests that automatically run when a Pull Request (PR) is created. This allows knowing if the code that is intended to be merged works as expected and doesn't produce any error on the existing code. The CI/CD testing files are located at [./ci_cd_test](https://labs.etsi.org/rep/ocf/sdk/-/tree/main/ci_cd_test) directory.
Inside this directory, there is a Dockerfile that creates a Docker container that installs necessary dependencies and the SDK itself. Then it runs test files that check if the invoker and provider functionalities work as expected. If anything goes wrong, the pipeline fails and a message will be shown in the repository. Changes to the testing files may be done as new functionality or changes to the existing code is made.
# OpenCAPIF SDK known issues
## OpenCAPIF SDK known issues
There are some features which **are not currently available at latest OpenCAPIF SDK release**. Those are assumed to be technical debt and might be available in future releases: