diff --git a/README.md b/README.md index 235e7070a351c4a4788d3c06f525628564f7b3b0..9a4f2527375ed6e99b86620f11dc88434567ab6d 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,11 @@ This section shows the features available for using CAPIF SDK and its functions - [CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) - - Publish_Service_API: Corresponds to publish_services() + - Publish_Service_API: Corresponds to publish_services(service_api_description_json_full_path) - - Unpublish_Service_API: Corresponds to unpublish_service() + - Unpublish_Service_API: Corresponds to unpublish_service(service_api_description_json_full_path) - - Update_Service_API: Corresponds to update_service() + - Update_Service_API: Corresponds to update_service(service_api_description_json_full_path) - Get_Service_API: Corresponds to get_service() @@ -55,7 +55,7 @@ This section shows the features available for using CAPIF SDK and its functions # Table of Contents - 1. [OpenCAPIF SDK Prerequesites](./doc/sdk-prerequesites.md) + 1. [OpenCAPIF SDK Prerequeriments](./doc/sdk-prerequesites.md) 2. [OpenCAPIF SDK Installation](./doc/sdk-installation.md) 3. [OpenCAPIF SDK Configuration](./doc/sdk-configuration.md) 4. [OpenCAPIF SDK Usage](./doc/sdk-usage.md) diff --git a/doc/images/Invoker_discover.png b/doc/images/Invoker_discover.png new file mode 100644 index 0000000000000000000000000000000000000000..5a8f06a01756ab1ea663a01f004fa78b0ea0ee3a Binary files /dev/null and b/doc/images/Invoker_discover.png differ diff --git a/doc/images/Invoker_onboarding.png b/doc/images/Invoker_onboarding.png new file mode 100644 index 0000000000000000000000000000000000000000..630e203111151c7ad545bde0c5df91b192b3ff18 Binary files /dev/null and b/doc/images/Invoker_onboarding.png differ diff --git a/doc/images/invoker_get_token.png b/doc/images/invoker_get_token.png new file mode 100644 index 0000000000000000000000000000000000000000..4d88a9871b55a92dd28e2d03c15d68d76bb40cc6 Binary files /dev/null and b/doc/images/invoker_get_token.png differ diff --git a/doc/images/provider_onboarding.png b/doc/images/provider_onboarding.png new file mode 100644 index 0000000000000000000000000000000000000000..c904ccdddcff0286a776984cb1aef1da6fafd93e Binary files /dev/null and b/doc/images/provider_onboarding.png differ diff --git a/doc/images/provider_publish.png b/doc/images/provider_publish.png new file mode 100644 index 0000000000000000000000000000000000000000..bb2c3b592ed48b37a44dd2358f66cf6c24da0731 Binary files /dev/null and b/doc/images/provider_publish.png differ diff --git a/doc/sdk-configuration.md b/doc/sdk-configuration.md index fedc6208ff89e37482f15cfb8a5bd97467eebd57..08f23610b390005e4b9b607fbb72c29586c05fa5 100644 --- a/doc/sdk-configuration.md +++ b/doc/sdk-configuration.md @@ -61,27 +61,6 @@ This configuration file is only mandatory if we want to use the [CAPIF_Publish_S - publisherAPFid: APF id we chose to use Example : "APFa165364a379035d14311deadc04332" - publisherAEFsids: Array of strings filled out of AEFs ids we want to use Example: ["AEFfa38f0e855bffb420e4994ecbc8fb9","AEFe8bfa711f4f0c95ba0b382508e6382"] -ServiceApiId is required in: -- Provider Unpublish Api -- Provider Update Api -- Provider Get api - -PublisherAPFid is required in: - -- Provider Publish Api -- Provider Unpublish Api -- Provider Update Api -- Provider Get Api -- Provider Get all Apis - -PublisherAEFsids is required in: - -- Provider Publish Api -- Provider Unpublish Api -- Provider Update Api - - - For using the Publish Api function or the Update function the provider_api_description_sample.json **must** have been modified with the Publish API that is wanted to share following the standard schema for [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) **AefIds fields won't need to fill out the from aefProfiles** array because you would already be configurating this fields by completing publisherAEFsids parameter diff --git a/doc/sdk-prerequesites.md b/doc/sdk-prerequeriments.md similarity index 89% rename from doc/sdk-prerequesites.md rename to doc/sdk-prerequeriments.md index 1f18fd520ab696e2d8bf81d04dc5ce44ce719f9a..865b2adce2f3c6edecef297d91c3f0eeee99a752 100644 --- a/doc/sdk-prerequesites.md +++ b/doc/sdk-prerequeriments.md @@ -1,4 +1,4 @@ -## OpenCAPIF SDK prerequisites +## OpenCAPIF SDK prerequirement 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). diff --git a/doc/sdk-usage.md b/doc/sdk-usage.md index 292f607fd3749aa52d89a8febb1ce0984798db79..49fa47462bff273c3dc7776b4e75fd1bee3f4bda 100644 --- a/doc/sdk-usage.md +++ b/doc/sdk-usage.md @@ -2,15 +2,74 @@ 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] +[GENERAL CAPIF USAGE FLOW](./images/Flujo%20completo-OPENCAPIF%20ACTUAL.jpg) 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, -[IMAGE OF ARCH APP ----> CAPIF WITH SCRIPTS] + - **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] +# As an invoker + +The common path to follow using CAPIF in order to get an API token of the service it's wanted to use is by following this steps: + +- register_and_onboard_Invoker() // Script invoker_capif_connector.py + + + +- discover() // Script invoker_service_discover.py +In this functionality it could be used [Discover_filter.json](./sdk-configuration.md) to retrieve only the access of the API's it's wanted to access + + + +- get_tokens() // Script invoker_service_get_token.py + + + +# As an provider +The common path to follow using CAPIF in order to publish an API is by following this steps: + +- register_and_onboard_provider() // Script provider_capif_connector.py + + + +[CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) + +For using the Publish Service is mandatory to fullfill certain fields of the [Publish.json](./sdk-configuration.md) file + +- publish_services(service_api_description_json_full_path) // Script provider_publish_api.py + + Mandatory fields: + - PublisherAPFid + - PublisherAEFsids + +- unpublish_service(service_api_description_json_full_path) // Script provider_unpublish_api.py + + Mandatory fields: + - ServiceApiId + - PublisherAPFid + - PublisherAEFsids + +- update_service(service_api_description_json_full_path) // Script provider_update_api.py + + Mandatory fields: + - ServiceApiId + - PublisherAPFid + - PublisherAEFsids + +- get_service() // Script provider_get_published_api.py + + Mandatory fields: + - ServiceApiId + - PublisherAPFid + +- get_all_services() // Script provider_get_all_published_api.py + + Mandatory fields: + - PublisherAPFid + + # OpenCAPIF SDK scripts