Commit f1a8c1bc authored by JorgeEcheva26's avatar JorgeEcheva26
Browse files

Release 2 documentation and details

parent 972970d0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ OpenCAPIF SDK provides a set of libraries to enable either CAPIF provider and in

Current version of OpenCAPIF SDK is compatible with following publicly available releases:
- [OpenCAPIF Release 1.0](https://ocf.etsi.org/documentation/v1.0.0-release/)
- OpenCAPIF Release 2.0
- [OpenCAPIF Release 2.0](https://ocf.etsi.org/documentation/v2.0.0-release/)

This document serves as the [main bootstrap reference](#networkapp-developer-path) to start working with OpenCAPIF SDK. For advanced users, refer to [OpenCAPIF full documentation](./doc/sdk_full_documentation.md) section to dig into all available features.

@@ -126,6 +126,8 @@ To install the OpenCAPIF SDK source code for developing purposes there is an ava

To use the SDK, binary installer for the latest version is available at the [Python Package Index (Pipy)](https://pypi.org/project/opencapif-sdk/)

The SDK works with **Python 3.12**

```console
pip install opencapif_sdk
```
@@ -274,7 +276,6 @@ Code is next explained step by step:
5. **Retrieve security tokens:** \
  Use the `get_tokens()` method to obtain the necessary tokens for authenticating API requests.


**At the end of this flow, the invoker has been onboarded and it is ready to use target APIs.** All required information, including the access_token to use the available APIs, is stored at `capif_api_security_context_details.json` file. This file is placed in the invoker_folder path, specifically in the folder that corresponds to the capif_username used in the `capif_sdk_config.json`. A sample of the [capif_api_security_context_details](./samples/capif_api_security_context_details_sample.json) is also available.

Now, Invoker Network App can use access tokens to consume real services.
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ This file can also be populated using [environment variables](../samples/envirom

- `invoker_folder`: The path (relative or absolute) where invoker information (certificates, keys, etc.) is stored.
- `provider_folder`: The path (relative or absolute) where provider information is stored.
- `supported_features`: A string used to indicate the features supported by an API. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F". [More information](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29571_CommonData.yaml)
- `supported_features`: A string used to indicate the features supported by an API, invoker or provider. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F". [More information](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29571_CommonData.yaml)
- `capif_host`: The domain name of the CAPIF host.
- `register_host`: The domain name of the register host.
- `capif_https_port`: The CAPIF host port number.
+23 −34
Original line number Diff line number Diff line
from opencapif_sdk import capif_invoker_connector, capif_provider_connector
import os
import logging
import shutil
from requests.auth import HTTPBasicAuth
import urllib3
from OpenSSL.SSL import FILETYPE_PEM
from OpenSSL.crypto import (
    dump_certificate_request,
    dump_privatekey,
    PKey,
    TYPE_RSA,
    X509Req
)
import requests
import json
import warnings
from requests.exceptions import RequestsDependencyWarning
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
+15 −17
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ class capif_invoker_connector:
    """
    Τhis class is responsbile for onboarding an Invoker (ex. a Invoker) to CAPIF
    """

    def __init__(self, config_file: str):

        config_file = os.path.abspath(config_file)
@@ -509,6 +510,3 @@ class capif_invoker_connector:
        except Exception as e:
            self.logger.error(f"Error handling the file '{full_file_name}': {e}")
            raise

    
+4 −5
Original line number Diff line number Diff line
@@ -327,4 +327,3 @@ class capif_logging_feature:

        except Exception as e:
            raise Exception(f"An error occurred while decrypting the JWT: {e}")
        
Loading