diff --git a/doc/sdk-configuration.md b/doc/sdk-configuration.md index 16c66fe725b6d8da1ba9cba7166cd1bcf91e1fa4..c06f60d84c1fd91c8d665ca884a587dfe65e21ef 100644 --- a/doc/sdk-configuration.md +++ b/doc/sdk-configuration.md @@ -5,9 +5,9 @@ Before configuration it's needed to have completed the [prerequirements](./sdk-p This configuration could also be fullfilled by enviroment variables (EXAMPLE) - - invoker_folder: The path (relative or absolute) of the folder you want to store your invoker information +- invoker_folder: The path (relative or absolute) of the folder you want to store your invoker information -- provider_folder:The path (relative or absolute) of the folder you want to store your invoker information +- provider_folder:The path (relative or absolute) of the folder you want to store your provider information - capif_host:The domain name of your capif host @@ -29,7 +29,7 @@ This configuration could also be fullfilled by enviroment variables (EXAMPLE) - AEFs: Number of AEF's you want to onboard as a provider Example:2 -- debug_mode: Boolean | If you want to recieve logs from SDK-S6G Example:True/False +- debug_mode: Boolean | If you want to recieve logs from SDK Example:True/False Mandatory fields no matter the target role to be onboarded, either invoker or provider: @@ -66,7 +66,7 @@ For using the Publish Api function or the Update function the provider_api_descr **AefIds fields won't need to fill out the from aefProfiles** array because you would already be configurating this fields by completing publisherAEFsids parameter -**If the publisherAEFsids parameter don't match with the aefProfiles you will recieve an error** +**If the publisherAEFsids parameter don't match with the aefProfiles in your [Api description](../api-samples/provider_api_description_sample.json) you will recieve an error** @@ -78,9 +78,6 @@ To use this feature it has to be completed `Discover_filter.json` with the param To run the Invoker Service Discovery Functionality it has to be onboarded as an Invoker before the CAPIF user. - - - #### **Configuration of Register.json** In order to use this SDK in a Local enviroment and creating and removing users, its mandatory to fullfill this fields. diff --git a/doc/sdk-installation.md b/doc/sdk-installation.md index 78bfb7099acfb77e127c8d3f79e5dd97e43f6e60..1082c486c57e78a2f892e44b89f7ed458a6e1e87 100644 --- a/doc/sdk-installation.md +++ b/doc/sdk-installation.md @@ -1,7 +1,7 @@ # OpenCAPIF SDK installation -Before installation it's needed to have completed the prerequirements section. +Before installation it's needed to have completed the [prerequirements](sdk-prerequirements.md) section. ## OpenCAPIF SDK consumer installation diff --git a/doc/sdk-usage.md b/doc/sdk-usage.md index b27a1165f851f6e83bc70984fb2d1e2e220fe5df..bd907d6e7ef4b6aa499079917cb54c4dfbb34e94 100644 --- a/doc/sdk-usage.md +++ b/doc/sdk-usage.md @@ -139,8 +139,14 @@ In the `provider_folder`, it will be located several folders with each `capif_us Apart from the SDK core, there are available different functionalities for development purposes: -- **Register and login**: Facilitates the logging process for admin users and creates a CAPIF user, -- **Deregister and login**: Facilitates the logging process for admin users and eliminates a CAPIF user. +- Script register_and_login.py + +Facilitates the logging process for admin users and creates a CAPIF user, + + +- Script deregister_and_login.py + +Facilitates the logging process for admin users and eliminates a CAPIF user.  diff --git a/scripts/provider_publish_api.py b/scripts/provider_publish_api.py index 68af744ad4d8ae8e07a30b08cc2f0c9cfc04fcd2..e447c8a37aeb442d3bf18a06edb089fb25368a02 100644 --- a/scripts/provider_publish_api.py +++ b/scripts/provider_publish_api.py @@ -16,7 +16,7 @@ def showcase_capif_nef_connector(): capif_connector = CAPIFProviderConnector(config_file=utilities.get_config_file()) capif_connector.publish_services( - service_api_description_json_full_path=utilities.provider_exposer_get_sample_api_description_path()) + service_api_description_json_full_path=utilities.provider_exposer_get_api_description_path()) print("COMPLETED") if __name__ == "__main__": diff --git a/scripts/register_and_login.py b/scripts/register_and_login.py index fdc0cc4bb106d6726df69fbe67a1f0439fb5fcf0..7cb9e2ca463552146b4a6b26f3a34a8da83b2e3c 100644 --- a/scripts/register_and_login.py +++ b/scripts/register_and_login.py @@ -24,7 +24,6 @@ def main(): admintoken = log_result["access_token"] postcreation = __create_user(admintoken,variables) uuid = postcreation["uuid"] - __write_to_file(uuid,variables) logger.info(uuid) def __log_to_capif(variables): @@ -88,21 +87,6 @@ def __load_config_file(config_file: str): logger.warning(f"Configuration file {config_file} not found. Using defaults or environment variables.") return {} -def __write_to_file(uuid, variables): - logger.info("Saving uuid in config.json") - - # Abrimos el archivo y leemos su contenido - with open(variables["config_path"] + "config.json", "r") as infile: - data = json.load(infile) - - # Modificamos el contenido del archivo para incluir el nuevo UUID - data["uuid"] = uuid - - # Escribimos el contenido actualizado de nuevo en el archivo - with open(variables["config_path"] + "config.json", "w") as outfile: - json.dump(data, outfile, indent=4) - - logger.info("Data saved") if __name__ == "__main__": logger = logging.getLogger("CAPIF Register") diff --git a/scripts/utilities.py b/scripts/utilities.py index 02924f298821d929f0c1e6701a600817b246d58b..911c8ad9e89c9871198e33c20e06f7841b723ccb 100755 --- a/scripts/utilities.py +++ b/scripts/utilities.py @@ -6,6 +6,6 @@ def get_config_file()-> str : def get_register_file()-> str : return "/Users/IDB0128/git_repos/pesp_capif_sdk/config/register.json" -def provider_exposer_get_sample_api_description_path() -> str: +def provider_exposer_get_api_description_path() -> str: return "/Users/IDB0128/git_repos/pesp_capif_sdk/api-samples/provider_api_description_sample.json"