diff --git a/README.md b/README.md index 42edb3686e0a924e310b9081eafe10ded5a6750d..fdea6f03e6aa706499ab48cb07220e5a72590947 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,11 @@ OpenCAPIF SDK brings a set of functions to integrate with the 5G Core's function | /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. | +| /{apfId}/service-apis(POST) | publish_services() | Registers a new service API into the system for a specific `apfId` | +| /{apfId}/service-apis/{serviceApiId} (DELETE) | unpublish_service() | Deletes a service API from the system for a specific `apfId`and `serviceApiId` | +| /{apfId}/service-apis/{serviceApiId} (PUT) | update_service() | Updates the details of an existing service API for a specific `apfId`and `serviceApiId` | +| /{apfId}/service-apis/{serviceApiId} (GET) | get_service() | Retrieves the details of a specific service API for a specific `apfId` and `serviceApiId` | +| /{apfId}/service-apis (GET) | get_all_services() | Retrieves a list of all available service APIs for a specific `apfId` | NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references: @@ -67,7 +67,7 @@ NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references: 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). - +# Netapp developer path ## Invoker NetApp A NetApp development running as an Invoker would usually follow this process step by step making use of SDK: @@ -118,6 +118,16 @@ This image highlights Invoker path using SDK code:  +### Important information for Invoker consumer + +In the `invoker_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find: + +- `Capif_api_security_context_details.json`: This file contains the information of your invoker. It will contain: + + 1. Your `api_invoker_id`. + 2. If you have already used the Service Discovery Functionality, you will find all the available APIs with their information. + 3. If you have already used the Service Get Token functionality, you will find your access token for using the APIs you have already discovered. + ## Provider NetApp A NetApp development running as a Provider would typically follow this process step by step, making use of the SDK: @@ -156,4 +166,13 @@ Here is a sample of the implementation of this hole [functionality](./netapp-sam This image highlights Provider path using SDK code: - \ No newline at end of file + + +### Important information for Provider consumer + +In the `provider_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider, for each folder it is created by SDK this files: + +- `Capif_provider_details.json` : Contains all the APFs and AEFs ids that have already onboarded with this capif_username +- `CAPIF_<your_api_name><your_API_id>.json` : If it's already published or updated an API, It will be available a copy of your last payload. +- `Service_received.json` : If it's alread used the get an api or get all apis functionality, It will be available the response to your request. +- `Published-Apis.json` : Constains the currently published APIs with their ApiId \ No newline at end of file diff --git a/config/capif-sdk-config.json b/config/capif-sdk-config.json index 4d2eb28fff084ba2c974f24736b04b494ec7de39..b9cc6ad17f75291a759710bf947b234816674ea5 100644 --- a/config/capif-sdk-config.json +++ b/config/capif-sdk-config.json @@ -34,9 +34,9 @@ "service-kpis": "" }, "publish_req" : { - "service_api_id":"6d3fbdcc138f81b36c7b1595229377", - "publisher_apf_id":"APFdf22044ce6988b136b253a8c5b26f1", - "publisher_aefs_ids":["AEF0f66526ff2fd8a1be721ace3506adb","AEF212b55c43b1b16116192043bab9e05"] + "service_api_id":"80dbdd52ee766d4ad4494264e4289c", + "publisher_apf_id":"APF73e3458fb483c3c65f2f7e126ec851", + "publisher_aefs_ids":["AEF07a01ccd74a160c195e69b4f116d66","AEFb5c206b46fc68c192aed6870899ea1"] }, "api_description_path":"/Users/IDB0128/git_repos/pesp_capif_sdk/samples/provider_api_description_sample.json" } \ No newline at end of file diff --git a/doc/sdk-usage.md b/doc/sdk-usage.md index bd42b585346e9d362f4ee82f77ca6a23d1ade8c6..1ed431b4b910e7a4a0717768543e07e49cb4641d 100644 --- a/doc/sdk-usage.md +++ b/doc/sdk-usage.md @@ -26,20 +26,20 @@ CAPIF is designed to use using two different roles: - [As an Invoker](#as-an-invoker) + - [Important Information for Invoker](#important-information-for-invoker-consumer) - [Onboard Invoker](#onboard_invoker--script-invoker_capif_connectorpy) - [Discover API](#discover--script-invoker_service_discoverpy) - [Get Tokens](#get_tokens--script-invoker_service_get_tokenpy) - [Update and Offboard Invoker](#update_invoker-and-offboard_and_deregister_invoker--invoker_capif_connector_updatepy-and-invoker_capif_connector_offboardingpy) - - [Important Information for Invoker](#important-information-for-invoker-consumer) - [As a Provider](#as-a-proxvider) + - [Important Information for Provider](#important-information-for-provider-consumer) - [Onboard Provider](#onboard_provider--script-provider_capif_connectorpy) - [Publish Services](#publish_services--script-provider_publish_apipy) - [Unpublish Services](#unpublish_service--script-provider_unpublish_apipy) - - [Update Services](#update_provider-and-offboard_provider--provider_capif_connector_updatepy-and-provider_capif_connector_offboardingpy) + - [Update Services](#update_service--script-provider_update_apipy) - [Get Published Services](#get_service--script-provider_get_published_apipy) - [Get All Published Services](#get_all_services--script-provider_get_all_published_apipy) - [Update and Offboard Provider](#update_provider-and-offboard_provider--provider_capif_connector_updatepy-and-provider_capif_connector_offboardingpy) - - [Important Information for Provider](#important-information-for-provider-consumer) - [Other Features](#other-features) - [Register and Login](#script-register_and_loginpy) - [Deregister and Login](#script-deregister_and_loginpy) @@ -47,6 +47,16 @@ CAPIF is designed to use using two different roles: # 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: +## Important information for Invoker consumer + +In the `invoker_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find: + +- `Capif_api_security_context_details.json`: This file contains the information of your invoker. It will contain: + + 1. Your `api_invoker_id`. + 2. If you have already used the Service Discovery Functionality, you will find all the available APIs with their information. + 3. If you have already used the Service Get Token functionality, you will find your access token for using the APIs you have already discovered. + ### onboard_invoker() // Script invoker_capif_connector.py @@ -55,35 +65,40 @@ Simplifies the process of onboarding for Invoker users  ### discover() // Script invoker_service_discover.py -In this functionality it could be used [discover_filter](./sdk-configuration.md) to retrieve only the access of the API's it's wanted to access +In this functionality it could be used [discover_filter](./sdk-configuration.md) to retrieve only the access of the API's it's wanted to query + +It is mandatory to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before  ### get_tokens() // Script invoker_service_get_token.py -After the Discovery, this functionality simplifies the way of getting created their propperly security context for each of the services and adquiring the access token to use the final APIs +This functionality simplifies the way of getting created their propperly security context for each of the services and adquiring the access token to use the final APIs. + +This functionality **requires** to to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before and run the [discover](#discover--script-invoker_service_discoverpy) function at least once before.  ### update_invoker() and offboard_and_deregister_Invoker() // invoker_capif_connector_update.py and invoker_capif_connector_offboarding.py -For using this features we must have onboard as an invoker previusly. +For using this features we must have [onboarded as an invoker](#onboard_invoker--script-invoker_capif_connectorpy) previusly.  -## Important information for Invoker consumer - -In the `invoker_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider. For each folder, you could find: - -- `Capif_api_security_context_details.json`: This file contains the information of your invoker. It will contain: - - 1. Your `api_invoker_id`. - 2. If you have already used the Service Discovery Functionality, you will find all the available APIs with their information. - 3. If you have already used the Service Get Token functionality, you will find your access token for using the APIs you have already discovered. # As a provider The common path to follow using CAPIF in order to publish an API is by following this steps: +## Important information for Provider consumer + +In the `provider_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider, for each folder it is created by SDK this files: + +- `Capif_provider_details.json` : Contains all the APFs and AEFs ids that have already onboarded with this capif_username +- `CAPIF_provider_api_description_sample.json` : If it's already published or updated an API, It will be available a copy of your last payload. +- `Service_received.json` : If it's alread used the get an api or get all apis functionality, It will be available the response to your request. +- `Published-Apis.json` : Constains the currently published APIs with their ApiId + + ### onboard_provider() // Script provider_capif_connector.py Simplifies the process of onboarding for Provider users,also has the capability to register several APF's and AEF's if its necesary @@ -96,7 +111,9 @@ For using the Publish Service is mandatory to fullfill certain fields of the [Pu ### publish_services() // Script provider_publish_api.py - Simplifies the process of publishing an API. Also has the capability to chose which APF and AEF's will be used to publish the API +Simplifies the process of publishing an API. Also has the capability to chose which APF and AEF's will be used to publish the API. + +It is mandatory to have [onboarded as a provider](#onboard_provider--script-provider_capif_connectorpy) before Mandatory fields: - PublisherAPFid @@ -104,16 +121,20 @@ For using the Publish Service is mandatory to fullfill certain fields of the [Pu ### unpublish_service() // Script provider_unpublish_api.py - Simplifies the process of deleting an API +Simplifies the process of deleting an API + +It is mandatory to have onboarded as a [provider](#onboard_provider--script-provider_capif_connectorpy) before and to have [published any service](#publish_services--script-provider_publish_apipy) before Mandatory fields: - ServiceApiId - PublisherAPFid - PublisherAEFsids -### update_service(service_api_description_json_full_path) // Script provider_update_api.py +### update_service() // Script provider_update_api.py + +Simplifies the process of updating an API. Also has the capability to chose which APF and AEF's will be used to update the API. - Simplifies the process of updating an API. Also has the capability to chose which APF and AEF's will be used to update the API +It is mandatory to have onboarded as a [provider](#onboard_provider--script-provider_capif_connectorpy) before and to have [published any service](#publish_services--script-provider_publish_apipy) before Mandatory fields: - ServiceApiId @@ -122,7 +143,9 @@ For using the Publish Service is mandatory to fullfill certain fields of the [Pu ### get_service() // Script provider_get_published_api.py - Simplifies the process of recieving the information of One service published previously +Simplifies the process of recieving the information of One service published previously in Published-Apis.json + +It is mandatory to have onboarded as a [provider](#onboard_provider--script-provider_capif_connectorpy) before and to have [published any service](#publish_services--script-provider_publish_apipy) before Mandatory fields: - ServiceApiId @@ -130,7 +153,9 @@ For using the Publish Service is mandatory to fullfill certain fields of the [Pu ### get_all_services() // Script provider_get_all_published_api.py - Simplifies the process of recieving the information of all available services published previously +Simplifies the process of recieving the information of all available services published previously in Published-Apis.json + +It is mandatory to have onboarded as a [provider](#onboard_provider--script-provider_capif_connectorpy) before and to have [published any service](#publish_services--script-provider_publish_apipy) before Mandatory fields: - PublisherAPFid @@ -141,18 +166,9 @@ For using the Publish Service is mandatory to fullfill certain fields of the [Pu For using this features we must have onboard as a provider previusly. - - -## Important information for Provider consumer - -In the `provider_folder`, it will be located several folders with each `capif_username` you have onboarded as a provider, for each folder it is created by SDK this files: - -- `Capif_provider_details.json` : Contains all the APFs and AEFs ids that have already onboarded with this capif_username -- `CAPIF_provider_api_description_sample.json` : If it's already published or updated an API, It will be available a copy of your last payload. -- `Service_received.json` : If it's alread used the get an api or get all apis functionality, It will be available the response to your request. -- `Published-Apis.json` : Constains the currently published APIs with their ApiId - +It is mandatory to have onboarded as a [provider](#onboard_provider--script-provider_capif_connectorpy) before + diff --git a/samples/provider_api_description_sample.json b/samples/provider_api_description_sample.json index 2b0fec36597f2baefa2b3bb844b3b4fc67687841..7b4a118b1987f92f99f8e2a0119270aedd268f9e 100755 --- a/samples/provider_api_description_sample.json +++ b/samples/provider_api_description_sample.json @@ -1,123 +1,155 @@ { - "apiName": "Api-de-prueba-2", - "aefProfiles": [ - { - "aefId": "AEF0f66526ff2fd8a1be721ace3506adb", - "versions": [ + "apiName": "Api-de-prueba-2", + "aefProfiles": [ { - "apiVersion": "v1", - "expiry": "2100-11-30T10:32:02.004Z", - "resources": [ - { - "resourceName": "MONITORING_SUBSCRIPTIONS", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/{scsAsId}/subscriptions", - "custOpName": "http_post", - "operations": ["GET", "POST"], - "description": "Endpoint to manage monitoring subscriptions" - }, - { - "resourceName": "MONITORING_SUBSCRIPTION_SINGLE", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/{scsAsId}/subscriptions/{subscriptionId}", - "custOpName": "http_get", - "operations": ["GET", "PUT", "DELETE"], - "description": "Endpoint to manage single subscription" - } - ], - "custOperations": [ - { - "commType": "REQUEST_RESPONSE", - "custOpName": "string", - "operations": ["POST"], - "description": "string" - } - ] - } - ], - "protocol": "HTTP_1_1", - "dataFormat": "JSON", - "securityMethods": ["Oauth", "PSK"], - "interfaceDescriptions": [ + "aefId": "AEF07a01ccd74a160c195e69b4f116d66", + "versions": [ + { + "apiVersion": "v1", + "expiry": "2100-11-30T10:32:02.004Z", + "resources": [ + { + "resourceName": "MONITORING_SUBSCRIPTIONS", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/{scsAsId}/subscriptions", + "custOpName": "http_post", + "operations": [ + "GET", + "POST" + ], + "description": "Endpoint to manage monitoring subscriptions" + }, + { + "resourceName": "MONITORING_SUBSCRIPTION_SINGLE", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/{scsAsId}/subscriptions/{subscriptionId}", + "custOpName": "http_get", + "operations": [ + "GET", + "PUT", + "DELETE" + ], + "description": "Endpoint to manage single subscription" + } + ], + "custOperations": [ + { + "commType": "REQUEST_RESPONSE", + "custOpName": "string", + "operations": [ + "POST" + ], + "description": "string" + } + ] + } + ], + "protocol": "HTTP_1_1", + "dataFormat": "JSON", + "securityMethods": [ + "Oauth", + "PSK" + ], + "interfaceDescriptions": [ + { + "ipv4Addr": "127.0.0.1", + "port": 8888, + "securityMethods": [ + "Oauth" + ] + } + ] + }, { - "ipv4Addr": "127.0.0.1", - "port": 8888, - "securityMethods": ["Oauth"] + "aefId": "AEFb5c206b46fc68c192aed6870899ea1", + "versions": [ + { + "apiVersion": "v1", + "expiry": "2100-11-30T10:32:02.004Z", + "resources": [ + { + "resourceName": "TSN_LIST_PROFILES", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/profile", + "custOpName": "http_get", + "operations": [ + "GET" + ], + "description": "Endpoint for retrieving the list of available TSN profiles" + }, + { + "resourceName": "TSN_DETAIL_PROFILE", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/profile?name={profileName}", + "custOpName": "http_get", + "operations": [ + "GET" + ], + "description": "Endpoint for retrieving information about a single TSN profile" + }, + { + "resourceName": "TSN_APPLY_CONFIGURATION", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/apply", + "custOpName": "http_post", + "operations": [ + "POST" + ], + "description": "Endpoint for configuring TSN connection parameters" + }, + { + "resourceName": "TSN_CLEAR_CONFIGURATION", + "commType": " SUBSCRIBE_NOTIFY", + "uri": "/clear", + "custOpName": "http_post", + "operations": [ + "POST" + ], + "description": "Endpoint for removing a previous TSN connection configuration" + } + ], + "custOperations": [ + { + "commType": "REQUEST_RESPONSE", + "custOpName": "string", + "operations": [ + "POST" + ], + "description": "string" + } + ] + } + ], + "protocol": "HTTP_1_1", + "dataFormat": "JSON", + "securityMethods": [ + "Oauth" + ], + "interfaceDescriptions": [ + { + "ipv4Addr": "127.0.0.1", + "port": 8899, + "securityMethods": [ + "Oauth" + ] + } + ] } - ] + ], + "description": "API of dummy netapp to test", + "supportedFeatures": "fffff", + "shareableInfo": { + "isShareable": true, + "capifProvDoms": [ + "string" + ] }, - { - "aefId": "AEF212b55c43b1b16116192043bab9e05", - "versions": [ - { - "apiVersion": "v1", - "expiry": "2100-11-30T10:32:02.004Z", - "resources": [ - { - "resourceName": "TSN_LIST_PROFILES", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/profile", - "custOpName": "http_get", - "operations": ["GET"], - "description": "Endpoint for retrieving the list of available TSN profiles" - }, - { - "resourceName": "TSN_DETAIL_PROFILE", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/profile?name={profileName}", - "custOpName": "http_get", - "operations": ["GET"], - "description": "Endpoint for retrieving information about a single TSN profile" - }, - { - "resourceName": "TSN_APPLY_CONFIGURATION", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/apply", - "custOpName": "http_post", - "operations": ["POST"], - "description": "Endpoint for configuring TSN connection parameters" - }, - { - "resourceName": "TSN_CLEAR_CONFIGURATION", - "commType": " SUBSCRIBE_NOTIFY", - "uri": "/clear", - "custOpName": "http_post", - "operations": ["POST"], - "description": "Endpoint for removing a previous TSN connection configuration" - } - ], - "custOperations": [ - { - "commType": "REQUEST_RESPONSE", - "custOpName": "string", - "operations": ["POST"], - "description": "string" - } - ] - } - ], - "protocol": "HTTP_1_1", - "dataFormat": "JSON", - "securityMethods": ["Oauth"], - "interfaceDescriptions": [ - { - "ipv4Addr": "127.0.0.1", - "port": 8899, - "securityMethods": ["Oauth"] - } - ] - } - ], - "description": "API of dummy netapp to test", - "supportedFeatures": "fffff", - "shareableInfo": { - "isShareable": true, - "capifProvDoms": ["string"] - }, - "serviceAPICategory": "string", - "apiSuppFeats": "fffff", - "pubApiPath": { - "ccfIds": ["string"] - }, - "ccfId": "string" -} + "serviceAPICategory": "string", + "apiSuppFeats": "fffff", + "pubApiPath": { + "ccfIds": [ + "string" + ] + }, + "ccfId": "string" +} \ No newline at end of file diff --git a/scripts/invoker_capif_connector.py b/scripts/invoker_capif_connector.py index 00e8c7318f9bbb5516a9b8de57a51a47c08f1699..141a403f9862ee96a5fa3ce24247e8a78a43ab8f 100755 --- a/scripts/invoker_capif_connector.py +++ b/scripts/invoker_capif_connector.py @@ -1,5 +1,5 @@ -from sdk import CAPIFInvokerConnector + import sys import os import utilities @@ -8,7 +8,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFInvokerConnector def showcase_capif_connector(): """ diff --git a/scripts/invoker_capif_connector_offboarding.py b/scripts/invoker_capif_connector_offboarding.py index f32214e19ac6dc01cabde451e669d573c5b35d0c..125a7c2035590808903840e874e26029eab8834c 100755 --- a/scripts/invoker_capif_connector_offboarding.py +++ b/scripts/invoker_capif_connector_offboarding.py @@ -1,6 +1,3 @@ - - -from sdk import CAPIFInvokerConnector import sys import os import utilities @@ -9,7 +6,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFInvokerConnector def showcase_offboard_and_deregister_invoker(): capif_connector = CAPIFInvokerConnector(config_file=utilities.get_config_file()) diff --git a/scripts/invoker_capif_connector_update.py b/scripts/invoker_capif_connector_update.py index e08e59413a3f1370b08c9b23510af57c951b7ace..34c993ae76b41f784ff32b389e9ad413a3bed83b 100644 --- a/scripts/invoker_capif_connector_update.py +++ b/scripts/invoker_capif_connector_update.py @@ -1,4 +1,4 @@ -from sdk import CAPIFInvokerConnector + import sys import os import utilities @@ -7,7 +7,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFInvokerConnector def showcase_capif_connector(): """ diff --git a/scripts/invoker_service_discovery.py b/scripts/invoker_service_discovery.py index 234fe37e5bb7624340f53ab57bab66f2098b821d..54cd586ba60d4c2de329f03c1df6a8bda67cb9be 100755 --- a/scripts/invoker_service_discovery.py +++ b/scripts/invoker_service_discovery.py @@ -1,4 +1,4 @@ -from sdk import ServiceDiscoverer + import sys import os import utilities @@ -10,7 +10,7 @@ sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import ServiceDiscoverer def showcase_access_token_retrieval_from_capif(): service_discoverer = ServiceDiscoverer(config_file=utilities.get_config_file()) service_discoverer.discover() diff --git a/scripts/invoker_service_get_token.py b/scripts/invoker_service_get_token.py index 591775fc22357a4c45e5050598283f9610a718f2..404469822e530da62278f623223e90fbd1bd753d 100755 --- a/scripts/invoker_service_get_token.py +++ b/scripts/invoker_service_get_token.py @@ -1,4 +1,4 @@ -from sdk import ServiceDiscoverer + import sys import os import utilities @@ -10,7 +10,7 @@ sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import ServiceDiscoverer def showcase_access_token_retrieval_from_capif(): service_discoverer = ServiceDiscoverer(config_file=utilities.get_config_file()) service_discoverer.get_tokens() diff --git a/scripts/provider_capif_connector.py b/scripts/provider_capif_connector.py index 7eacc8b7cf114d824b258b75033ba21e29657d3b..843d256ab9283be87c97e102055e77fb16b716ee 100755 --- a/scripts/provider_capif_connector.py +++ b/scripts/provider_capif_connector.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -7,7 +7,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFProviderConnector # Ahora importa las clases desde tu archivo sdk.py diff --git a/scripts/provider_capif_connector_offboarding.py b/scripts/provider_capif_connector_offboarding.py index bd561f2305fa0c7ece2cb9a7a825e7e9b02e0455..a274cc8e09f23f6c377722b4dceb3ce8c58d443b 100755 --- a/scripts/provider_capif_connector_offboarding.py +++ b/scripts/provider_capif_connector_offboarding.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -7,7 +7,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFProviderConnector def offboard_capif_nef_connector(): capif_connector = CAPIFProviderConnector(config_file=utilities.get_config_file()) diff --git a/scripts/provider_capif_connector_update.py b/scripts/provider_capif_connector_update.py index 20564e7cb7166891e56dc3a6f856caf2190bd2e4..e4fa912717b98374cb1d8b25e7d67d28365a4e6c 100644 --- a/scripts/provider_capif_connector_update.py +++ b/scripts/provider_capif_connector_update.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -8,7 +8,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFProviderConnector def showcase_capif_nef_connector(): """ diff --git a/scripts/provider_get_all_published_api.py b/scripts/provider_get_all_published_api.py index 90937b65eec23458e2663fb3c976e32d2d4ae455..1448a5782df24fa15bfe8531b7eb386e74748bba 100644 --- a/scripts/provider_get_all_published_api.py +++ b/scripts/provider_get_all_published_api.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -9,7 +9,7 @@ sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a ' sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import CAPIFProviderConnector def showcase_capif_nef_connector(): """ diff --git a/scripts/provider_get_published_api.py b/scripts/provider_get_published_api.py index 8090c86d76550281ea0b9f0bc6d438066d9700fb..5128481f4a60b60a20515575f67bb2f063eea3d4 100644 --- a/scripts/provider_get_published_api.py +++ b/scripts/provider_get_published_api.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -10,7 +10,7 @@ sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import CAPIFProviderConnector def showcase_capif_nef_connector(): """ diff --git a/scripts/provider_publish_api.py b/scripts/provider_publish_api.py index 3ef5f663aa63f81e251cd279bde3f6191dd0b664..86c6774489c624b41faeda8f3290ab6885137eab 100644 --- a/scripts/provider_publish_api.py +++ b/scripts/provider_publish_api.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -10,7 +10,7 @@ sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import CAPIFProviderConnector def showcase_capif_nef_connector(): """ diff --git a/scripts/provider_unpublish_api.py b/scripts/provider_unpublish_api.py index 0dc792cfd4fe377c945f699a41b3b230f1024c92..f118ca7eab059f7672f75684990f39274f5c5952 100644 --- a/scripts/provider_unpublish_api.py +++ b/scripts/provider_unpublish_api.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -7,7 +7,7 @@ import utilities script_dir = os.path.dirname(os.path.abspath(__file__)) # Directorio actual del script sdk_path = os.path.join(script_dir, '..', 'sdk') # Subir un nivel y apuntar a 'sdk' sys.path.insert(0, sdk_path) - +from sdk import CAPIFProviderConnector # Ahora importa las clases desde tu archivo sdk.py diff --git a/scripts/provider_update_api.py b/scripts/provider_update_api.py index cc64a72fc5f87da0f94b7dd0ea8efe2d1394d324..dd48209fe920b3b7c6611cb1e6aae6a8139aede1 100644 --- a/scripts/provider_update_api.py +++ b/scripts/provider_update_api.py @@ -1,4 +1,4 @@ -from sdk import CAPIFProviderConnector + import sys import os import utilities @@ -10,7 +10,7 @@ sys.path.insert(0, sdk_path) # Ahora importa las clases desde tu archivo sdk.py - +from sdk import CAPIFProviderConnector def showcase_capif_nef_connector(): """ diff --git a/sdk/CAPIFProviderConnector.py b/sdk/CAPIFProviderConnector.py index 2230c74dabe3c437f7da6a9916051c921b79bd99..ccad751f5f4ef39471508b980f8e027655e2d097 100644 --- a/sdk/CAPIFProviderConnector.py +++ b/sdk/CAPIFProviderConnector.py @@ -138,7 +138,7 @@ class CAPIFProviderConnector: self.publish_req = { "service_api_id": os.getenv('PUBLISH_REQ_SERVICE_API_ID', config.get('service_api_id', '')).strip(), "publisher_apf_id": os.getenv('PUBLISH_REQ_PUBLISHER_APF_ID', config.get('publisher_apf_id', '')).strip(), - "publisher_aefs_ids": os.getenv('PUBLISH_REQ_PUBLISHER_AEFS_IDS', config.get('publisher_aefs_ids', '')).split(',') + "publisher_aefs_ids": os.getenv('PUBLISH_REQ_PUBLISHER_AEFS_IDS', config.get('publisher_aefs_ids', '')) } self.api_description_path = api_description_path