Commit f8016716 authored by JorgeEcheva26's avatar JorgeEcheva26
Browse files

details

parent 9665879d
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ 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

- 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.
+1 −1
Original line number Diff line number Diff line

# 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

+8 −2
Original line number Diff line number Diff line
@@ -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.

![Descripción de la imagen](./images/Flujo%20completo-SDK%20ACTUAL%20CON%20REGISTER.jpg)

+1 −1
Original line number Diff line number Diff line
@@ -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__":
+0 −16
Original line number Diff line number Diff line
@@ -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")
Loading