Commit 76109c37 authored by JorgeEcheva26's avatar JorgeEcheva26
Browse files

Several details of readme's doc and sdk code

parent 670bda01
Loading
Loading
Loading
Loading
+26 −17
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ Current version of OpenCAPIF SDK is compatible with following publicly available
 1. [NetApp developers](#netapp-developers)
 2. [OpenCAPIF SDK summary](#opencapif-sdk-summary)
 3. [NetApp developer path](#netapp-developer-path)
 4. [OpenCAPIF SDK Prerequeriments](./doc/sdk-prerequirements.md)
 4. [OpenCAPIF SDK requirements](./doc/sdk-prerequirements.md)
 5. [OpenCAPIF SDK Installation](./doc/sdk-installation.md)
 6. [OpenCAPIF SDK Configuration](./doc/sdk-configuration.md)
 7. [OpenCAPIF SDK Usage](./doc/sdk-usage.md)
@@ -39,21 +39,21 @@ For that purpose NetApps play 2 different roles when interacting with CAPIF:
OpenCAPIF SDK brings a set of functions to integrate with the 5G Core's function CAPIF, as defined in [3GPP Technical Specification (TS) 29.222 V18.5.0 Common API Framework for 3GPP Northbound APIs](https://www.etsi.org/deliver/etsi_ts/129200_129299/129222/18.05.00_60/ts_129222v180500p.pdf). This section shows the mapping between the Python functions available in this SDK and the CAPIF OpenAPI APIs defined the reference standard:

| **3GPP CAPIF API**                                    | **OpenCAPIF SDK function**                                  | **Description**                                             |
|-------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------|
| onboardedInvokers (POST)                        | onboard_invoker()                                           | Registers a new invoker.                                    |
| onboardedInvokers (PUT)                         | update_invoker()                                            | Updates an existing invoker.                                |
| onboardedInvokers (DELETE)                      | offboard_invoker()                                          | Deletes an invoker.                                         |
|-------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------|
| /onboardedInvokers (POST)                             | onboard_invoker()                                           | Registers a new invoker.                                    |
| /onboardedInvokers/{onboardingId} (PUT)               | update_invoker()                                            | Updates an existing invoker for a specific `onboardingId`.                                |
| /onboardedInvokers/{onboardingId} (DELETE)            | offboard_invoker()                                          | Deletes an invoker for a specific `onboardingId`.                                         |
| registrations (POST)                                  | onboard_provider()                                          | Registers a new service provider.                           |
| registrations (PUT)                             | update_provider()                                           | Updates a service provider's registration.                  |
| registrations (DELETE)                          | offboard_provider()                                         | Deletes a service provider's registration.                  |
| allServiceAPIs (GET)                            | discover()                                                  | Retrieves a list of all available service APIs.             |
| trustedInvokers (PUT//POST)                     | discover()                                                  | Registers or updates trusted invokers.                      |
| securities/{securityId}/token (GET)             | get_tokens()                                                | Retrieves a security token for a specific `securityId`. This JWT token is used to query the targeted services.      |
| service-apis (POST)                             | publish_services()                                          | Registers a new service API into the system.                |
| service-apis (DELETE)                           | unpublish_service()                                         | Deletes a service API from the system.                      |
| service-apis (PUT)                              | update_service()                                            | Updates the details of an existing service API.             |
| service-apis (GET)                              | get_service()                                               | Retrieves the details of a specific service API.            |
| service-apis (GET)                              | get_all_services()                                          | Retrieves a list of all available service APIs.             |
| /registrations/{registrationId} (PUT)                 | update_provider()                                           | Updates a service provider's registration for a specific `registrationId`.                  |
| /registrations/{registrationId} (DELETE)              | offboard_provider()                                         | Deletes a service provider's registration for a specific `registrationId`.                  |
| /allServiceAPIs (GET)                                 | discover()                                                  | Retrieves a list of all available service APIs.             |
| /trustedInvokers (PUT//POST)                          | discover()                                                  | Registers or updates trusted invokers.                      |
| /securities/{securityId}/token (GET)                  | get_tokens()                                                | Retrieves a security token for a specific `securityId`. This JWT token is used to query the targeted services.      |
| /{apfId}/service-apis(POST)                           | publish_services()                                          | Registers a new service API into the system.                |
| /{apfId}/service-apis/{serviceApiId} (DELETE)         | unpublish_service()                                         | Deletes a service API from the system.                      |
| /{apfId}/service-apis/{serviceApiId} (PUT)            | update_service()                                            | Updates the details of an existing service API.             |
| /{apfId}/service-apis (GET)                           | get_service()                                               | Retrieves the details of a specific service API.            |
| /{apfId}/service-apis/{serviceApiId} (GET)            | get_all_services()                                          | Retrieves a list of all available service APIs.             |


NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references:
@@ -101,6 +101,13 @@ A NetApp development running as an Invoker would usually follow this process ste
    ```python
      invoker.get_tokens()
    ```
Then all information for using the available APIs would be at Capif_api_security_context_details.json 

This file would be placed in the invoker_folder path, more specifically in the folder that corresponds of the capif_username used in the config_file.

Here is a sample of this [file](./samples/capif_api_security_context_details-sample.json) 

Here is a sample of the implementation of these [functionality](./netapp-samples/netapp-invoker-sample/netapp-invoker.py)

This image highlights Invoker path using SDK code:

@@ -139,6 +146,8 @@ A NetApp development running as a Provider would typically follow this process s
      provider.publish_services()
    ```

Here is a sample of the implementation of these [functionality](./netapp-samples/netapp-provider-sample/netapp-provider.py)

This image highlights Provider path using SDK code:

![PROVIDER_PATH](./doc/images/Flujo%20completo-PROVIDER%20PATH.jpg)
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
# OpenCAPIF SDK configuration

Before configuration it's needed to have completed the [prerequirements](./sdk-prerequirements.md) section and the [installation](./sdk-installation.md) section.
Before configuration it's needed to have completed the [requirements](./sdk-prerequirements.md) section and the [installation](./sdk-installation.md) section.



doc/sdk-features.md

deleted100644 → 0
+0 −34
Original line number Diff line number Diff line
# OpenCAPIF SDK Features

## CAPIF_API_Invoker_management API

- Onboard_API_Invoker

- Offboard_API_Invoker

## CAPIF_API_Provider_Management_API

- Onboard_API_Provider

- Update_API_Provider

- Offboard_API_Provider

## CAPIF_Discover_Service_API

- Discover_Service_API

## CAPIF_Publish_Service_API

- Publish_Service_API

- Unpublish_Service_API

- Update_Service_API

- Get_Service_API




+1 −1
Original line number Diff line number Diff line

# OpenCAPIF SDK installation

Before installation it's needed to have completed the [prerequirements](sdk-prerequirements.md) section.
Before installation it's needed to have completed the [requirements](sdk-prerequirements.md) section.

## OpenCAPIF SDK consumer installation

+1 −1
Original line number Diff line number Diff line
## OpenCAPIF SDK prerequirement
## OpenCAPIF SDK requirements

1. 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).

Loading