4.[How to use OpenCAPIF SDK](#How-to-use-OpenCAPIF-SDK)
4.[How to use OpenCAPIF SDK](#How-to-use-OpenCAPIF-SDK)
5.[OpenCAPIF SDK known issues](#OpenCAPIF-SDK-known-issues)
5.[OpenCAPIF SDK known issues](#OpenCAPIF-SDK-known-issues)
6. [DEV ENVIRONMENT] (/doc/sdk-dev-env.md)
# OpenCAPIF SDK usage
# OpenCAPIF SDK usage
OpenCAPIF SDK implements this set of features to easily integrate an application with CAPIF NF either manually or integrating SDK library directly within app code.
OpenCAPIF SDK implements this set of features to easily integrate an application with CAPIF NF either manually or integrating SDK library directly within app code.
[GENERAL CAPIF USAGE FLOW]
This repository includes 2 different modes to test OpenCAPIF SDK:
This repository includes 2 different modes to test OpenCAPIF SDK:
-**Manual usage**: use a set of python scripts to test step by step all implemented procedures. All of them are provided at scripts folder,
-**Manual usage**: use a set of python scripts to test step by step all implemented procedures. All of them are provided at scripts folder,
[IMAGE OF ARCH APP ----> CAPIF WITH SCRIPTS]
[IMAGE OF ARCH APP ----> CAPIF WITH SCRIPTS]
...
@@ -30,7 +33,27 @@ This repository includes 2 different modes to test OpenCAPIF SDK:
...
@@ -30,7 +33,27 @@ This repository includes 2 different modes to test OpenCAPIF SDK:
-**Development usage**: import SDK in your code and start ... Within nf-sample folder, it is provided a sample application leveraging
-**Development usage**: import SDK in your code and start ... Within nf-sample folder, it is provided a sample application leveraging
[IMAGE OF ARCH APP ----> CAPIF WITH SDK INTEGRATION]
[IMAGE OF ARCH APP ----> CAPIF WITH SDK INTEGRATION]
# OpenCAPIF SDK Features
# OpenCAPIF SDK Features
LO QUE HE IMPLEMENTADO DE OPENCAPIF == RELEASE NOTES
# OpenCAPIF SDK scripts
This repository provides manual scripts to validate and demonstrate the integration to OpenCAPIF. Next are listed the behaviour of all of them available at /sctipts folder:
1.
2.
3.
4.
Additional requests to CAPIF:
- Publisher: addionally a devoloper could retrieve data from ...
1.
2.
- Events: blah blah
- Explore API directory:
-**Invoker CAPIF connector**: Simplifies the process of onboarding for Invoker users,
-**Invoker CAPIF connector**: Simplifies the process of onboarding for Invoker users,
-**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,
-**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,
...
@@ -44,6 +67,8 @@ This repository includes 2 different modes to test OpenCAPIF SDK:
...
@@ -44,6 +67,8 @@ This repository includes 2 different modes to test OpenCAPIF SDK:
-**Invoker CAPIF connector offboarding**: Simplifies the process of offboarding for Invoker 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.
-**Provider CAPIF connector offboarding**: Simplifies the process of offboarding for Provider users.
[OPENCAPIF SDK CODE STRUCTURE]


...
@@ -56,68 +81,50 @@ Apart from the SDK core, there are available different functionalities for devel
...
@@ -56,68 +81,50 @@ Apart from the SDK core, there are available different functionalities for devel


# How to use OpenCAPIF SDK
# OpenCAPIF SDK Installation (dev environment??)
1 - First it is required to complete the utilities 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,
Follow next steps to perform OpenCAPIF SDK installation:
- NOTE provider_exposer_get_sample_api_description_path is mandatory if publish functionalities are required.
OPTIONAL step: sometimes Apple Mac shells raise issues while finding the shell path. If this happens, try this command:
2 - Then it is needed to fill out config files depending on the features required to be used from the SDK.
```console
## OpenCAPIF SDK prerequisites
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```
2 - Clone GitHub repository:
```console
IMPORTANT: In order to leverage OpenCAPIF SDK it is required to have registered a user in the target CAPIF instance, so contact administrator to have required predefined credentials (username and password).
If you want to use SDK as a **Provider** you need to fill out these fields
# How to use OpenCAPIF SDK
- provider_folder
- APFs
- AEFs
1 - First it is required to complete the utilities 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.
2 - Then it is needed to fill out config files depending on the features required to be used from the SDK.
## Prerequisites
IMPORTANT: In order to leverage OpenCAPIF SDK it is required to have registered a user in the target CAPIF instance, so contact administrator to have required predefined credentials (username and password).
## Configuration via Config.json
"invoker_folder": String | The path (relative or absolute) of the folder you want to store your invoker information
"invoker_folder": String | The path (relative or absolute) of the folder you want to store your invoker information
...
@@ -157,33 +164,7 @@ IMPORTANT: In order to leverage OpenCAPIF SDK it is required to have registered
...
@@ -157,33 +164,7 @@ IMPORTANT: In order to leverage OpenCAPIF SDK it is required to have registered
"debug_mode": Boolean | If you want to recieve logs from SDK-S6G Example:True/False
"debug_mode": Boolean | If you want to recieve logs from SDK-S6G Example:True/False
This configuration could also be fullfilled by enviroment variables
### 2. Configuration of Publish.json
Mandatory fields no matter the target role to be onboarded, either invoker or provider:
- Capif_host
- register_host
- capif_https_port
- capif_register_port
- capif_username
- capif_password
- debug_mode
If you want to use SDK as an Invoker you need to fill out these fields
If you want to use SDK as a Provider you need to fill out these fields
- provider_folder
- APFs
- AEFs
## Configuration of Publish.json
"serviceApiId": String | The Api id we want to use Example "02eff6e1b3a8f7c8044a92ee8a30bd"
"serviceApiId": String | The Api id we want to use Example "02eff6e1b3a8f7c8044a92ee8a30bd"
"publisherAPFid": String | APF id we chose to use Example : "APFa165364a379035d14311deadc04332"
"publisherAPFid": String | APF id we chose to use Example : "APFa165364a379035d14311deadc04332"
...
@@ -214,7 +195,7 @@ You won't need to fill out the aefIds fields from aefProfiles array because you
...
@@ -214,7 +195,7 @@ You won't need to fill out the aefIds fields from aefProfiles array because you
If the publisherAEFsids parameter don't match with the aefProfiles you will recieve an error
If the publisherAEFsids parameter don't match with the aefProfiles you will recieve an error
### Important information for Provider users
### Important information for Provider consumer
In the provider_folder, you will find several folders with each capif_username you have onboarded as a provider, for each folder you could find:
In the provider_folder, you will find several folders with each capif_username you have onboarded as a provider, for each folder you could find:
...
@@ -223,14 +204,14 @@ In the provider_folder, you will find several folders with each capif_username y
...
@@ -223,14 +204,14 @@ In the provider_folder, you will find several folders with each capif_username y
- Service_received.json : If you already used the get an api or get all apis functionality, you will find the response to your request.
- Service_received.json : If you already used the get an api or get all apis functionality, you will find the response to your request.
- Published-Apis.json : Constains the currently published APIs with their ApiId
- Published-Apis.json : Constains the currently published APIs with their ApiId
## Discover_filter.json
#### Configuration of Discover_filter.json
This file follows the parameters schema from the GET petition of [Discover Services API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Discover_Service_API.yaml)
This file follows the parameters schema from the GET petition of [Discover Services API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Discover_Service_API.yaml)
To use this feature you must complete the file with the parameters you want to be filtered and then run the Invoker Service Discovery Functionality.
To use this feature you must complete the file with the parameters you want to be filtered and then run the Invoker Service Discovery Functionality.
To run the Invoker Service Discovery Functionality you must have onboarded as an Invoker before.
To run the Invoker Service Discovery Functionality you must have onboarded as an Invoker before.
### Important information for Invoker users
### Important information for Invoker consumer
In the `invoker_folder`, you will find several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find:
In the `invoker_folder`, you will find several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find:
...
@@ -246,7 +227,7 @@ By default, the Service Get Token will get the access token for using all the AP
...
@@ -246,7 +227,7 @@ By default, the Service Get Token will get the access token for using all the AP
2. Use the Service Discovery Functionality.
2. Use the Service Discovery Functionality.
3. Use the Service Get Token Functionality.
3. Use the Service Get Token Functionality.
## Register.json
#### Configuration of Register.json
"register_host": String | The domain name of your register host
"register_host": String | The domain name of your register host