diff --git a/README.md b/README.md index 04c2533ea0aaeebf182e7172e1de8784d8b73b88..06af09a9b813490b0284182b348fa103db3f6cdc 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,109 @@ -# SDK-S6G +# OpenCAPIF SDK -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: + +- **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, -- **Invoker Service Discovery**: Facilitates making a Discovery request to CAPIF, also stores the API services recieved and has an option to filter them. +- **Invoker Service Discovery**: Facilitates making a Discovery request to CAPIF, also stores the API services recieved and has an option to filter them, -- **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 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 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 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 Unpublish Api**: Simplifies the process of deleting an API. +- **Provider Unpublish API**: Simplifies the process of deleting an 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 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 Api**: Simplifies the process of recieving the information of One service published previously +- **Provider Get API**: Simplifies the process of recieving the information of One service published previously, -- **Provider Get all Apis**: Simplifies the process of recieving the information of all available services published previously. +- **Provider Get all APIs**: Simplifies the process of recieving the information of all available services published previously, -- **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.  -## 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 - pyenv install 3.12 - pyenv virtualenv 3.12 Sdkenviroment - - #OPTIONAL - #Sometimes Mac shells has a little trouble while finding the shell path, try this command - export PATH="$HOME/.pyenv/bin:$PATH" - eval "$(pyenv init --path)" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init -)" -2 - Clone the repository - - git clone -b v1 --single-branch https://github.com/JorgeEcheva26/SDK-S6G.git +```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: - #Then move to the SDK-S6G folder +```console +export PATH="$HOME/.pyenv/bin:$PATH" +eval "$(pyenv init --path)" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" +``` + +2 - Clone GitHub repository: - cd /your/path/to/SDK-S6G +```console +git clone -b v1 --single-branch https://github.com/Telefonica/pesp_capif_sdk.git +``` -3 - Install the requirements.txt file +```console +#Then move to the SDK-S6G folder - cd Safe-6g.egg-info +cd /your/path/to/SDK-S6G +``` - python -m pip install --upgrade pip +3 - Install the Python requirements listed in requirements.txt file: - pip install -r requirements.txt +```console +cd Safe-6g.egg-info -Congratulations! You ended the installation for SDK-S6G +python -m pip install --upgrade pip +pip install -r requirements.txt +``` +**Congratulations!** You have finalized the installation of OpenCAPIF SDK. -# How to use SDK-S6G -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. +# How to use OpenCAPIF SDK -2 - Then we need to fill out Config files depending on the functionalities we want to use from the SDK +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. -## Config.json +2 - Then it is needed to fill out config files depending on the features required to be used from the SDK. + +## 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"