Commit 2411eec6 authored by Daniel García's avatar Daniel García
Browse files

Update main README with NetApp sections

parent 062fc0f7
Loading
Loading
Loading
Loading
+84 −25
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

![OpenCAPIF icon](./doc/images/OpenCAPIF-icon.jpg)

This repository develops a Python Software Development Kit(SDK) which focuses on connecting to OpenCAPIF in a simple way, lowering integration complexity and allowing developers to focus on Network Applications (NetApps) or services development. 
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 (NetApps) 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 entity.

@@ -12,20 +12,33 @@ Current version of OpenCAPIF SDK is compatible with following publicly available
- [OpenCAPIF Release 1.0](https://ocf.etsi.org/documentation/v1.0.0-release/)

# Table of Contents
 1. [OpenCAPIF SDK summary](#opencapif-sdk-summary)
 2. [NetApp developer path](#netapp-developer-path)
 3. [OpenCAPIF SDK Prerequeriments](./doc/sdk-prerequirements.md)
 4. [OpenCAPIF SDK Installation](./doc/sdk-installation.md)
 5. [OpenCAPIF SDK Configuration](./doc/sdk-configuration.md)
 6. [OpenCAPIF SDK Usage](./doc/sdk-usage.md)
 7. [OpenCAPIF SDK known issues](./doc/sdk-issues.md)
 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)
 5. [OpenCAPIF SDK Installation](./doc/sdk-installation.md)
 6. [OpenCAPIF SDK Configuration](./doc/sdk-configuration.md)
 7. [OpenCAPIF SDK Usage](./doc/sdk-usage.md)
 8 [OpenCAPIF SDK known issues](./doc/sdk-issues.md)

# NetApp developers

# OpenCAPIF SDK summary
In the scope of CAPIF, a NetApp (Network Application) refers to an external application or service that interacts with the 3GPP network via standardized APIs. These NetApps typically leverage the capabilities and services provided by the underlying mobile network infrastructure, such as network slicing, quality of service (QoS), or location services.

NetApps can be developed by third-party service providers, network operators, or other stakeholders to offer a wide range of services, including enhanced communication features, IoT solutions, or content delivery, and they use CAPIF as the unified framework for securely discovering, accessing, and utilizing 3GPP network APIs.

For that purpose NetApps play 2 different roles when interacting with CAPIF:
- **Invoker**: a NetApp acting as an Invoker is responsible for consuming APIs exposed by other services. This role represents an external application or service that  calls the 3GPP northbound APIs to utilize the network’s functionalities.

- **Provider**: a NetApp acting as a Provider is responsible for exposing its own APIs for use by Invokers. This role represents an entity that offers services through APIs, making them available to other external applications or Invokers.

**NetApps developers are the target users of OpenCAPIF SDK.**

## OpenCAPIF SDK summary

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:

| **CAPIF API**                                   | **OpenCAPIF SDK function**                                  | **Description**                                             |
| **3GPP CAPIF API**                              | **OpenCAPIF SDK function**                                  | **Description**                                             |
|-------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------|
| onboardedInvokers (POST)                        | onboard_invoker()                                           | Registers a new invoker.                                    |
| onboardedInvokers (PUT)                         | update_invoker()                                            | Updates an existing invoker.                                |
@@ -49,41 +62,87 @@ NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references:
- [CAPIF Discover API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Discover_Service_API.yaml)
- [CAPIF Publish API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) 
- [CAPIF Security API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Security_API.yaml)
# NetApp developer path

NetApp typical flow showcasing SDK usage.
### Invoker NetApp
 
## As an invoker
A NetApp development running as an Invoker would usually follow this process step by step making use of SDK:

For performing this path it is necesary to: 
1. **Create an Invoker object:** \
   Initialize the invoker by creating an instance of the `CAPIFInvokerConnector` class, passing the required configuration file:

   ```python
    invoker = CAPIFInvokerConnector(config_file=utilities.get_config_file())
   ```
   
2. **Onboard the Invoker**: \
   Register the invoker with the CAPIF system to enable access to APIs:

   ```python
    invoker.onboard_invoker()
   ```

1. Create an invoker object  -> CAPIFInvokerConnector(config_file=utilities.get_config_file())
3.	**Create a Service Discoverer object:** \
  Initialize the service discovery mechanism to search for available services:

2. Run onboard_invoker()
    ```python
      service_discoverer = ServiceDiscoverer(config_file=utilities.get_config_file())
    ```

3. Create a service discover object -> ServiceDiscoverer(config_file=utilities.get_config_file())
4.	**Discover available services:** \
  Use the discover() method to retrieve a list of available APIs:

3. Run discover() 
    ```python
      service_discoverer.discover()
    ```

4. Run get_tokens()
5.	**Retrieve security tokens:** \
  Use the get_tokens() method to obtain the necessary tokens for authenticating API requests: 
  
    ```python
      invoker.get_tokens()
    ```

This image highlights Invoker path using SDK code:

![INVOKER_PATH](./doc/images/Flujo%20completo-INVOKER%20PATH.jpg)

## As a provider 
### Provider NetApp

For performing this path it is necesary to:

1. Create a provider object -> CAPIFProviderConnector(config_file=utilities.get_config_file())
### Provider NetApp

A NetApp development running as a Provider would typically follow this process step by step, making use of the SDK:

1. **Create a Provider object:** \
   Initialize the provider by creating an instance of the `CAPIFProviderConnector` class, passing the required configuration file:

2. Run onboard_provider()
    ```python
    provider = CAPIFProviderConnector(config_file=utilities.get_config_file())
    ```

3. Look for the provider api details on the username folder, choose the APF and AEFs identificators and fullfill the publish_req structure and the api_description_path
2. **Onboard the Provider:**
    Register the provider with the CAPIF system to enable the publication of APIs:

    ```python
      provider.onboard_provider()
    ```

3. **Prepare API details:**
   Locate the provider API details in the username folder. Choose the APF (Application Programming Function) and AEFs (Application Enabling Functions) identifiers, and fulfill the publish_req structure and the api_description_path:

<p align="center">
  <img src="./doc/images/capif-provider-details-example.png" alt="example" width="400"/>
  <img src="./doc/images/publish_req-example.png" alt="config-example"  width="400"/>
</p>

3. Run publish_services()
4. **Publish the services:**
   Use the publish_services() method to register the APIs with the CAPIF framework:

    ```python
      provider.publish_services()
    ```

This image highlights Provider path using SDK code:

![PROVIDER_PATH](./doc/images/Flujo%20completo-PROVIDER%20PATH.jpg)
 No newline at end of file