From 95ebac99df380dbccef4aef3599a060c06877327 Mon Sep 17 00:00:00 2001
From: JorgeEcheva26 <jorge.echevarriauribarri.practicas@telefonica.es>
Date: Tue, 24 Sep 2024 09:39:07 +0200
Subject: [PATCH] Snake case and references to swaggers

---
 README.md                                     | 28 +++++++++----------
 doc/sdk-usage.md                              |  2 +-
 scripts/invoker_capif_connector.py            |  2 +-
 .../invoker_capif_connector_offboarding.py    |  2 +-
 scripts/invoker_capif_connector_update.py     |  2 +-
 scripts/provider_capif_connector.py           |  2 +-
 .../provider_capif_connector_offboarding.py   |  2 +-
 sdk/sdk.py                                    | 10 +++----
 8 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md
index 4eeee8a..cadbd20 100644
--- a/README.md
+++ b/README.md
@@ -27,26 +27,26 @@ OpenCAPIF SDK brings a set of functions to integrate with the 5G Core's function
 
 | **CAPIF API**                                   | **OpenCAPIF SDK function**                                  |
 |-------------------------------------------------|-------------------------------------------------------------|
-| onboardedInvokers (POST)                        | register_and_onboard_Invoker()                              |
-| Update_API_Invoker                              | update_Invoker()                                            |
-| Offboard_API_Invoker                            | offboard_and_deregister_Invoker()                           |
-| Onboard_API_Provider                            | register_and_onboard_provider()                             |
-| Update_API_Provider                             | update_service()                                            |
-| Offboard_API_Provider                           | offboard_and_deregister_nef()                               |
-| Discover_Service_API                            | discover()                                                  |
-| Publish_Service_API                             | publish_services(service_api_description_json_full_path)    |
-| Unpublish_Service_API                           | unpublish_service(service_api_description_json_full_path)   |
-| Update_Service_API                              | update_service(service_api_description_json_full_path)      |
-| Get_Service_API                                 | get_service()                                               |
-| Get_All_Service_API                             | get_all_services()                                          |
-| Obtain_Authorization                            | discover()                                                  |
+| onboardedInvokers (POST)                        | onboard_invoker()                                           |
+| onboardedInvokers (PUT)                         | update_invoker()                                            |
+| onboardedInvokers (DELETE)                      | offboard_invoker()                                          |
+| registrations (POST)                            | onboard_provider()                                          |
+| registrations (PUT)                             | update_provider()                                           |
+| registrations (DELETE)                          | offboard_provider()                                         |
+| allServiceAPIs (GET)                            | discover()                                                  |
+| service-apis (POST)                             | publish_services(service_api_description_json_full_path)    |
+| service-apis (DELETE)                           | unpublish_service(service_api_description_json_full_path)   |
+| service-apis (PUT)                              | update_service(service_api_description_json_full_path)      |
+| service-apis (GET)                              | get_service()                                               |
+| service-apis (GET)                              | get_all_services()                                          |
+| trustedInvokers (PUT)                           | discover()                                                  |
 
 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)
 - [CAPIF Provider API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_API_Provider_Management_API.yaml)
 - [CAPIF Discover API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Discover_Service_API.yaml)
 - [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)
 # NetApp developer path
 
 NetApp typical flow showcasing SDK usage. WIP
\ No newline at end of file
diff --git a/doc/sdk-usage.md b/doc/sdk-usage.md
index 4c05b4b..f1b478e 100644
--- a/doc/sdk-usage.md
+++ b/doc/sdk-usage.md
@@ -6,7 +6,7 @@ Before usage it's needed to have completed the [prerequirements](./sdk-prerequir
 
 IMPORTANT: All jsons configuration files **MUST** be in the same folder
 
-[GENERAL CAPIF USAGE FLOW](./images/Flujo%20completo-OPENCAPIF%20ACTUAL.jpg)
+![GENERAL CAPIF USAGE FLOW](./images/Flujo%20completo-OPENCAPIF%20ACTUAL.jpg)
 
 This repository includes 2 different modes to test OpenCAPIF SDK:
 
diff --git a/scripts/invoker_capif_connector.py b/scripts/invoker_capif_connector.py
index abc7ae7..b07b440 100755
--- a/scripts/invoker_capif_connector.py
+++ b/scripts/invoker_capif_connector.py
@@ -19,7 +19,7 @@ def showcase_capif_connector():
 
     capif_connector = CAPIFInvokerConnector(config_file=utilities.get_config_file())
 
-    capif_connector.register_and_onboard_Invoker()
+    capif_connector.register_and_onboard_invoker()
     print("COMPLETED")
 
 if __name__ == "__main__":
diff --git a/scripts/invoker_capif_connector_offboarding.py b/scripts/invoker_capif_connector_offboarding.py
index cceed63..f865e8e 100755
--- a/scripts/invoker_capif_connector_offboarding.py
+++ b/scripts/invoker_capif_connector_offboarding.py
@@ -15,7 +15,7 @@ from sdk import CAPIFInvokerConnector
 
 def showcase_offboard_and_deregister_invoker():
     capif_connector = CAPIFInvokerConnector(config_file=utilities.get_config_file())
-    capif_connector.offboard_and_deregister_Invoker()
+    capif_connector.offboard_and_deregister_invoker()
     print("COMPLETED")
 
 
diff --git a/scripts/invoker_capif_connector_update.py b/scripts/invoker_capif_connector_update.py
index ab359c4..e2a88d3 100644
--- a/scripts/invoker_capif_connector_update.py
+++ b/scripts/invoker_capif_connector_update.py
@@ -19,7 +19,7 @@ def showcase_capif_connector():
 
     capif_connector = CAPIFInvokerConnector(config_file=utilities.get_config_file())
 
-    capif_connector.update_Invoker()
+    capif_connector.update_invoker()
     print("COMPLETED")
 
 if __name__ == "__main__":
diff --git a/scripts/provider_capif_connector.py b/scripts/provider_capif_connector.py
index 1df3d21..16b8275 100755
--- a/scripts/provider_capif_connector.py
+++ b/scripts/provider_capif_connector.py
@@ -15,7 +15,7 @@ def showcase_capif_nef_connector():
     """
     capif_connector = CAPIFProviderConnector(config_file=utilities.get_config_file())
 
-    capif_connector.register_and_onboard_provider()
+    capif_connector.onboard_provider()
 
     
     print("COMPLETED")
diff --git a/scripts/provider_capif_connector_offboarding.py b/scripts/provider_capif_connector_offboarding.py
index 96cae3f..fcdb00f 100755
--- a/scripts/provider_capif_connector_offboarding.py
+++ b/scripts/provider_capif_connector_offboarding.py
@@ -14,7 +14,7 @@ def offboard_capif_nef_connector():
     """
     """
     capif_connector = CAPIFProviderConnector(config_file=utilities.get_config_file())
-    capif_connector.offboard_and_deregister_provider()
+    capif_connector.offboard_provider()
     print("COMPLETED")
 
 if __name__ == "__main__":
diff --git a/sdk/sdk.py b/sdk/sdk.py
index 54f71e1..2b4da2d 100644
--- a/sdk/sdk.py
+++ b/sdk/sdk.py
@@ -148,7 +148,7 @@ class CAPIFInvokerConnector:
             url = url + "/"
         return url
 
-    def register_and_onboard_Invoker(self) -> None:
+    def onboard_invoker(self) -> None:
         self.logger.info("Registering and onboarding Invoker")
         try:
             public_key = self.__create_private_and_public_keys()
@@ -212,7 +212,7 @@ class CAPIFInvokerConnector:
             self.logger.error(f"Error during Invoker offboarding: {e} - Response: {response.text}")
             raise
 
-    def offboard_and_deregister_Invoker(self) -> None:
+    def offboard_invoker(self) -> None:
         self.logger.info("Offboarding and deregistering Invoker")
         try:
             self.__offboard_Invoker()
@@ -374,7 +374,7 @@ class CAPIFInvokerConnector:
             self.logger.error(f"Error during writing to file: {e}")
             raise
 
-    def update_Invoker(self):
+    def update_invoker(self):
         self.logger.info("Updating Invoker")
         try:
             
@@ -753,7 +753,7 @@ class CAPIFProviderConnector:
             raise
 
     
-    def register_and_onboard_provider(self) -> None:
+    def onboard_provider(self) -> None:
         """
         Retrieves and stores the certificate from CAPIF, acquires authorization, and registers the provider.
         """
@@ -1318,7 +1318,7 @@ class CAPIFProviderConnector:
             self.logger.error(f"Unexpected error during service publication: {e} - Response: {response.text}")
             raise
 
-    def offboard_and_deregister_provider(self) -> None:
+    def offboard_provider(self) -> None:
         """
         Offboards and deregisters the NEF (Network Exposure Function).
         """
-- 
GitLab