This tool is focused on connect to CAPIF in a simpler way.
This repository develop a Python Software Development Kit(SDK) whis focuses on connecting to OpenCAPIF in a simple way, lowering integration complexity and allowing developers to focus on Network Functions (NF) or services development.
OpentCAPIF SDK provides a set of libraries to enable either CAPIF provider and invoker roles, and other functions to simplify procedures calls towards OpenCAPIF.
Current version of OpenCAPIF SDK is compatible with following publicly available releases:
- OpenCAPIF Release 1.0 [LINK TO OPENCAPIF RELEASE]
# Functionalities
# Features
-**Invoker Capif connector**: Simplifies the process of onboarding for Invoker users
OpenCAPIF SDK implements this set of features to integrate with CAPIF NF:
-**Provider Capif connector**: Simplifies the process of onboarding for Provider users,also has the capability to register several APF's and AEF's if its necesary.
-**Invoker CAPIF connector**: Simplifies the process of onboarding for Invoker users,
-**Invoker Service Discovery**: Facilitates making a Discovery request to CAPIF, also stores the API services recieved and has an option to filter them.
-**Provider CAPIF connector**: Simplifies the process of onboarding for Provider users,also has the capability toregister several APF's and AEF's if its necesary,
-**Invoker Service Get token**: After the Discovery, this functionality simplifies the way of getting created their propperly security context for each of the services and adquiring the access token to use the final API's
-**Invoker Service Discovery**: Facilitates making a Discovery request to CAPIF, also stores the API services recieved and has an option to filter them,
-**Provider Publish Api**: Simplifies the process of publishing an API. Also has the capability to chose which APF and AEF's will be used to publish the API
-**Invoker Service Get token**: After the Discovery, this functionality simplifies the way of getting created their propperly security context for each of the services and adquiring the access token to use the final APIs,
-**Provider Unpublish Api**: Simplifies the process of deleting an API.
-**Provider Publish API**: Simplifies the process of publishing an API. Also has the capability to chose which APF and AEF's will be used to publish the API,
-**Provider Update Api**: Simplifies the process of updating an API. Also has the capability to chose which APF and AEF's will be used to update the API
-**Provider Unpublish API**: Simplifies the process of deleting an API,
-**Provider Get Api**: Simplifies the process of recieving the information of One service published previously
-**Provider Update API**: Simplifies the process of updating an API. Also has the capability to chose which APF and AEF's will be used to update the API,
-**Provider Get all Apis**: Simplifies the process of recieving the information of all available services published previously.
-**Provider Get API**: Simplifies the process of recieving the information of One service published previously,
-**Invoker Capif connector offboarding**: Simplifies the process of offboarding for Invoker users
-**Provider Get all APIs**: Simplifies the process of recieving the information of all available services published previously,
-**Provider Capif connector offboarding**: Simplifies the process of offboarding for Provider users
-**Invoker CAPIF connector offboarding**: Simplifies the process of offboarding for Invoker users,
-**Provider CAPIF connector offboarding**: Simplifies the process of offboarding for Provider users.

## Other Functionalities
## Other features
Apart from the SDK it is available diferent functionalities for development reasons
Apart from the SDK core, there are available different functionalities for development purposes:
-**Register and login**: Facilitates the loggin process for admin users and creates a CAPIF user
-**Deregister and login**: Facilitates the loggin process for admin users and eliminates a CAPIF user
-**Register and login**: Facilitates the logging process for admin users and creates a CAPIF user,
-**Deregister and login**: Facilitates the logging process for admin users and eliminates a CAPIF user.

# Installation
# OpenCAPIF SDK Installation
To use SDK-S6G we must follow this path for his Installation.
Follow next steps to perform OpenCAPIF SDK installation:
1 - Create an enviroment with pyenv
#Comands to install the enviroment
```console
#Commands to install the Python environment
pyenv install 3.12
pyenv virtualenv 3.12 Sdkenviroment
```
OPTIONAL step: sometimes Apple Mac shells raise issues while finding the shell path. If this happens, try this command:
#OPTIONAL
#Sometimes Mac shells has a little trouble while finding the shell path, try this command
3 - Install the Python requirements listed in requirements.txt file:
```console
cd Safe-6g.egg-info
python -m pip install --upgrade pip
pip install -r requirements.txt
```
Congratulations! You ended the installation for SDK-S6G
**Congratulations!** You have finalized the installation of OpenCAPIF SDK.
# How to use OpenCAPIF SDK
# How to use SDK-S6G
1 - First it is required to complete the emulator utils file with the absolute paths of target environment in order to complete the configuration of the SDK:
- NOTE register file is not needed for the use of the SDK,
- NOTE provider_exposer_get_sample_api_description_path is mandatory if publish functionalities are required.
1 - First we need to complete the emulator utils file with our absolute paths in order to complete the configuration of the SDK.The register file is not needed for the use of the SDK.The provider_exposer_get_sample_api_description_path is obligatory if we want to use the publish functionalities.
2 - Then it is needed to fill out config files depending on the features required to be used from the SDK.
2 - Then we need to fill out Config files depending on the functionalities we want to use from the SDK
## Config.json
## Configuration of Config.json
"invoker_folder": String | The path (relative or absolute) of the folder you want to store your invoker information
@@ -127,7 +143,8 @@ Congratulations! You ended the installation for SDK-S6G
"debug_mode": Boolean | If you want to recieve logs from SDK-S6G Example:True/False
Required fields no matter you onboard as an invoker or provider:
Mandatory fields no matter the target role to be onboarded, either invoker or provider:
- Capif_host
- register_host
@@ -151,7 +168,7 @@ If you want to use SDK as a Provider you need to fill out these fields
## Publish.json
## Configuration of Publish.json
"serviceApiId": String | The Api id we want to use Example "02eff6e1b3a8f7c8044a92ee8a30bd"
"publisherAPFid": String | APF id we chose to use Example : "APFa165364a379035d14311deadc04332"