Scheduled maintenance on Saturday, 27 September 2025, from 07:00 AM to 4:00 PM GMT (09:00 AM to 6:00 PM CEST) - some services may be unavailable -

Skip to content
Snippets Groups Projects
provider_update_api.py 857 B
Newer Older
  • Learn to ignore specific revisions
  • JorgeEcheva26's avatar
    JorgeEcheva26 committed
    import sys
    
    import os
    import emulator_utils
    
    # Añadir el directorio del SDK al PYTHONPATH usando una ruta relativa
    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)
    
    JorgeEcheva26's avatar
    JorgeEcheva26 committed
    
    # Ahora importa las clases desde tu archivo sdk.py
    from sdk import CAPIFProviderConnector
    def showcase_capif_nef_connector():
        """
    
        """
        capif_connector = CAPIFProviderConnector(config_file=emulator_utils.get_config_file())
    
        capif_connector.update_service(
            service_api_description_json_full_path=emulator_utils.provider_exposer_get_sample_api_description_path())
        print("COMPLETED")
    
    if __name__ == "__main__":
        #Let's register a NEF to CAPIF. This should happen exactly once
        showcase_capif_nef_connector()