diff --git a/README.md b/README.md index c1020b01e4707451504118f2f5f14e22565d5536..cda2d468c6ba86c06e184596940ac26e6701511a 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ OpenCAPIF SDK brings a set of functions to integrate with the 5G Core's function | /{apfId}/service-apis/{serviceApiId} (GET) | [get_service()](./doc/sdk_full_documentation.md#get-services) | Retrieves the details of a specific service API for a specific `apfId` and `serviceApiId` | | /{apfId}/service-apis (GET) | [get_all_services()](./doc/sdk_full_documentation.md#get-all-services) | Retrieves a list of all available service APIs for a specific `apfId` | | /aef-security/v1/check-authentication (POST) | [check_authentication()](./doc/sdk_full_documentation.md#check_authentication) | This custom operation allows the API invoker to confirm the `supported_features` from the API exposing function(AEF) | +| /api-invocation-logs/v1/{aefId}/logs (POST) | [create_logs( aefId, api_invoker_id)](./doc/sdk_full_documentation.md#create_logs) | This operation allows to the Provider to notice to the CCF about the query of an invoker for an especific `aefId` NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references: - [CAPIF Invoker API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_API_Invoker_Management_API.yaml) @@ -104,6 +105,7 @@ NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references: - [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) - [AEF Security API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_AEF_Security_API.yaml) +- [CAPIF Logging API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Logging_API_Invocation_API.yaml) NOTE: In the [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) the `service` concept is understood as equal as the `API` concept. @@ -316,7 +318,6 @@ There are some features which **are not currently available at latest OpenCAPIF - [CAPIF Access control policy management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Access_Control_Policy_API.yaml) - [CAPIF Auditing API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Auditing_API.yaml) - [CAPIF Events API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Events_API.yaml) - - [CAPIF Logging API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Logging_API_Invocation_API.yaml) - [CAPIF Routing info API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Routing_Info_API.yaml) - [CAPIF Security API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Security_API.yaml) - /trustedInvokers/{apiInvokerId}/delete (POST) diff --git a/doc/sdk_configuration.md b/doc/sdk_configuration.md index 97a3dafacbf164cf1088388b85df37fdd620c965..f5ee0cc0656ad5f396572d1a525affb33377fc40 100644 --- a/doc/sdk_configuration.md +++ b/doc/sdk_configuration.md @@ -97,6 +97,7 @@ This file can also be populated using [environment variables](../samples/envirom - [`publish_req`](#configuration-of-publish_req): Fields required for API publishing. - `api_description_path`: The path to the [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) JSON file. - `check_authentication_data`: The `ip` and `port` of the target Provider's AEF to get their supported features from. +- `log`: The structure defined in the [Log schema](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Logging_API_Invocation_API.yaml), it is not needed to fulfill the `apiId` field. ## Configuration via `capif_sdk_register.json` diff --git a/doc/sdk_full_documentation.md b/doc/sdk_full_documentation.md index d7f2b168f5c5887288a07cfc07bb18b90400e317..7cb2fd96c0c22bea93197804fbc5da1b85689c8a 100644 --- a/doc/sdk_full_documentation.md +++ b/doc/sdk_full_documentation.md @@ -162,6 +162,20 @@ The provider must be onboarded before using these features.  +### Create logs + +OpenCAPIF SDK references: +- **Function**: `create_logs(aefId, api_invoker_id)` + +The provider notifies to the CCF that the published API has been used by certain invoker. + +For leveraging this feature the Provider must have onboarded and published an API previously. + +**Required SDK input**: +- aefId (Within the function) +- api_invoker_id (Within the function) +- log (Within [SDK configuration](./sdk_configuration.md) or object) + ## Invoker Network App The OpenCAPIF SDK enables efficient implementation of invoker functionality for Network App. This section details the SDK features related to CAPIF invokers. diff --git a/setup.py b/setup.py index 85a43dc9f362e987b101240220b3fd47013e2b76..6a8ad4d5896629be43e9e780726f0b3548413381 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open(os.path.join(this_directory, "README_pipy.md"), encoding="utf-8") as f setup( name="opencapif_sdk", - version="0.1.17.3", + version="0.1.17.5", author="JorgeEcheva, dgs-cgm", author_email="jorge.echevarriauribarri.practicas@telefonica.com, daniel.garciasanchez@telefonica.com", description=( diff --git a/test/test.py b/test/test.py index 6d026d5292cd328f954a1448c6f06cca2ad4106f..85a30a880d21094ca36a372e19bc940d107566fc 100644 --- a/test/test.py +++ b/test/test.py @@ -2,7 +2,7 @@ import json # flake8: noqa -from opencapif_sdk import capif_invoker_connector, capif_provider_connector, service_discoverer,capif_logging_feature +from opencapif_sdk import capif_invoker_connector, capif_provider_connector, service_discoverer capif_sdk_config_path = "./capif_sdk_config_sample_test.json" @@ -120,7 +120,7 @@ if __name__ == "__main__": discoverer = service_discoverer(config_file=capif_sdk_config_path) - discoverer.discover_filter["api-name"]= "Testtrece" + discoverer.discover_filter["api-name"]= "safe-6g-resilience-function" discoverer.discover() @@ -130,11 +130,11 @@ if __name__ == "__main__": print("SERVICE GET TOKENS COMPLETED") - logger=capif_logging_feature(config_file=capif_sdk_config_path) + # logger=capif_logging_feature(config_file=capif_sdk_config_path) - invoker_id=discoverer.invoker_capif_details["api_invoker_id"] + # invoker_id=discoverer.invoker_capif_details["api_invoker_id"] - logger.create_logs(aefId=AEF1,api_invoker_id=invoker_id) + # logger.create_logs(aefId=AEF1,api_invoker_id=invoker_id) capif_invoker_connector.update_invoker()